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

atlas from Anatomy toolbox v3.0 doesn't work well with cpp_roi #92

Open
yyang1234 opened this issue Apr 3, 2023 · 2 comments
Open

atlas from Anatomy toolbox v3.0 doesn't work well with cpp_roi #92

yyang1234 opened this issue Apr 3, 2023 · 2 comments

Comments

@yyang1234
Copy link

Hi, I try to use atlas from Anatomy toolbox v3.0--->ROI tool and cpp-roi to create individual rois.

After prepareDataAndROI step when using createRoi('expand) to create a roi, an error occurs said that
the image:../src/inputs/JuBrain_ROIs/space-MNI_label-leftAG_desc-p00pt00_mask.nii must be a binary image. It seems to more than ones and zeros. Error in createRoi (line 174) isBinaryMask(roiImage);

But this mask should be a binary mask because it has already been binarised using thresholdToMask. After checking with isBinaryMask.m, I found that the mask is binarised as [0, 1.000] instead of [0, 1]. As isBinaryMask.m only considers a mask contain [0,1] as a binary mask, an error occurs.

It might related to the data type of atlas from Anatomy toolbox? checked atlas with spm_vol found that it was in int16 format. If rewrite it with float64, above mentioned error disappeared.

@Remi-Gau
Copy link
Contributor

@all-contributors please add @yyang1234 for bug, userTesting

Copy link
Contributor

@Remi-Gau

I've put up a pull request to add @yyang1234! 🎉

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