On Mon, Jul 2, 2018 at 7:31 AM, King, Daniel (Research Student) <
[email protected]> wrote:

> Dear all,
>
> I was emailing today to ask a specific question about some of the
> specifics of mapping volumetric data to the surface with CIFTI files. I
> would like to use the HCP diffusion data to generate FA and MD maps using
> the DTIFIT command.
>

Note that a simple tensor model can't represent crossing fibers very well
(I assume dtifit only uses a tensor model).  You should be able to generate
something similar to FA and MD from bedpostx explicit multiple fiber
modeling (but it will take some effort).  On the other hand, I don't know
what diffusion does in gray matter, as I am more used to thinking about
diffusion imaging being used for white matter, where there is much more
anisotropy.  Perhaps in gray matter, bedpostx would never find a second
fiber direction, and would produce similar results to dtifit.


> Following this, I would like to map these to the surface (**IN NATIVE
> SPACE** importantly)
>

Since you are not doing tractography, but merely mapping voxelwise
properties to the surface, the particular volume space used isn't as
important, as long as you use the same space for the surfaces and volume
data.  However, it is probably more correct to model the diffusion
information in a rigid anatomical space, so that may be the best bet.

However, be careful not to confuse "native volume space" (the T1w folder)
and "native mesh surfaces" (the Native subfolder), they are two very
different things.  The native mesh surfaces are the ones that come out of
freesurfer, with no surface registration applied - they line up in with the
subject's volumes, but they have different numbers of vertices for every
subject, so you have to take an extra step before doing any group
comparisons.

The arguably best way to do this volume to surface mapping is in fact to
use the native *mesh* surfaces (because any resampling of a surface does
some averaging of vertex coordinates), and then resample the result to the
desired surface resolution and registration (32k fs_LR, MSMAll).  This
happens to be part of what your script attempts to do.


> so I can estimate mean values (FA/MD) over surface ROIs (potentially the
> freesurfer aparc in native space using the 
> *https://hcp-openaccess.s3.amazonaws.com/HCP_1200/996782/MNINonLinear/Native/996782.aparc.native.dlabel.nii)
> <https://hcp-openaccess.s3.amazonaws.com/HCP_1200/996782/MNINonLinear/Native/996782.aparc.native.dlabel.nii)>.*
>

As I understand it, the freesurfer aparc is a gyral/sulcal parcellation, so
it doesn't directly relate to function.


> I have drafted a script below which will produce a surf.gii file
> containing the vertex-wise FA/MD values constrained to the GM cortical
> ribbon. I would then like to use something similar to the -wb_command
> –cifti-parcellate to produce a parcellated file with the mean FA/MD.
>
>
>
> So briefly my questions are:
>
> a)       Have I used the volume to surface mapping command correctly
> below with the correct surfaces?
>
No, I will attempt to correct things below.  Do not put dashes into the
command line where it doesn't ask for them, dashes are only used as part of
option flags (and for negative numbers), never added to filenames.

> b)       How do I go from a surf.gii file to a cifti file which is able
> to be parcellated?
>
Those are not .surf.gii files, and should not be.  They should be .func.gii
files (we are trying to minimize the use of .shape.gii, which is really the
same format).  .surf.gii files do not contain data values, they contain
only the vertex coordinates and the triangles that make up the surface.
Read through what wb_command -gifti-help says.

To turn .func.gii files into cifti files, look at wb_command
-cifti-create-dense-from-template.

>
>
> Many Thanks
>
> Dan
>
>
>
>
>
> *-----------------SCRIPT-------------*
>
> # A. Extract DTI data for each region
>
>
>
> BASEDIR=XXXX
>
> OUTDIR=XXXX #find output dir
>
>
>
>
>
> for SUBJ in XXXX
>
> do
>
> cd  $BASEDIR/HCP_1200/$SUBJ/T1w/Diffusion/data.nii.gz
>
>
>
> # 1. Select single b-val shell
>
>
>
> select_dwi_vols \
>
> data.nii.gz \
>
>     bvals \
>
>     dti_data \
>
>     0 \
>
>     -b 1000 \
>
>
>
> # 2. Produce volume maps of both FA and MD
>
#NOTE: data.nii.gz is expected to be in acpc ("T1w") space.

>
>
> dtifit -k data.nii.gz -r bvecs -b bvals -m nodif_brain_mask.nii.gz \
>
>     -o $OUTDIR/$SUBJ/dti --gradnonlin=grad_dev.nii.gz
>
>
>
> # 3. Map these volumes (FA and MD) to surfaces to get good multimodal reg.
> Need to do twice
>
> #              Once for each hemisphere
>
>
>
> for hemi in L R
>
> do
>
 wb_command -volume-to-surface-mapping \
    $OUTDIR/$SUBJ/dti/FA.nii \
    
$BASEDIR/HCP_1200/$SUBJ/T1w/Native/${SUBJ}.${hemi}.midthickness.native.surf.gii
\
    $OUTDIR/$SUBJ/dti/FA.func.gii \
    -ribbon-constrained \

$BASEDIR/HCP_1200/$SUBJ/T1w/Native/$SUBJ.${hemi}.white.native.surf.gii \
      $BASEDIR/HCP_1200/$SUBJ/T1w/Native/$SUBJ.${hemi}.pial.native.surf.gii
wb_command -volume-to-surface-mapping \
    $OUTDIR/$SUBJ/dti/MD.nii \
    $BASEDIR/HCP_1200/$SUBJ/T1w/Native/${SUBJ}.${hemi}.
midthickness.native.surf.gii \
    $OUTDIR/$SUBJ/dti/FA.func.gii \
    -ribbon-constrained \
      $BASEDIR/HCP_1200/$SUBJ/T1w/Native/$SUBJ.${hemi}.white.native.surf.gii
\
      $BASEDIR/HCP_1200/$SUBJ/T1w/Native/$SUBJ.${hemi}.pial.native.surf.gii
#TODO: use wb_command -metric-resample to get the data from native mesh
onto 32k fs_LR

> done
>

#TODO: use wb_command -cifti-create-dense-from-template to convert to cifti

>
> *--------------------------------------*
>
>
>
> _______________________________________________
> HCP-Users mailing list
> [email protected]
> http://lists.humanconnectome.org/mailman/listinfo/hcp-users
>

_______________________________________________
HCP-Users mailing list
[email protected]
http://lists.humanconnectome.org/mailman/listinfo/hcp-users

Reply via email to