Hello FreeSurfer Developers,
I am having difficulty trying to convert mrVista-defined ROIs in matlab into FreeSurfer label files. I'm starting with an atlas.mgz file (containing subject-specific visual ROIs based on the Kastner FreeSurfer atlas), and I should note that I can successfully make ROI .label files in FreeSurfer from this .mgz file using successive calls to mri_vol2surf and mri_cor2label. For reference, when I do this for the first Kastner ROI, the resulting label correctly has 1591 label voxels.
However, part of my pipeline involves intersecting these ROIs with a localizer ROI that was defined in mrVista. To do this, I first convert the atlas.mgz file to .nii.gz using mri_convert as follows:
mri_convert lh.atlas.mgz lh.atlas.nii.gz --reslice_like subject_t1.nii.gz --resample_type nearest --out_data_type int --no_scale 1
After intersecting with the localizer in matlab, when I save a new .nii.gz file, convert back to .mgz, and run mri_vol2surf and mri_cor2label, I get the following error in mri_cor2label: ERROR: found no voxels matching id 1.
To try to keep this short... as a sanity check I tried simply converting the lh.atlas.nii.gz file that pops out of the mri_convert step above directly back into .mgz (without modifying the .nii.gz file at all):
mri_convert lh.atlas.nii.gz lh.atlas_reconverted.mgz --reslice_like subject_t1.nii.gz --resample_type nearest --out_data_type int --no_scale 1
When I run mri_vol2surf and mri_cor2label on the resulting lh.atlas_reconverted.mgz file, I don't get an error, but the resulting label file for the first Kastner ROI incorrectly finds 111 label voxels, none of which overlap with the correct 1591 label voxels above.
So it appears that I'm making at least one mistake in the mri_convert step from nii.gz to .mgz above, but I'm struggling to figure out what it is. Any guidance on this would be greatly appreciated!
1) FreeSurfer version: freesurfer-Darwin-lion-stable-pub-v5.3.0
2) Platform: Mac OSX 10.11.6
3) Darwin Jeffreys-MacBook-Pro.local 15.6.0 Darwin Kernel Version 15.6.0: Thu Jun 23 18:25:34 PDT 2016; root:xnu-3248.60.10~1/RELEASE_X86_64 x86_64
4) recon-all.log: see attached for example subject