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

Removal of Cyst Label from segmentation #54

Open
dannyhow12 opened this issue May 3, 2022 · 1 comment
Open

Removal of Cyst Label from segmentation #54

dannyhow12 opened this issue May 3, 2022 · 1 comment

Comments

@dannyhow12
Copy link

Hi and a very good day,

Thank you for organising this challenge and in turn providing the annotated datasets.

I have a question here, if I would want to remove the cyst label from the segmentation mask, eg: the majority voting of aggregated_MAJ_seg.nii.gz, how can I perform such action?

I have tried manually removing the label 3 (assuming that cyst label is represented by label 3) with ITK snap's Label Editor, but however it does not seem to be able to remove it after I reopen the edited mask.

Would you please give some guidance on this

Best regards,
Danny

@neheller
Copy link
Owner

I would suggest you use a quick python script to do this. If you extract the "pixel data" from each nifti segmentation file as a numpy array called segdat and simply use segdat[segdat==3] = 1, then re-save the file, that should do the trick.

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

No branches or pull requests

2 participants