Skip to content

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

Description

@yyang1234

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions