organoid_tracker.imaging.cropper module
- organoid_tracker.imaging.cropper.crop_2d(image: ndarray, x_start: int, y_start: int, output: ndarray)
Takes a 2D crop out of the given image, and places it in the output array. The output array is the size of the cropped area. x_start and y_start define the upper left corner in the original image, and may be negative.
If the area to crop falls partly outside the original image, then those pixels are ignored and the original pixels in output will remain. Therefore, the output array must be an array of only zeros.
- organoid_tracker.imaging.cropper.crop_3d(image: ndarray, x_start: int, y_start: int, z_start: int, output: ndarray)
Crops part of the image (from x/y/z_start with a size equal to output) and places it in output. Parts outside the original image are ignored.
- organoid_tracker.imaging.cropper.crop_3d_to_2d(image: Image, x_start: int, y_start: int, z: int, output: ndarray)
Gets a cropped 2d image from the original 3d image. The start of the cropped image is defined by (x_start, y_start) and the size by the size of the output image. If the area to crop falls partly outside the original image, then those pixels are ignored and the original pixels in output will remain. Therefore, the output array must be an array of only zeros.