cellmil.features.extractor.morphological

Classes

MorphologicalExtractor(extractor_name)

Class to handle feature extraction.

MorphometricsExtractor()

Placeholder class for morphometric feature extraction.

PyRadiomicsExtractor([enable_all_features, mode])

Class to handle PyRadiomics feature extraction.

class cellmil.features.extractor.morphological.MorphologicalExtractor(extractor_name: ExtractorType)[source]

Bases: object

Class to handle feature extraction.

__init__(extractor_name: ExtractorType) None[source]

Initialize the Extractor with a PyRadiomics feature extractor.

extract_features(image: ndarray[Any, Any], mask: ndarray[Any, Any], debug: bool = False) dict[str, Any][source]

Extract features from the given image and mask.

class cellmil.features.extractor.morphological.PyRadiomicsExtractor(enable_all_features: bool = True, mode: Literal['gray', 'hed', 'hue'] = 'gray')[source]

Bases: object

Class to handle PyRadiomics feature extraction.

__init__(enable_all_features: bool = True, mode: Literal['gray', 'hed', 'hue'] = 'gray') None[source]

Initialize the PyRadiomics feature extractor.

Parameters:
  • enable_all_features – Whether to enable all feature classes or just shape2D

  • mode – ‘gray’ for grayscale, ‘hed’ for H channel from HED deconvolution

_preprocess(image: ndarray[Any, Any], mask: ndarray[Any, Any]) tuple[SimpleITK.Image, SimpleITK.Image][source]

Convert numpy arrays to SimpleITK images for PyRadiomics, with support for grayscale or HED-H channel.

extract_features(image: ndarray[Any, Any], mask: ndarray[Any, Any]) dict[str, float][source]

Extract features from the given image and mask.

class cellmil.features.extractor.morphological.MorphometricsExtractor[source]

Bases: object

Placeholder class for morphometric feature extraction.

extract_features(image: ndarray[Any, Any], mask: ndarray[Any, Any], magnification: float = 0.25) dict[str, float][source]

Extract morphometrics features from the given image and mask.