I am exporting a segmentation (as .seg.nrrd) from Slicer to Matlab using nrrdread function provided by Slicer Matlab Bridge. I realized that, when I plug in the coordinates of the reference MRI (specified as source geometry) I sometimes cannot replicate the segments as they are in Slicer. It is as if they are somewhat shifted or segmented, etc. It is not like the whole segmentation is read wrong in Matlab, because most of the coordinates are correct.
I just want to be able to replicate in Matlab what I am seeing in Slicer, so that when I plug in the coordinates of the MRI image I get the segment at that particular location.
Everything else seems consistent (sizes of the segmentation, names, etc.)
Any ideas ? I tried a bunch of things, eg., exporting the segmentation in different ways, labelmap,.nii, . But all have the same problem.