Differences between revisions 7 and 24 (spanning 17 versions)
Revision 7 as of 2011-10-19 14:31:40
Size: 4030
Editor: TylerTriggs
Comment:
Revision 24 as of 2011-10-19 15:30:16
Size: 4260
Editor: TylerTriggs
Comment:
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
*STEP 1: create a text file with the name of the full parcellation of interest and the number of seeds.  *STEP 1: create a text file with the name of the full parcellation of interest and the number of seeds.
Line 7: Line 7:
 NOTE: The method I've show below divides the parcellation, orthogonally along its long axis.   NOTE: The method I've show below divides the parcellation, orthogonally along its long axis.
Line 10: Line 10:
*STEP 2: use [[mris_divide_parcellation]]. This command will generate a new parcellation including your split ROI, as well as all original parcellations outside your chosen region.  *STEP 2: use [[mris_divide_parcellation]]. This command will generate a new parcellation including your split ROI, as well as all original parcellations outside your chosen region.
Line 12: Line 12:
set splitN = 3 <-this is the number of divisions to make
echo "isthmuscingulate 3" > seed.isthmuscingulate.3.txt
set splitstem = <hemi>.isthmuscingulate.3.split <-name for divided surface annotation
 set splitN = 3 #this is the number of divisions to make.

 echo "isthmuscingulate 3" > seed.isthmuscingulate.3.txt .

 set splitstem = <hemi>.isthmuscingulate.3.split 3name for divided surface annotation.
Line 17: Line 19:

Line 21: Line 25:

--hemi <hemi> \
                               --labelbase <hemi>.isthmuscingulate.3 \
                               --annotation 3split \
                               --surface pial 
                               --hemi <hemi>
                               --labelbase <hemi>.isthmuscingulate.3
                               --annotation 3split
                               --surface pial
Line 29: Line 32:
@ splitN2 = $splitN + 1 <-this number will be helpful when removing excess labels  @ splitN2 = $splitN + 1 <-this number will be helpful when removing excess labels
Line 31: Line 34:
set rmextra = `find $SUBJECTS_DIR/<recondir>/label -maxdepth 1 -type f | \
                                        
grep <hemi>.isthmuscingulate.3 | \
                                                             
sort -nr | \
                                                  
sed -n ${splitN2},500p`  
                                                 <-this command lists all files in the label dir, greps for our label name,
                                                 <-sorts numerically in reverse, then grabs all labels after the first 3 
set rmextra = `find $SUBJECTS_DIR/<recondir>/label -maxdepth 1 -type f | grep <hemi>.isthmuscingulate.3 | sort -nr | sed -n ${splitN2},500p`
                                 #the above command lists all files in the label dir, greps for our label name,
                                 #sorts numerically in reverse, then grabs all labels after the first 3
Line 38: Line 39:
Line 39: Line 41:
set lbls = `find $ldir -maxdepth 1 -type f | grep <hemi>.isthmuscingulate.3 | sort -nr` <-grabs our seed labels
Line 41: Line 42:
*STEP 4: check that you've grabbed the correct seed labels by loading them in [[tksurfer]]

*STEP 5: Use [[mri_label2vol]] on each of the split seed labels to obtain a segmentation volume for each.
         
               mri_label2vol --label <label> \
                             --temp $SUBJECTS_DIR/<recondir>/mri/brainmask.nii.gz \
                             --proj frac 0 1 .1 \
                             --subject <recondir> --hemi <hemi> \
                             --regheader $SUBJECTS_DIR/<recondir>/mri/brainmask.nii.gz \
                             --o <outsegname>

*STEP 6: Use fcseed-config to record the parameters you wish to pass to your connectivity analysis.

Sample command for running the mean time course and using the first (1) of the 3 seed split:

  set type = mean <- For seed regions, we recommend generating the mean signal timecourse by using "-mean"
  set segname = <hemi>.isthmuscingulate.split3.1
  fcseed-sess -s <subject> \
               -segid 1 \
               -o ${type}.${segname}.dat \
               -seg <outsegname> \
               -fsd bold \
               -${type} \
               -cfg {type}.${segname}.config
set lbls = ` find $ldir -maxdepth 1 -type f | grep <hemi>.isthmuscingulate.3 | sort -nr ` #grabs our seed labels
Line 67: Line 45:
Now resume with [[FsFastFunctionalConnectivityWalkthrough |step 5 on this page...]]
*STEP 4: check that you've grabbed the correct seed labels by loading them in [[tksurfer]]

*STEP 5: Use [[mri_label2vol]] on each of the split seed labels to obtain a segmentation volume for each.


---- /!\ '''Edit conflict - other version:''' ----
   mri_label2vol --label <label> --temp $SUBJECTS_DIR/<recondir>/mri/brainmask.nii.gz --proj frac 0 1 .1 --subject <recondir> --hemi <hemi> --regheader $SUBJECTS_DIR/<recondir>/mri/brainmask.nii.gz --o <outsegname>

---- /!\ '''Edit conflict - your version:''' ----
   mri_label2vol --label <label> --temp $SUBJECTS_DIR/<recondir>/mri/brainmask.nii.gz --proj frac 0 1 .1 --subject <recondir> --hemi <hemi> --regheader $SUBJECTS_DIR/<recondir>/mri/brainmask.nii.gz --o <outsegname>

---- /!\ '''End of edit conflict''' ----

*STEP 6: Use fcseed-config to record the parameters you wish to pass to your connectivity analysis.

Sample command for running the mean time course and using the first (1) of the 3 seed split:


---- /!\ '''Edit conflict - other version:''' ----
  set type = mean # For seed regions, we recommend generating the mean signal timecourse by using "-mean"

---- /!\ '''Edit conflict - your version:''' ----
  set type = mean # For seed regions, we recommend generating the mean signal timecourse by using "-mean"

---- /!\ '''End of edit conflict''' ----
  set segname = <hemi>.isthmuscingulate.split3.1

  fcseed-sess -s <subject> -segid 1 -o ${type}.${segname}.dat -seg <outsegname> -fsd bold -${type} -cfg {type}.${segname}.config


Now resume with [[FsFastFunctionalConnectivityWalkthrough |step 5 on this page...]]

Note: this is a companion page to the FsFastFunctionalConnectivityWalkthrough page.

This page will outline how to split a full FreeSurfer aparc annotation into multiple seeds to use a portion of the full Freesurfer parcellation ("split parcellation") as your seed region.

*STEP 1: create a text file with the name of the full parcellation of interest and the number of seeds. Possible structures can be found here: $FREESURFER_HOME/average/colortable_desikan_killiany.txt

  • NOTE: The method I've show below divides the parcellation, orthogonally along its long axis.
    • There is also a method of using mris_divide_parcellation that specifies a unit of area for each seed.

*STEP 2: use mris_divide_parcellation. This command will generate a new parcellation including your split ROI, as well as all original parcellations outside your chosen region.

  • set splitN = 3 #this is the number of divisions to make.

    echo "isthmuscingulate 3" > seed.isthmuscingulate.3.txt .

    set splitstem = <hemi>.isthmuscingulate.3.split 3name for divided surface annotation.

    mris_divide_parcellation <recondir> <hemi> aparc.annot seed.isthmuscingulate.3.txt ${hemi}.${splitN}split

*STEP 3: use mri_annotation2label to create labels from the new annotation. This will create a label for each parcellation (including labels for regions outside of your desired seed region). The labels will be deposited in the subject's recondir/label directory.

  • mri_annotation2label --subject <recondir> \

    • --hemi <hemi> --labelbase <hemi>.isthmuscingulate.3 --annotation 3split --surface pial

To remove the excess labels, I've used this method:

@ splitN2 = $splitN + 1 <-this number will be helpful when removing excess labels

set rmextra = find $SUBJECTS_DIR/<recondir>/label -maxdepth 1 -type f | grep <hemi>.isthmuscingulate.3 |  sort -nr | sed -n ${splitN2},500p

  • #the above command lists all files in the label dir, greps for our label name, #sorts numerically in reverse, then grabs all labels after the first 3

echo " REMOVING excess labels "

rm -v $rmextra

set lbls =  find $ldir -maxdepth 1 -type f | grep <hemi>.isthmuscingulate.3 | sort -nr  #grabs our seed labels

*STEP 4: check that you've grabbed the correct seed labels by loading them in tksurfer

*STEP 5: Use mri_label2vol on each of the split seed labels to obtain a segmentation volume for each.


/!\ Edit conflict - other version:


  • mri_label2vol --label <label> --temp $SUBJECTS_DIR/<recondir>/mri/brainmask.nii.gz --proj frac 0 1 .1 --subject <recondir> --hemi <hemi> --regheader $SUBJECTS_DIR/<recondir>/mri/brainmask.nii.gz --o <outsegname>


/!\ Edit conflict - your version:


  • mri_label2vol --label <label> --temp $SUBJECTS_DIR/<recondir>/mri/brainmask.nii.gz --proj frac 0 1 .1 --subject <recondir> --hemi <hemi> --regheader $SUBJECTS_DIR/<recondir>/mri/brainmask.nii.gz --o <outsegname>


/!\ End of edit conflict


*STEP 6: Use fcseed-config to record the parameters you wish to pass to your connectivity analysis.

Sample command for running the mean time course and using the first (1) of the 3 seed split:


/!\ Edit conflict - other version:


  • set type = mean # For seed regions, we recommend generating the mean signal timecourse by using "-mean"


/!\ Edit conflict - your version:


  • set type = mean # For seed regions, we recommend generating the mean signal timecourse by using "-mean"


/!\ End of edit conflict


  • set segname = <hemi>.isthmuscingulate.split3.1

    fcseed-sess -s <subject> -segid 1 -o ${type}.${segname}.dat -seg <outsegname> -fsd bold -${type} -cfg {type}.${segname}.config

Now resume with step 5 on this page...

FsFastFunctionalConnectivityWalkthroughSplittingSeeds (last edited 2011-10-20 11:18:37 by TylerTriggs)