Hi Chris, you're almost there. There are a few mods I'd make to your stream:

1. You can run preproc-sess -s subXX -fsd rest -surface self lhrh -fwhm 0
(without the -mni305 since you are working in the subject's anatomy)
2. mri_segstats \
--annot subXX lh myaparcPXXXXXX \
--i $FUNCTIONALS_DIR/subXX/rest/001/fmcpr.lh.self.nii.gz \
--sum lh_1_16.sum.txt \
--avgwf lh_1_16.wav.txt

So you pass mri_segstats the surface data and the annotation

doug


On 12/04/2012 11:11 AM, Chris McNorgan wrote:
> Hi all. I have a question regarding the use of freesurfer + fs-fast 
> preprocessing to apply the Lausanne 2008 parcellation scheme to some 
> structural data, and then extract from those ~1000 ROIs the average 
> time series from a 4D resting state functional run.
>
> I'm posting what I have carried out so far, both to verify that I 
> haven't missed anything important, but also because I have seen 
> evidence within this and other mailing lists that others are 
> interested in doing something similar. This thread may then answer 
> their questions as well.
>
> Structural and functional data is in $SUBJECTS_DIR/sub00?/mri and 
> $FUNC_DIR/sub00?/rest, respectively
> For each subject:
>
>   * I carried out recon-all -autorecon1, -autorecon2, -autorecon 3,
>     checking data quality in between
>   * inspected ?h.aparc.annot, possibly made minor edits (
>     https://surfer.nmr.mgh.harvard.edu/fswiki/tksurfer_labeledit)
>   * used cmtk.Parcellate() with the Lausanne 2008 scheme (
>     https://groups.google.com/forum/#!topic/cmtk-users/k_o3s8Yy2jQ)
>     <https://groups.google.com/forum/#%21topic/cmtk-users/k_o3s8Yy2jQ>
>   * This created a number of .label files and some .annot files,
>     notably ?h.myaparcP*.annot, which have sub-parcellations of the
>     1-16, 17-28 and 29-36 regions indicated in the ?h.aparc.annot
>     files (I'm not entirely clear why they couldn't just go into a
>     single .annot file)
>   * Converted the .annot files to surface space using mri_aparc2aseg
>     --subXX --annot myaparcPXXXXXX which generated
>     myaparcPXXXXX+aseg.mgz (3 files total, as each of three sets of lh
>     and rh annot files describe both hemispheres in a single file)
>   * ran each of the functional runs through:
>     preproc-sess -s subXX -fsd rest -surface self lhrh -mni305 -fwhm 0
>
> That brings me to my question. I have my functional data:
> $FUNC_DIR/subXX/rest/001/fmcpr.siemens.sm0.mni305.2mm.nii.gz (I also 
> have 2 fmcpr.siemens.sm0.self.?h.nii.gz files, but they didn't work 
> either)
>
> I want to pull the average timeseries data for the functional data out 
> of the ROIs defined in myaparcP1_17+aseg.mgz (and similarly for the 
> other two myaparcP*.mgz files)
>
> I tried
> mri_segstats \
> --seg $SUBJECTS_DIR/subXX/mri/myaparcP1_16+aseg.mgz \
> --i $FUNCTIONALS_DIR/subXX/rest/001/fmcpr.siemens.sm0.mni305.2mm.nii.gz \
> --annot subXX lh lh.myaparcP1_16.annot \
> --sum lh_1_16.sum.txt \
> --avgwf lh_1_16.wav.txt
>
> However, this gave me the following output:
>
> sysname  Linux
> hostname Sage
> machine  x86_64
> user     chris
> Loading /home/chris/resting/anat/subXX/mri/myaparcP1_16+aseg.mgz
> Loading 
> /home/chris/resting/func/subXX/rest/001/fmcpr.siemens.sm0.mni305.2mm.nii.gz
> ERROR: dimension mismatch between input volume and seg
>   input 76 76 93
>   seg   256 256 256
>
> I then tried resampling my resting state data with mri_vol2vol using 
> my func data as the --mov parameter, and my myaparc files as the 
> --targ parameter, and used tkregister2 on the resampled volume. 
> mri_segstats just hung when I ran it on the resampled volume; by the 
> next morning nothing had been written to either text output file.
>
> I can open my ?h surface files in tksurfer, and then load in the 
> appropriate timecourse 
> ($FUNCTIONALS_DIR/subXX/rest/001/fmcpr.siemens.sm0.self.?h.nii.gz) and 
> when I do so, I can click on various vertices and see timecourse 
> plots. And I can paint my surfaces with .annot files that define my 
> ROIs.  So it seems I should be able to get these timecourse data from 
> ROIs in surface space without making a thousand individual ROIs in 
> volumetric space (my guess is I'd use flsmaths on my myaparc files to 
> do this). But I am not clear if mri_segstats can be used in this way, 
> or if indeed it is the appropriate tool.
>
> Any assistance to get me through this last step would be appreciated.
>
> Thanks
>
>
> _______________________________________________
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

-- 
Douglas N. Greve, Ph.D.
MGH-NMR Center
gr...@nmr.mgh.harvard.edu
Phone Number: 617-724-2358
Fax: 617-726-7422

Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
FileDrop: www.nmr.mgh.harvard.edu/facility/filedrop/index.html
Outgoing: ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/

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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.

Reply via email to