try this

mri_label2vol \  --label $SUBJECTS_DIR/B201_mprage/label/lh.V1_exvivo.label \  --temp /Users/caramazzalab/Desktop/Jess/Subjects/B201_mprage/mri/orig.mgz \  --regheader /Users/caramazzalab/Desktop/Jess/Subjects/B201_mprage/mri/orig.mgz \  --fillthresh .3 \  --proj frac 0 1 .1 \  --subject B201_mprage --hemi lh\  --o lh.V1_exvivo.mgz


On 7/28/17 3:30 PM, Jessica Huang wrote:
Hi Dr. Greeve,

I'm certainly making progress with your suggestions but I still seem to be missing information. Overall, the volume I create is either not aligned with the brain itself (namely, the volume for V1 is around the neck if I pass an anatomical scan into mri_label2vol) or the volume I create is in the wrong file type and isn't being recognized as a mgz file (when I pass in functional data into mri_label2vol, the volume is in the right spot in the brain this time and I assume the resulting volume is also functional in nii.gz format; but, like you mentioned, fcseed-config requires an mgh/mgz file which is not my nifti file. It seems to have loaded but I'm still getting an error that fcseed-sess is reading 0 segmentations). To elaborate:

Pass 1:
In an effort to make the binary volume in anatomical space you described, I passed an anatomical scan (orig.mgz) and a registration to the functional data (register.dof6.dat~) into the command mri_label2vol:

mri_label2vol \  --label $SUBJECTS_DIR/B201_mprage/label/lh.V1_exvivo.label \  --temp /Users/caramazzalab/Desktop/Jess/Subjects/B201_mprage/mri/orig.mgz \  --reg /Users/caramazzalab/Desktop/Jess/V1_REST_STUDY/dicomdir/B101/bold/register.dof6.dat~ \  --fillthresh .3 \  --proj frac 0 1 .1 \  --subject B201_mprage --hemi lh\  --o lh.V1_exvivo.mgz
However, the outputted volume was not in the right location in the brain. Instead, the volume was overlaid around the neck instead of truly at V1.

Inline image 1
^notice how the volume (where the red cross is) is not in the brain

Pass 2:
In an effort to align the volume with the brain, I reran the mri_label2vol command using functional data and a functional volume output (according to file extension and documentation of what the argument --temp dictates):

mri_label2vol \  --label $SUBJECTS_DIR/B201_mprage/label/lh.V1_exvivo.label \  --temp /Users/caramazzalab/Desktop/Jess/V1_REST_STUDY/dicomdir/B101/bold/001/f.nii.gz \  --reg /Users/caramazzalab/Desktop/Jess/V1_REST_STUDY/dicomdir/B101/bold/register.dof6.dat~ \  --fillthresh .3 \  --proj frac 0 1 .1 \  --subject B201_mprage --hemi lh\  --o lh.V1_exvivo.nii.gz
This functional data argument yielded an ROI in the right place (seen in this figure).

Inline image 2
^notice how passing in the functional data created a nice overlay of V1 in the brain on orig.mgz

But this functional volume in format .nii.gz wouldn't do for the next steps of inputs for fcseed-config to be run in fcseed-sess command Namely, as you may know, the fcseed-config and fcseed-sess command looks for .mgz files for segmentations. Notice this error below when trying to use the .nii.gz volume:
------

[ERROR: loading aseg /Users/caramazzalab/Desktop/Jess/Subjects/B201_mprage/mri/lh.V1.mgz]

------



Pass 3:
So I passed in the functional data to align the volume and I changed the output command to a file extension .mgz:

mri_label2vol \  --label $SUBJECTS_DIR/B201_mprage/label/lh.V1_exvivo.label \  --temp /Users/caramazzalab/Desktop/Jess/V1_REST_STUDY/dicomdir/B101/bold/001/f.nii.gz \  --reg /Users/caramazzalab/Desktop/Jess/V1_REST_STUDY/dicomdir/B101/bold/register.dof6.dat~ \  --fillthresh .3 \  --proj frac 0 1 .1 \  --subject B201_mprage --hemi lh\  --o lh.V1_exvivo.mgz
But again, smoke but no cigar. Same error through running the fcseed-sess command:
------

Found   1 segmentations

Computing statistics for each segmentation


Reporting on   0 segmentations

Using PrintSegStat

Computing spatial average of each frame


ERROR: no voxels found in segmentation

------

It seems like pass 1 of mri_label2vol (passing in and outputting anatomical data) is most consistent with your email but the volume produced is not aligned with the subject brain. Would you have insight into why the anatomical mgz file is not aligned with the orig mgz file?

Thank you again Dr. Greeve,
Jess

On Thu, Jul 27, 2017 at 1:17 PM, Douglas N Greve <greve@nmr.mgh.harvard.edu> wrote:
Those labels should exist in your individual subject's label folder.
There should be a V1 label in there too. You can use mri_label2vol to
create a binary volume in the anatomical space (this will be a volume
where voxels values are either 1 (in V1) or 0 (out of V1)). This volume
will be 256^3, 1mm3, and should go into the subject/mri folder (eg,
lh.V1.mgz). When you run fcseed-config, specify -seg lh.V1.mgz -segid 1


On 07/27/2017 11:08 AM, Jessica Huang wrote:
> Hi Dr. Greeve,
>
> Would the following commands be enough to map my regions of interest
> from the fsaverage map to my individual subjects?:
>
> https://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/AnatomicalROI
>
> Namely, the following bits of code:
>
> cd $SUBJECTS_DIR
> mri_label2label \
>    --srcsubject fsaverage \
>    --srclabel fsaverage/label/lh.BA45.label \
>    --trgsubject 004 \
>    --trglabel 004/label/lh.BA45.label \
>    --hemi lh \
>    --regmethod surface
>
> On Thu, Jul 27, 2017 at 10:37 AM, Jessica Huang
> <jessica_huang@college.harvard.edu
> <mailto:jessica_huang@college.harvard.edu>> wrote:
>
>     Hi Dr. Greeve,
>
>     Oh I see, thank you for the fix for V1. To probe further, I'm
>     curious why the visual areas weren't implemented? Is there an
>     additional step I could take to access other regions in the visual
>     hierarchy such as V2, V3, and V5?
>
>     Thanks for your insight Dr. Greeve,
>     Jess
>
>     On Jul 26, 2017 5:37 PM, "Douglas N Greve"
>     <greve@nmr.mgh.harvard.edu <mailto:greve@nmr.mgh.harvard.edu>> wrote:
>
>         By default, you are using aparc+aseg.mgz as the ROI atlas, so
>         use 1021
>         or 2021 for V1.
>
>         1021    ctx-lh-pericalcarine                120 100 60  0
>
>
>         On 07/26/2017 12:37 PM, Jessica Huang wrote:
>         >
>         > Hi freesurfer experts,
>         >
>         >
>         > I’m using the fcseed-config and fcseed-sess commands to
>         create a seed
>         > at V1 in accordance with the FsFastFunctionalConnectivity
>         Walkthrough
>         >
>         <http://surfer.nmr.mgh.harvard.edu/fswiki/FsFastFunctionalConnectivityWalkthrough
>         <http://surfer.nmr.mgh.harvard.edu/fswiki/FsFastFunctionalConnectivityWalkthrough>>Steps:
>         >
>         >
>         > *STEP 4: Use fcseed-config to configure the parameters you
>         wish to
>         > pass to your connectivity analysis.Sample command: fcseed-config
>         > -segid 1010 -fcname L_Posteriorcingulate.dat -fsd bold -mean
>         -cfg
>         > mean.L_Posteriorcingulate.config*STEP 5: Create the FC seed
>         for an
>         > individualfcseed-sess  -s sessionid -cfg
>         L_Posteriorcingulate.config
>         >
>         > V1 corresponds to the number 400 in
>         > $FREESRUFER_HOME/FreeSurferColorLUT.txt. The subject session I’m
>         > running is B101. The data is rest data but I named the file
>         bold.
>         > Overall, with this information specific to my data, I ran the
>         > following commands:
>         >
>         >
>         > INPUT
>         >
>         > $ fcseed-config -segid 400 -fcname V1.dat -fsd bold -mean -cfg
>         > mean.V1.config
>         >
>         > OUTPUT
>         >
>         > fcname is V1.dat
>         >
>         > fcseed-config done
>         >
>         >
>         > INPUT
>         >
>         > $ fcseed-sess  -s B101 -cfg mean.V1.config
>         >
>         > OUTPUT
>         >
>         > Logfile is
>         >
>         /Users/caramazzalab/Desktop/Jess/V1_REST_STUDY/dicomdir/log/fcseed-sess.V1.dat.log.B101
>         >
>         > Wed Jul 26 12:27:17 EDT 2017
>         >
>         > Darwin Caramazza-Labs-Mac-Pro.local 16.6.0 Darwin Kernel Version
>         > 16.6.0: Fri Apr 14 16:21:16 PDT 2017;
>         > root:xnu-3789.60.24~6/RELEASE_X86_64 x86_64
>         >
>         > setenv SUBJECTS_DIR /Users/caramazzalab/Desktop/Jess/Subjects
>         >
>         > cd /Users/caramazzalab/Desktop/Jess/V1_REST_STUDY/dicomdir
>         >
>         > /Applications/freesurfer/fsfast/bin/fcseed-sess
>         >
>         > -s B101 -cfg mean.V1.config
>         >
>         > freesurfer-Darwin-OSX-stable-pub-v6.0.0-2beb96c
>         >
>         > Wed Jul 26 12:27:17 EDT 2017
>         >
>         > Darwin Caramazza-Labs-Mac-Pro.local 16.6.0 Darwin Kernel Version
>         > 16.6.0: Fri Apr 14 16:21:16 PDT 2017;
>         > root:xnu-3789.60.24~6/RELEASE_X86_64 x86_64
>         >
>         > setenv SUBJECTS_DIR /Users/caramazzalab/Desktop/Jess/Subjects
>         >
>         > cd /Users/caramazzalab/Desktop/Jess/V1_REST_STUDY/dicomdir
>         >
>         > /Applications/freesurfer/fsfast/bin/fcseed-sess
>         >
>         > -s B101 -cfg mean.V1.config
>         >
>         > freesurfer-Darwin-OSX-stable-pub-v6.0.0-2beb96c
>         >
>         >
>         > mri_label2vol --seg
>         >
>         /Users/caramazzalab/Desktop/Jess/Subjects/B201_mprage/mri/aparc+aseg.mgz
>         > --reg
>         >
>         /Users/caramazzalab/Desktop/Jess/V1_REST_STUDY/dicomdir/B101/bold/001/register.dof6.lta
>         > --temp
>         >
>         /Users/caramazzalab/Desktop/Jess/V1_REST_STUDY/dicomdir/B101/bold/001/template.nii.gz
>         > --fillthresh .5 --o
>         >
>         /Users/caramazzalab/Desktop/Jess/V1_REST_STUDY/dicomdir/B101/bold/001/tmp.fcseed-sess.47801/seg.nii.gz
>         > --pvf
>         >
>         /Users/caramazzalab/Desktop/Jess/V1_REST_STUDY/dicomdir/B101/bold/001/tmp.fcseed-sess.47801/pvf.nii.gz
>         >
>         > PVF
>         >
>         /Users/caramazzalab/Desktop/Jess/V1_REST_STUDY/dicomdir/B101/bold/001/tmp.fcseed-sess.47801/pvf.nii.gz
>         >
>         > Number of labels: 0
>         >
>         > Annot File:      (null)
>         >
>         > Template Volume:
>         >
>         /Users/caramazzalab/Desktop/Jess/V1_REST_STUDY/dicomdir/B101/bold/001/template.nii.gz
>         >
>         > Outut Volume:
>         >
>         /Users/caramazzalab/Desktop/Jess/V1_REST_STUDY/dicomdir/B101/bold/001/tmp.fcseed-sess.47801/seg.nii.gz
>         >
>         > Registration File:
>         >
>         /Users/caramazzalab/Desktop/Jess/V1_REST_STUDY/dicomdir/B101/bold/001/register.dof6.lta
>         >
>         > Fill Threshold: 0.5
>         >
>         > Label Vox Vol:  1
>         >
>         > ProjType:       (null)
>         >
>         > ProjTypeId:     0
>         >
>         > ProjStart:      0
>         >
>         > ProjStop:       0
>         >
>         > ProjDelta:      0.1
>         >
>         > Subject:  (null)
>         >
>         > Hemi:     (null)
>         >
>         > UseNewASeg2Vol:  0
>         >
>         > DoLabelStatVol  0
>         >
>         > LabelCodeOffset  0
>         >
>         > setenv SUBJECTS_DIR /Users/caramazzalab/Desktop/Jess/Subjects
>         >
>         > $Id: mri_label2vol.c,v 1.46 2014/12/08 21:11:54 greve Exp $
>         >
>         > Template RAS-to-Vox: --------
>         >
>         > -0.50000  -0.00000  -0.00000   56.00000;
>         >
>         > -0.00000  -0.00000  -0.50000   56.00000;
>         >
>         > -0.00000   0.45455  -0.00000   32.00000;
>         >
>         > -0.00000  -0.00000  -0.00000   1.00000;
>         >
>         > Template Voxel Volume: 8.8
>         >
>         > nHits Thresh: 4.4
>         >
>         > Loading registration from
>         >
>         /Users/caramazzalab/Desktop/Jess/V1_REST_STUDY/dicomdir/B101/bold/001/register.dof6.lta
>         >
>         > regio_read_register: loading lta
>         >
>         > RegMat: --------
>         >
>         > 0.99785   0.02664   0.05987   0.19449;
>         >
>         > -0.06077   0.03415   0.99757  -39.76084;
>         >
>         > -0.02453   0.99906  -0.03570   2.27075;
>         >
>         > 0.00000   0.00000   0.00000   1.00000;
>         >
>         > Label RAS-to-Vox: --------
>         >
>         > -0.49893  -0.01332  -0.02994   55.90276;
>         >
>         > 0.01227  -0.49953   0.01785   54.86462;
>         >
>         > -0.02762   0.01552   0.45344   13.92689;
>         >
>         > 0.00000   0.00000   0.00000   1.00000;
>         >
>         > PVF
>         >
>         /Users/caramazzalab/Desktop/Jess/V1_REST_STUDY/dicomdir/B101/bold/001/tmp.fcseed-sess.47801/pvf.nii.gz
>         >
>         > Computing PVF 8.8
>         >
>         > mri_label2vol done
>         >
>         > mri_binarize --i
>         >
>         /Users/caramazzalab/Desktop/Jess/V1_REST_STUDY/dicomdir/B101/bold/001/tmp.fcseed-sess.47801/seg.nii.gz
>         > --o
>         >
>         /Users/caramazzalab/Desktop/Jess/V1_REST_STUDY/dicomdir/B101/bold/001/tmp.fcseed-sess.47801/mask.nii.gz
>         > --match 400
>         >
>         >
>         > $Id: mri_binarize.c,v 1.43 2016/06/09 20:46:21 greve Exp $
>         >
>         > cwd /Users/caramazzalab/Desktop/Jess/V1_REST_STUDY/dicomdir
>         >
>         > cmdline mri_binarize.bin --i
>         >
>         /Users/caramazzalab/Desktop/Jess/V1_REST_STUDY/dicomdir/B101/bold/001/tmp.fcseed-sess.47801/seg.nii.gz
>         > --o
>         >
>         /Users/caramazzalab/Desktop/Jess/V1_REST_STUDY/dicomdir/B101/bold/001/tmp.fcseed-sess.47801/mask.nii.gz
>         > --match 400
>         >
>         > sysname  Darwin
>         >
>         > hostname Caramazza-Labs-Mac-Pro.local
>         >
>         > machine  x86_64
>         >
>         > user     caramazzalab
>         >
>         >
>         > input
>         >
>         /Users/caramazzalab/Desktop/Jess/V1_REST_STUDY/dicomdir/B101/bold/001/tmp.fcseed-sess.47801/seg.nii.gz
>         >
>         > frame      0
>         >
>         > nErode3d   0
>         >
>         > nErode2d   0
>         >
>         > output
>         >
>          /Users/caramazzalab/Desktop/Jess/V1_REST_STUDY/dicomdir/B101/bold/001/tmp.fcseed-sess.47801/mask.nii.gz
>         >
>         > Binarizing based on matching values
>         >
>         > nMatch 1
>         >
>         > 0   400
>         >
>         > binval        1
>         >
>         > binvalnot     0
>         >
>         > fstart = 0, fend = 0, nframes = 1
>         >
>         > Found 0 values in range
>         >
>         > Counting number of voxels in first frame
>         >
>         > Found 0 voxels in final mask
>         >
>         > Count: 0 0.000000 802816 0.000000
>         >
>         > mri_binarize done
>         >
>         > mri_segstats --i
>         >
>         /Users/caramazzalab/Desktop/Jess/V1_REST_STUDY/dicomdir/B101/bold/001/fmcpr.nii.gz
>         > --seg
>         >
>         /Users/caramazzalab/Desktop/Jess/V1_REST_STUDY/dicomdir/B101/bold/001/tmp.fcseed-sess.47801/mask.nii.gz
>         > --id 1 --sum
>         >
>         /Users/caramazzalab/Desktop/Jess/V1_REST_STUDY/dicomdir/B101/bold/001/tmp.fcseed-sess.47801/junk.sum
>         > --avgwfvol
>         >
>         /Users/caramazzalab/Desktop/Jess/V1_REST_STUDY/dicomdir/B101/bold/001/tmp.fcseed-sess.47801/avgwf.mgh
>         >
>         >
>         > $Id: mri_segstats.c,v 1.121 2016/05/31 17:27:11 greve Exp $
>         >
>         > cwd
>         >
>         > cmdline mri_segstats --i
>         >
>         /Users/caramazzalab/Desktop/Jess/V1_REST_STUDY/dicomdir/B101/bold/001/fmcpr.nii.gz
>         > --seg
>         >
>         /Users/caramazzalab/Desktop/Jess/V1_REST_STUDY/dicomdir/B101/bold/001/tmp.fcseed-sess.47801/mask.nii.gz
>         > --id 1 --sum
>         >
>         /Users/caramazzalab/Desktop/Jess/V1_REST_STUDY/dicomdir/B101/bold/001/tmp.fcseed-sess.47801/junk.sum
>         > --avgwfvol
>         >
>         /Users/caramazzalab/Desktop/Jess/V1_REST_STUDY/dicomdir/B101/bold/001/tmp.fcseed-sess.47801/avgwf.mgh
>         >
>         >
>         > sysname  Darwin
>         >
>         > hostname Caramazza-Labs-Mac-Pro.local
>         >
>         > machine  x86_64
>         >
>         > user     caramazzalab
>         >
>         > UseRobust  0
>         >
>         > Loading
>         >
>         /Users/caramazzalab/Desktop/Jess/V1_REST_STUDY/dicomdir/B101/bold/001/tmp.fcseed-sess.47801/mask.nii.gz
>         >
>         > Loading
>         >
>         /Users/caramazzalab/Desktop/Jess/V1_REST_STUDY/dicomdir/B101/bold/001/fmcpr.nii.gz
>         >
>         > Voxel Volume is 8.8 mm^3
>         >
>         > Generating list of segmentation ids
>         >
>         > Found   1 segmentations
>         >
>         > Computing statistics for each segmentation
>         >
>         >
>         > Reporting on   0 segmentations
>         >
>         > Using PrintSegStat
>         >
>         > Computing spatial average of each frame
>         >
>         >
>         > ERROR: no voxels found in segmentation
>         >
>         >
>         >
>         >
>         > I attached the error log below - any idea what happened? Is
>         there
>         > something I can change in these commands to yield the
>         timecourse of
>         > V1? These are all subjects 18+ years of age.
>         >
>         >
>         > What do you think?
>         >
>         >
>         > Thank you in advance, any and all feedback would be greatly
>         appreciated.
>         >
>         >
>         > Thanks,
>         >
>         > Jess
>         >
>         >
>         >
>         > _______________________________________________
>         > Freesurfer mailing list
>         > Freesurfer@nmr.mgh.harvard.edu
>         <mailto:Freesurfer@nmr.mgh.harvard.edu>
>         > https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>         <https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer>
>
>         --
>         Douglas N. Greve, Ph.D.
>         MGH-NMR Center
>         greve@nmr.mgh.harvard.edu <mailto:greve@nmr.mgh.harvard.edu>
>         Phone Number: 617-724-2358 <tel:617-724-2358>
>         Fax: 617-726-7422 <tel:617-726-7422>
>
>         Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
>         <http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting>
>         FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2
>         <https://gate.nmr.mgh.harvard.edu/filedrop2>
>         www.nmr.mgh.harvard.edu/facility/filedrop/index.html
>         <http://www.nmr.mgh.harvard.edu/facility/filedrop/index.html>
>         Outgoing:
>         ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/
>         <ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/>
>
>         _______________________________________________
>         Freesurfer mailing list
>         Freesurfer@nmr.mgh.harvard.edu
>         <mailto:Freesurfer@nmr.mgh.harvard.edu>
>         https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>         <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
>         <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.
>
>
>
>
> _______________________________________________
> 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
greve@nmr.mgh.harvard.edu
Phone Number: 617-724-2358
Fax: 617-726-7422

Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2
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



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