Personal tools
You are here: Home Documentation Data Processing MRI Data Structural Data Caret Surfaces Creating ROIs
Document Actions

Creating ROIs on the Surface

You can draw ROIs based on surface stats (Caret) and transform them to EPI space to extract time-series. This procedure should be run after segmentation/flattening.

draw ROIs in Caret
1.    open Caret. Open fiducial, inflated, FLAT_ALIGNED from the spec file (native space). In the main window, show FLAT surface
2.    open graybin.palette from /hyper/library if there is none already and yes to copy.
3.    Window -> window 2. Show fiducial/inflated in window 2 (depending on the best way to visualize ROI, you may not need Window 2).
4.    Layers -> Borders -> draw borders
5.    Name: L_V1, Type: closed, Dimensions: 2D, Check “Assign Paint identifiers to Nodes within Border” and set Pain Column to “Create New Column” and type in L_V1.
6.    click “View” in window 1, click where the ROI should be in window 2. see green dot trace in both windows (again, if you are using just window 1, you don’t need this step)
7.    click Apply and set color, click OK, then click “Apply” 
8.    draw borders. When finished, press shift and left click. red dotted line will be specified border color.
9.    When finished making all ROIs, go to Attributes -> paint -> Convert Paint Column to Paint Volume
10.    pick ROI, set Inner Boundary: -2.5, Outer Boundary: 2.5 Intersection Step: 0.5, Space: FLIRT. Set Paint to L_V1. Click OK.
11.    File -> Save Date File. File name: L_V1, File type: Volume Files -NIFTI (*.nii). Volume Type: Paint, Volume File (volume_1 (or whatever corresponds to that ROI)), Volume Label: L_V1, Voxel Data Type: Float. click Save (save to “/retinotopy/” of that subject)
12.    Save areacolor (“retinotopy.areacolor”), bordercolor (“retinotopy.bordercolor”) and paint (“retinotopy_RH.paint”) files. Areacolor and bordercolor files could be used in the other hemisphere, and in other subjects (maybe stored in “caret_files” in hyper…?). 
13.    Exit Caret

make cub files
*Use surfaceROI2epi.scp in /home/akiko/bin*
Below is the step-by-step of the procedure in case you are interested…

1.    in Terminal, make_rpi L_V1.nii L_V1_temp
2.    flirt -in /usr/local/fsl/etc/standard/MNI152_T1_1mm.nii.gz -ref /data/VisualSearch/VisualSearch_old/04VisualSearch/Anatomy/FirstEPI.hdr -omat template_to_epi.mat (do this process just once per sub)
3.    flirt -in L_V1_temp.hdr -ref  /data/VisualSearch/VisualSearch_old/04VisualSearch/Anatomy/FirstEPI.hdr -applyxfm -init template_to_epi.mat -out V1_LH
4.      fslview ../csssibStructural.hdr& Overlay -> Load image overlay. make sure ROI lands on the correct region.
5.     fslmaths V1_LH.hdr -thr 0.75 V1_LH_thr (play around with the threshold value to get the best results)
6.    fslmaths V1_LH_thr.hdr -bin V1_LH_bin
7.    vb2cub V1_LH_bin.img V1_LH.cub
8.    at the very end...  rm *_thr.* *_temp.* to clean up
9.     vbview ../csssibStructural.cub & overlay ROIs

to extract time-series from these ROIs
do idl to make fx.cub

if you are plotting time-series in Curv, follow the procedure in Home > Documentation > Data Processing > MRI Data > Functional Data > Timeseries Analysis . If you are extracting time-series from AFNI's deconvolution data, run something like /home/akiko/bin/AFNI_ROIprep_retinotopy.scp (follow "deconvolution" procedures)

e.g. AFNI_ROIprep_retinotopy.scp 01VisualSearch
/data/VisualSearch/01VisualSearch/retinotopy/ /data/VisualSearch/01VisualSearch/AFNI/EPIdata/


Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: