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.
Hi, I try to use atlas from Anatomy toolbox v3.0--->ROI tool and cpp-roi to create individual rois.
After
prepareDataAndROI
step when usingcreateRoi('expand)
to create a roi, an error occurs said thatthe 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 inint16 format
. If rewrite it withfloat64
, above mentioned error disappeared.