-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Imaging Format Compatibility #16
Comments
@tgd15 - I just looked over the code and realized that we wanted to make the package bare bones. We planned to only support numpy arrays. Loading of other MRI images would be done by some external functions and packages written by the user of the package. For example, the code you have above can convert to numpy arrays from SimpleITK formats. However, looking at the code above, it looks like you are using the function incorrectly It could be something like this: import topology_radiomics as rad
sitk_volume = sitk.ReadImage("/path/to/volume.mha")
volume = sitk.GetArrayFromImage(volume)
sanitized_voxels = rad.convert_volume_into_mask(
volume, merge_labels=[])
features_data = rad.compute_morphology_features(sanitized_voxels) or something like this: import topology_radiomics as rad
sitk_volume = sitk.ReadImage("/path/to/volume.mha")
volume = sitk.GetArrayFromImage(volume)
sanitized_voxels = rad.BinaryVoxelMask(volume)
features_data = rad.compute_morphology_features(sanitized_voxels) We have some references for loading data and using other packages in the tutorial notebooks: If you want, we can add another notebook for SimpleITK. |
Hello, |
Currently, the Topology Radiomics packages only supports nifty (.nii) images via nibabel.
Sometimes, the labs use the .mha or .mhd imaging formats. Could you please add SimpleITK and/or NumPy support in the
compute_morphology_features
function to expand imaging format compatibility?SimpleITK example:
NumPy Array from SimpleITK example:
To pass a NumPy array from SimpleITK into the
compute_morphology_features
function, I made the following change:The text was updated successfully, but these errors were encountered: