Dear MRtrix experts,
I am creating an ROI mask and extract FA and MD values within the ROI mask. After creating the ROI mask based on FreeSurfer segmentation, I further created a threshold for CSF volume fraction above 50% using the below scripts.
mrthreshold -force CSF.nii.gz CSF_50.nii.gz -abs 0.5
mrcalc -force CSF_50.nii.gz 0 ROI.nii.gz -if cleaned_ROI.nii.gz
The problem is that the dimension of the ROI mask changed after creating the threshold like below.
Before
Image: “ROI.nii.gz”
Dimensions: 140 x 140 x 84
Voxel size: 1.5 x 1.5 x 1.5
Data strides: [ -1 -2 3 ]
Format: NIfTI-1.1 (GZip compressed)
Data type: 32 bit float (little endian)
Intensity scaling: offset = 0, multiplier = 1
Transform: 1 1e-16 -5.446e-17 -103.3
-1e-16 0.8387 -0.5446 -46.09
-0 0.5446 0.8387 -86.25
After
Image: “cleaned_ROI.nii.gz”
Dimensions: 140 x 140 x 84 x 65
Voxel size: 1.5 x 1.5 x 1.5 x ?
Data strides: [ -1 -2 3 4 ]
Format: NIfTI-1.1 (GZip compressed)
Data type: 32 bit float (little endian)
Intensity scaling: offset = 0, multiplier = 1
Transform: 1 1e-16 -5.446e-17 -103.3
-1e-16 0.8387 -0.5446 -46.09
-0 0.5446 0.8387 -86.25
So when I was using fslstats to extract the values, there was an error message saying “Mask and image must be the same size”. The ROI extraction worked well before thersholding. Could you please advise how to resolve this?
Best,
JW