External Email - Use Caution
Thanks Tim and Doug.

I have the files generating and loading properly now, but I'm not convinced it's giving the output I'm looking for.

I am trying to convert the "fsaverage" subject's surface coordinates to my own subject's surface space.

FSaverage's lh.white file is 5898808 bytes:

5898808 Apr 11  2013 /usr/local/freesurfer/subjects/fsaverage/surf/lh.white

After converting with this command:

mri_surf2surf --hemi lh --srcsubject fsaverage --sval-xyz white --trgsubject fs_target --tval-xyz {input_dir}/T1_nifti.nii.gz --trgsurfval {output_dir}/registered_lh.white

My newly registered lh.white file is half the size:

3316997 May  6 10:41 /home/ian/cdm_registered_test/registered_lh.white

(and appears to have half the vertices accordingly.)

So this must be incorrect, or at least not my intended purpose.

To try and be clear, I'm looking to get the position of every vertex in fsaverage's surfaces "on" the surface of my subject's surfaces.  So if there's a vertex at the peak of a particular sulcii on fsaverage, I'm looking to find where the peak of that sulcii is on my subject.

Thanks,
Ian

On 06/05/2020 09:08, Tim Schäfer wrote:
         External Email - Use Caution

Just a note: there should be no need to convert to gifti, nibabel can read the 
FreeSurer binary surface format directly with 
`nibabel.freesurfer.io.read_geometry()`.

The docs are here: 
https://nipy.org/nibabel/reference/nibabel.freesurfer.html#nibabel.freesurfer.io.read_geometry

Best,

Tim

On May 5, 2020 at 7:59 PM "Douglas N. Greve" <dgr...@mgh.harvard.edu> wrote:


You should load the surfaces in FV. If it load in FV ok but nibable is
crashing, you should contact them.

On 5/5/2020 1:05 PM, Ian Hardingham wrote:
         External Email - Use Caution

Thank you both.

I've made edits and these are the current commands:

mri_surf2surf --hemi lh --srcsubject fsaverage --sval-xyz white
--trgsubject fs_target --tval-xyz {input_dir}/T1_nifti.nii.gz
--trgsurfval {output_dir}/registered_lh.white
mri_surf2surf --hemi rh --srcsubject fsaverage --sval-xyz white
--trgsubject fs_target --tval-xyz {input_dir}/T1_nifti.nii.gz
--trgsurfval {output_dir}/registered_rh.white
mri_surf2surf --hemi lh --srcsubject fsaverage --sval-xyz pial
--trgsubject fs_target --tval-xyz {input_dir}/T1_nifti.nii.gz
--trgsurfval {output_dir}/registered_lh.pial
mri_surf2surf --hemi rh --srcsubject fsaverage --sval-xyz pial
--trgsubject fs_target --tval-xyz {input_dir}/T1_nifti.nii.gz
--trgsurfval {output_dir}/registered_rh.pial

These execute successfully and the file size looks about right, but
after using mris_convert to convert to Gifti format nibabel crashes on
trying to load them - is there anything obviously wrong in my commands?

I'll also take a look at mris_apply_reg.

On 05/05/2020 18:01, Douglas N. Greve wrote:
Don't specify a --trg_type. But add --tval-xyz
mris_apply_reg will do the same thing, but the interface might be a
little easier

On 5/5/2020 12:49 PM, Bruce Fischl wrote:
no definitely not "w" format, which we don't use for anything
anymore. YOu should use tval-xyz also I think
On Tue, 5 May 2020, Ian Hardingham wrote:

         External Email - Use Caution

It would appear not, as I'm getting an error on my pial output
files but not
my white ones.  Here are my commands:

mri_surf2surf --hemi lh --srcsubject fsaverage --sval-xyz white
--trgsubject
fs_target --trgsurfval ./registered_lh.white --trg_type w
mri_surf2surf --hemi rh --srcsubject fsaverage --sval-xyz white
--trgsubject
fs_target --trgsurfval ./registered_rh.white --trg_type w
mri_surf2surf --hemi lh --srcsubject fsaverage --sval-xyz pial
--trgsubject
fs_target --trgsurfval ./registered_lh.pial --trg_type w
mri_surf2surf --hemi rh --srcsubject fsaverage --sval-xyz pial
--trgsubject
fs_target --trgsurfval ./registered_rh.pial --trg_type w

The white calls output seems to be fine, but the pial ones aren't.  I
somewhat naively trued trg_type pial but that wasn't correct.

On 05/05/2020 17:33, Ian Hardingham wrote:

       Thanks Bruce, extremely helpful.

       Can I just check that the "w" format is what is used by both the
       lh/rh.pial and the lh/rh.white files?  I only ask because my
       surf2surf command outputs the exact output filename if the end
       is ".white", but if it's ".pial" it outputs ".pial.w", which I
       find a little curious.

       Ian

       On 05/05/2020 16:34, Bruce Fischl wrote:
       yes, check out options like:
       --sval-xyz

       if you need further help though I'll have to defer to Doug
       :)
       Bruce


       On Tue, 5 May 2020, Ian Hardingham wrote:


                     External Email - Use Caution

             Bruce, I've read the docs on mri_surf2surf - I
             wish to get surface files out
             (again, lh.pial, rh.pial, lh.white, and
             rh.white) rather than values for
             something such as thickness - is there an
             option for mri_surf2surf to allow
             this?

             On 05/05/2020 14:43, Bruce Fischl wrote:
                   Hi Ian

                   you can use mri_surf2surf to map
             surfaces between subjects, but
                   our atlas isn't really a surface. You
             can use the surfaces in
                   the fsaverage dir, but they are meant
             for visualization and are
                   much smoother than individuals

                   cheers
                   Bruce


                   On Tue, 5 May 2020, Ian wrote:


                                 External Email - Use
             Caution

                         Hi Freesurfers.

                         I have a subject S with recon-all
             having been run on
                         it.

                         I have the subject-specific
             surface files
                         /surf/lh.pial, rh.pial, lh.white,
                         and rh.white.

                         I would like an Atlas's lh.pial,
             rh.pial, lh.white,
                         and rh.white in subject
                         space.

                         Any helpers on how to achieve
             this?

                         Thanks,
                         Ian

                         --

                         Ian Hardingham





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




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



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

_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
--
Dr. Tim Schäfer
Postdoc Computational Neuroimaging
Department of Child and Adolescent Psychiatry, Psychosomatics and Psychotherapy
University Hospital Frankfurt, Goethe University Frankfurt am Main, Germany

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

*Ian Hardingham*

Chief Technology Officer

signature_873986710

ian.harding...@oxfordbraindiagnostics.com <mailto:terry.poll...@oxfordbraindiagnostics.com>

+44 (0)7789 770555

Oxford Centre for Innovation | New Road | Oxford | OX1 1BY

Oxford Brain Diagnostics Ltd is a company registered in England and Wales | Company No. 11703979 | VAT No. 321 3026 62

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

Reply via email to