cilissa.images
- Image structures
Classes
- class cilissa.images.Image(image: pathlib.Path | str | numpy.ndarray, name: str | None = None)[source]
np.ndarray wrapper, a core structure in CILISSA
- from_array(image_array: numpy.ndarray, at: Tuple[slice, slice] | None = None)[source]
Replaces the underlying image array with given np.ndarray
- load(image_path: pathlib.Path | str)[source]
Loads the image from given path
Uses cv2.imdecode instead of cv2.imread to handle unicode characters in path
- Parameters:
image_path (Path/str) – Path where the image is located.
- save(save_path: pathlib.Path | str = '')[source]
Saves the image
- Parameters:
save_path (Path/str) – Path to save the image at. Must contain the filename with extension. If empty string, then will save to the path the image was loaded from (if available)
- class cilissa.images.ImagePair(im1: Image, im2: Image, roi: cilissa.roi.ROI | None = None, use_roi: bool = True)[source]
A pair of 2
cilissa.images.Image
. Analysis is performed using this class.If any of the attributes in the image pair are mismatched, the attribute of the reference image will be used if necessary.
- set_roi(roi: cilissa.roi.ROI | None)[source]