organoid_tracker.image_loading.builtin_image_filters module
Some builtin image filters, so that they can be saved and loaded.
- class organoid_tracker.image_loading.builtin_image_filters.GaussianBlurFilter(blur_radius: float = 5)
Bases:
ImageFilter
Applies a Gaussian blur in 2D.
- copy() ImageFilter
Copies the filter, such that changes to this filter have no effect on the copy, and vice versa.
- filter(time_point, image_z, image: ndarray)
Filters the given input array, which is a grayscale array of 2 or 3 dimensions. If it is three dimensions, then image_z is None. Note that the image_z does not include any image offsets, so z=0 will always be the lowest image plane. The input array will be modified.
- class organoid_tracker.image_loading.builtin_image_filters.IntensityPoint(time_point, z)
Bases:
NamedTuple
- distance_squared(other: IntensityPoint) int
- class organoid_tracker.image_loading.builtin_image_filters.InterpolatedMinMaxFilter(points_to_min_max: Optional[Dict[IntensityPoint, Tuple[float, float]]] = None)
Bases:
ImageFilter
Allows you to set the min/max pixel values at different points during the time-lapse. For all other points, the min and max values are interpolated.
- copy() InterpolatedMinMaxFilter
Copies the filter, such that changes to this filter have no effect on the copy, and vice versa.
- filter(time_point: TimePoint, image_z: Optional[int], image: ndarray)
Filters the given input array, which is a grayscale array of 2 or 3 dimensions. If it is three dimensions, then image_z is None. Note that the image_z does not include any image offsets, so z=0 will always be the lowest image plane. The input array will be modified.
- class organoid_tracker.image_loading.builtin_image_filters.MultiplyPixelsFilter(factor: float)
Bases:
ImageFilter
Increases the brightness of all pixels.
- copy()
Copies the filter, such that changes to this filter have no effect on the copy, and vice versa.
- filter(time_point, image_z, image: ndarray)
Filters the given input array, which is a grayscale array of 2 or 3 dimensions. If it is three dimensions, then image_z is None. Note that the image_z does not include any image offsets, so z=0 will always be the lowest image plane. The input array will be modified.
- class organoid_tracker.image_loading.builtin_image_filters.ThresholdFilter(noise_limit: float = 0.08)
Bases:
ImageFilter
Sets all pixels below a relative threshold to zero.
- copy() ImageFilter
Copies the filter, such that changes to this filter have no effect on the copy, and vice versa.
- filter(time_point, image_z, image: ndarray)
Filters the given input array, which is a grayscale array of 2 or 3 dimensions. If it is three dimensions, then image_z is None. Note that the image_z does not include any image offsets, so z=0 will always be the lowest image plane. The input array will be modified.
- organoid_tracker.image_loading.builtin_image_filters.create_min_max_filter(min_value: float, max_value: float) ImageFilter
Creates a filter that sets the min and max pixel values.
We implement this using the InterpolatedMinMaxFilter. When we supply only one point, it will not interpolate, and works perfectly fine as a simple min-max filter.