Skip to content
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

ENH: Implement force-cast while loading mask #431

Merged
merged 2 commits into from Oct 3, 2018

Conversation

JoostJM
Copy link
Collaborator

@JoostJM JoostJM commented Oct 1, 2018

PyRadiomics requires the mask to be of an integer data type. Force type to UInt32 upon load from file (string input), or apply a Cast (SimpleITK.Image input).

Remove now unnecessary cast in imageoperations.cropToTumorMask.

fixes #430
cc @Radiomics/developers

@JoostJM JoostJM force-pushed the force-cast-mask branch 3 times, most recently from 29d4057 to 5538420 Compare October 2, 2018 15:13
PyRadiomics requires the mask to be of an integer data type. Force type to UInt32 upon load from file (string input), or apply a Cast (SimpleITK.Image input).

Remove now unnecessary cast in `imageoperations.cropToTumorMask`
When force casting to sitk.UInt32, the mask hash is changed for the breast and lung test cases. Update the mask hash in the baseline and force cast the mask prior to hashing in the testUtils to retain consistency with the feature extractor output.
@JoostJM JoostJM merged commit 1d8c1d2 into AIM-Harvard:master Oct 3, 2018
@JoostJM JoostJM deleted the force-cast-mask branch October 3, 2018 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Floating scalar type mask causes runtime error
1 participant