Mrcentre, different output after cropping

Hey @rsmith,

@Ziqian-Wang and I want to use mrcentre to obtain coordinates of rois as input for the -line argument of the tckresample command.

We have two roi files and a problem with our roi_pons.mif file.

When we calculate the center of mass using mrcentre in the scanner coordinate system we get a position somewhere in the cerebellum, outside of the roi.

‘Preprocessing’ the roi file using mrcrop with the same input image as a mask

mrcrop roi_pons.mif roi_pons_cropped.mif -mask roi_pons.mif

and using the cropped output with mrcentre gives correct coordinates.

Do you have an idea why there’s this difference in the mrcentre results? Do zero-valued voxels have an effect on the resulft of mrcentre?

Best Regards,
Darius

Hi Darius,

The mrcentre code is exceptionally simple, so there’s quite limited scope for anything to be going wrong so fundamentally. If cropping the image yields the correct solution, then the most obvious culprit is non-zero values elsewhere in the image that get omitted as a result of that cropping. But if you’re convinced that the issue is not so trivial, I probably need to see the raw data to diagnose.

Cheers
Rob