NGTDM#

class zrad.radiomics.ngtdm.NGTDM(aggr_dim, slice_weight=False, slice_median=False)[source]#

Neighbouring grey tone difference matrix features.

NGTDM features compare each discretized grey level with the average grey level in its local neighbourhood. They quantify coarseness, contrast, busyness, complexity, and strength.

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

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

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

Methods

calculate_features(discretized_image_array)

Calculate NGTDM features for a prepared discretized intensity array.

get_feature_names()

Return the NGTDM feature names produced by this calculator.

get_params()

Return the configuration parameters of this NGTDM calculator.

NGTDM.calculate_features(discretized_image_array)[source]#

Calculate NGTDM features for a prepared discretized intensity array.

Parameters:

discretized_image_array (numpy.ndarray) – Prepared discretized intensity array with voxels outside the ROI set to NaN.

Returns:

Mapping of NGTDM feature names to calculated values.

Return type:

dict

NGTDM.get_feature_names()[source]#

Return the NGTDM feature names produced by this calculator.

Returns:

Feature names defined for the NGTDM family.

Return type:

list of str

NGTDM.get_params()[source]#

Return the configuration parameters of this NGTDM calculator.

Returns:

Parameter names mapped to their configured values.

Return type:

dict