slitflow.loc.convert module
- class LocalMax2Xy(info_path=None)[source]
Bases:
TableConvert nonzero local max pixels to X,Y-coordinate.
Caution
The input image should be split into a single frame image. In other words, the shape of reqs[0] in
process()should be (1, height, width).- Parameters:
- Returns:
X,Y-coordinate of local max pixels
- Return type:
- static process(reqs, param)[source]
Convert nonzero local max pixels to X,Y-coordinate.
- Parameters:
reqs[0] (numpy.ndarray) – Numpy 3D array with the shape of (1, height, width).
param["length_unit"] (str) – Unit string for column names such as “um” and “nm”.
param["pitch"] (float) – Length per pixel.
- Returns:
X,Y-coordinate of local max pixels
- Return type:
- class LocalMax2XyWithDoG(info_path=None)[source]
Bases:
TableConvert nonzero local max pixels to X,Y-coordinate with DoG filter.
- Parameters:
reqs[0] (Image) – Image to apply the filter to. Required parameters;
length_unit,pitch.param["wavelength"] (int) – Emission wavelength in length_unit.
param["NA"] (float) – Numerical aperture.
param["size_factor"] (float, optional) – Particle size factor to multiply PSF size. Defaults to 1.
param["mask_factor"] (float, optional) – Mask size factor to multiply PSF diameter. Defaults to 1.
param["split_depth"] (int) – File split depth number.
- Returns:
X,Y-coordinate of detected local max
- Return type:
- static process(reqs, param)[source]
Convert nonzero local max pixels to X,Y-coordinate with DoG filter.
- Parameters:
reqs[0] (numpy.ndarray) – Image to apply the filter to. The image should have the shape of (frame number, height, width).
param["dog_sd1"] (float) – Standard deviation of the first Gaussian filter.
param["dog_sd2"] (float) – Standard deviation of the second Gaussian filter.
param["mask_size"] (int) – Mask size factor to multiply PSF diameter.
param["length_unit"] (str) – Unit string for column names such as “um” and “nm”.
param["pitch"] (float) – Length per pixel.
- Returns:
X,Y-coordinate of local max pixels
- Return type: