PYME.localization.ofind module¶
- class PYME.localization.ofind.ObjectIdentifier(data, filterMode='fast', filterRadiusLowpass=1, filterRadiusHighpass=3, filterRadiusZ=4)¶
Bases:
list
Creates an Identifier object to be used for object finding, takes a 2D or 3D slice into a data stack (data), and a filtering mode (filterMode, one of [“fast”, “good”]) where “fast” performs a z-projection and then filters, wheras “good” filters in 3D before projecting. The parameters filterRadiusLowpass and filterRadiusHighpass control the bandpass filter used to identify ‘point-like’ features. filterRadiusZ is the radius used for the axial smoothing filter
- FindObjects(thresholdFactor, numThresholdSteps='default', blurRadius=1.5, mask=None, splitter=None, debounceRadius=4, maskEdgeWidth=5, upperThreshFactor=0.5, discardClumpRadius=0)¶
Finds point-like objects by subjecting the data to a band-pass filtering (as defined when creating the identifier) followed by z-projection and a thresholding procedure where the threshold is progressively decreased from a maximum value (half the maximum intensity in the image) to a minimum defined as [thresholdFactor]*the mode (most frequently occuring value, should correspond to the background) of the image. The number of steps can be given as [numThresholdSteps], with defualt being 5 when filterMode=”fast” and 10 for filterMode=”good”. At each step the thresholded image is blurred with a Gaussian of radius [blurRadius] to approximate the image of the points found in that step, and subtracted from the original, thus removing the objects from the image such that they are not detected at the lower thresholds. This allows the detection of objects which are relatively close together and spread over a large range of intenstities. A binary mask [mask] may be applied to the image to specify a region (e.g. a cell) in which objects are to be detected.
A copy of the filtered image is saved such that subsequent calls to FindObjects with, e.g., a different thresholdFactor are faster.
- class PYME.localization.ofind.OfindPoint(x, y, z=None, detectionThreshold=None)¶
Bases:
object
Creates a point object, potentially with an undefined z-value.
- class PYME.localization.ofind.PseudoPointList(parent, varName)¶
Bases:
object
- PYME.localization.ofind.calc_gauss_weights(sigma)¶
calculate a gaussian filter kernel (adapted from scipy.ndimage.filters.gaussian_filter1d)