you are right! Just fixed it.
thanks

On 2/18/2022 2:15 PM, Gomez, Daniel wrote:
> There is a minor bug/typo in mri_surf2vol that was leading to registration 
> issues if the "--fillribbon" flag is used, like in my case.
>
> https://github.com/freesurfer/freesurfer/blob/dev/mri_surf2vol/mri_surf2vol.cpp#L373
> The call to   MRIcopyHeader(OutVol,VtxVol); has to happen after the closing 
> of the if/else statement, otherwise the if branch (fillribbon) won't be 
> covered and the output vtxvol file will have a wrong header.
>
> Regards,
> Daniel
>
> "Gomez, Daniel" <dgom...@mgh.harvard.edu> writes:
>
>> Dear FS users,
>>
>> I’m trying to get surface indices from surfaces generated with recon-all 
>> into a
>> volume in native functional/EPI space. I’m using mri_surf2vol for that, 
>> though
>> if there is a better alternative solution, I’m happy to take it.
>>
>> My issue is that the output index volume (vtxvol) I get from mri_surf2vol 
>> does not seem to ever be properly aligned/registered with the target space.
>>
>> Here's the command I run (I'm interesting in vtxvol.nii.gz)
>>
>> mri_surf2vol  --reg anat2epi.dat  --hemi lh --vtxvol vtxvol.nii.gz 
>> --fillribbon --outvol foo.nii.gz --template epi.nii.gz --mkmask
>>
>> Upon further investigation, I learn I can’t get the projection to work 
>> properly even if I try projecting the surface onto the native anatomical 
>> space. As in:
>>
>> mri_surf2vol  --hemi lh --vtxvol vtxvol.nii.gz --fillribbon --outvol 
>> foo.nii.gz --template ../mri/orig.mgz --mkmask --identity sub-01
>>
>> Given the output vtxvol doesn't even have the same dimensions as the 
>> template specified in the command line, it makes me think I’m doing 
>> something wrong:
>>
>>> nib-ls vtxvol.nii.gz ../mri/orig.mgz
>> vtxvol.nii.gz   float32 [320, 320, 320] 1.00x1.00x1.00   sform
>> ../mri/orig.mgz  uint8  [320, 320, 320] 0.75x0.75x0.75
>>
>> What is the proper way to get vertex indices in EPI space?
>>
>> Thank you,
>>
>> Daniel
>

_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Reply via email to