Currently, the Topology Radiomics packages only supports nifty (.nii) images via nibabel.
volume = sitk.ReadImage("/path/to/volume.mha") # vol type is SimpleITK.SimpleITK.Image
features = rad.compute_morphology_features(volume, config)
volume = sitk.ReadImage("/path/to/volume.mha")
volume_np = sitk.GetArrayFromImage(volume) # vol_np type is numpy.ndarray
features = rad.compute_morphology_features(volume_np, config)
def compute_morphology_features(mri_mask_voxels: BinaryVoxelMask,
config: MorphologyConfig = MorphologyConfig()) -> MorphologyFeatures:
#mask = mri_mask_voxels.mri_voxel_mask # commented this line out because NumPy array does not have this object
mask = mri_mask_voxels