Features¶
- class cellector.features.FeaturePipeline(name: str, method: callable, dependencies: List[str])[source]¶
Bases:
objectPipeline that defines a feature computation method and its dependencies on attributes of roi_processor instances.
- name¶
Name of the feature pipeline.
- Type:
str
- method¶
Method that computes the feature, accepting an roi_processor instance as an input and returns a np.ndarray which associates each ROI with a feature value.
- Type:
callable
- dependencies¶
List of attributes of roi_processor that the feature computation method depends on.
- Type:
List[str]
- cellector.features.compute_phase_correlation(roi_processor: RoiProcessor, functional: bool = False) ndarray[source]¶
Compute the phase correlation between the masks and reference images.
- Parameters:
roi_processor (RoiProcessor) – The roi_processor instance to compute the phase correlation for.
functional (bool, optional) – Whether to compute the phase correlation between the masks and functional reference images. Default is False.
- Returns:
The phase correlation between the masks and reference images across planes.
- Return type:
np.ndarray
See also
utils.phase_correlation_zeroFunction that computes the phase correlation values.
- cellector.features.compute_dot_product(roi_processor: RoiProcessor, functional: bool = False) ndarray[source]¶
Compute the dot product between the masks and filtered reference images.
- Parameters:
roi_processor (RoiProcessor) – The roi_processor instance to compute the dot product for.
functional (bool, optional) – Whether to compute the dot product between the masks and functional reference images. Default is False.
- Returns:
The dot product between the masks and reference images across planes, normalized by the norm of the mask intensity values.
- Return type:
np.ndarray
See also
utils.dot_productFunction that computes the dot product values.
- cellector.features.compute_corr_coef(roi_processor: RoiProcessor, functional: bool = False) ndarray[source]¶
Compute the correlation coefficient between the masks and reference images.
- Parameters:
roi_processor (RoiProcessor) – The roi_processor instance to compute the correlation coefficient for.
functional (bool, optional) – Whether to compute the correlation coefficient between the masks and functional reference images. Default is False.
- Returns:
The correlation coefficient between the masks and reference images across planes.
- Return type:
np.ndarray
See also
utils.compute_correlationFunction that computes the correlation coefficient values.
- cellector.features.compute_in_vs_out(roi_processor: RoiProcessor, functional: bool = False) ndarray[source]¶
Compute the in vs. out feature for each ROI.
The in vs. out feature is the ratio of the dot product of the mask and reference image inside the mask to the dot product inside plus outside the mask.
- Parameters:
roi_processor (RoiProcessor) – The roi_processor instance to compute the in vs. out feature for.
functional (bool, optional) – Whether to compute the in vs. out feature between the masks and functional reference images. Default is False.
- Returns:
The in vs. out feature for each ROI.
- Return type:
np.ndarray
See also
utils.in_vs_outFunction that computes the in vs. out feature values.