GLCM#

class zrad.radiomics.glcm.GLCM(aggr_dim, aggr_method, slice_weight=False, slice_median=False)[source]#

Grey level co-occurrence matrix features.

GLCM features summarize how often pairs of discretized grey levels occur at fixed neighbour offsets. The class supports IBSI-style 2D, 2.5D, and 3D directional aggregation.

Parameters:
  • aggr_dim ({"2D", "2.5D", "3D"}) – Spatial dimensionality used to build co-occurrence matrices.

  • aggr_method ({"MERG", "AVER", "SLICE_MERG", "DIR_MERG"}) – Strategy used to combine matrices across directions and slices.

  • slice_weight (bool, default=False) – Weight slice-wise averages by slice ROI voxel count.

  • slice_median (bool, default=False) – Aggregate slice-wise values by median instead of mean.

Methods

calculate_features(discretized_image_array)

Calculate GLCM features for a prepared discretized intensity array.

get_feature_names()

Return the GLCM feature names produced by this calculator.

get_params()

Return the configuration parameters of this GLCM calculator.

GLCM.calculate_features(discretized_image_array)[source]#

Calculate GLCM features for a prepared discretized intensity array.

Parameters:

discretized_image_array (numpy.ndarray) – Prepared discretized intensity array with ROI voxels represented by integer grey levels and voxels outside the ROI set to NaN.

Returns:

Mapping of GLCM feature names to calculated values.

Return type:

dict

GLCM.get_feature_names()[source]#

Return the GLCM feature names produced by this calculator.

Returns:

Feature names defined for the GLCM family.

Return type:

list of str

GLCM.get_params()[source]#

Return the configuration parameters of this GLCM calculator.

Returns:

Parameter names mapped to their configured values.

Return type:

dict