[Freesurfer] Surface resampling for Qdec using -qcache

2014-07-27 Thread Christoph Abé
Hello together,



I have a question regarding the -qcache command, which in addition to the surface smoothing is also used to resample the constructed surfaces to common space (for example the fsaverage template), necessary to run a Qdec group comparison on cortical thickness.



My main question is, how the resampling is perormed. I would like to know, if the surfaces (depending on shape and brain size) are slightly altered or reshaped in order to match the template. Similar what one would expect when performing a (non-linear) normalization.



Can somebody answer this question, or provide a reference where this method is explained in more detail? That would be fantastic.



Thank you very much in advance,



Leoni
___
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.


[Freesurfer] Diffusion analysis qs

2014-07-27 Thread Rotem Saar
Dear Anastasia,

I followed your suggestion:

I calculated the FA maps in freesurfer using the script below (see last
message): I did it with both the rotated and the not rotated gradient
table. The FA maps were identical as u said.

BUT ! - when I used the rotated gradient table in FSL and tried to create
the FA  MD maps (as in the first step of tracula), I got the attached
results: http://tinypic.com/r/skzwqa/8

Does this map seems ok to u ? I think that something is wrong but can't
specify what.

I will appreciate your help here again:)



Hi Rotem - The FA values are actually invariant to a rotation of the
gradient vectors. You can test that yourself. If, however, you get
different FA maps with the different gradient tables, then something else
is going on and not a simple rotation.

a.y

On Wed, 23 Jul 2014, Rotem Saar wrote:

 Dear Anastasia  Michael,

 Thank u for your answers (I attached my last email and your answers at the
 end of this email.

 I still want to specify my question. If I only want to extract FA values
 using the following script (see script below), and I know that an angle
was
 applied during the dMRI scans, should I use the rotated gradient matrix ?

 When I first analyzed 20 subjects with the gradient matrix that is
published
 for a T3 Philips magnet (I also read the gradients from the dicom header -
 they were the same) I got reasonable results - but now I don't know what
to
 think of them...


 source ~/Desktop/fs_script

 dt_recon --i /usr/local/freesurfer/subjects/Anatomy0207/DTI/I160.dcm --s
 Anatomy0207 --o /usr/local/freesurfer/subjects/Anatomy0207/DTI --b
 /usr/local/freesurfer/subjects/Anatomy0207/DTI/bvals.bval
 /usr/local/freesurfer/subjects/Anatomy0207/DTI/bvecs.bvec

 To check results, run:

 tkregister2 --mov /usr/local/freesurfer/subjects/Anatomy0207/DTI/lowb.nii
 --reg /usr/local/freesurfer/subjects/Anatomy0207/DTI/register.dat --surf

 tkregister2 --s fsaverage --surf white --reg
 /usr/local/freesurfer/subjects/Anatomy0207/DTI/mask-tal.nii.reg --mov
 /usr/local/freesurfer/subjects/Anatomy0207/DTI/mask-tal.nii

 tkregister2 --s fsaverage --surf white --reg
 /usr/local/freesurfer/subjects/Anatomy0207/DTI/fa-tal.nii.reg --mov
 /usr/local/freesurfer/subjects/Anatomy0207/DTI/fa-tal.nii

 freeview -v /usr/local/freesurfer/subjects/Anatomy0207/DTI/fa.nii
 /usr/local/freesurfer/subjects/Anatomy0207/DTI/adc.nii

 freeview -v /usr/local/freesurfer/subjects/Anatomy0207/mri/
brain.mgz/usr/local/freesurfer/subjects/Anatomy0207/DTI/fa.nii:reg=
register.dat:colo
 rmap=heat:heatscale=.2,.2,1

 tkmedit Anatomy0207?orig.mgz -aux brain.mgz -seg wmparc.mgz -reg
 /usr/local/freesurfer/subjects/Anatomy0207/DTI/register.dat -overlay
 /usr/local/freesurfer/subjects/Anatomy0207/DTI/fa.nii -fthresh 0.2 -fmax 1

 mri_vol2vol --mov /usr/local/freesurfer/subjects/Anatomy0207/DTI/lowb.nii
\
 ??? --targ /usr/local/freesurfer/subjects/Anatomy0207/mri/
wmparc.mgz
 \
 ??? --inv --interp nearest --o
 /usr/local/freesurfer/subjects/Anatomy0207/mri/wmparc2diff.mgz \
 ??? --reg
 /usr/local/freesurfer/subjects/Anatomy0207/DTI/register.dat --no-save-reg

 mri_vol2vol --mov /usr/local/freesurfer/subjects/Anatomy0207/DTI/lowb.nii
\
 ??? --targ
 /usr/local/freesurfer/subjects/Anatomy0207/mri/aparc+aseg.mgz \
 ??? --inv --interp nearest --o
 /usr/local/freesurfer/subjects/Anatomy0207/mri/aparc+aseg2diff.mgz \
 ??? --reg
 /usr/local/freesurfer/subjects/Anatomy0207/DTI/register.dat --no-save-reg

 freeview -v /usr/local/freesurfer/subjects/Anatomy0207/DTI/fa.nii \
 ???/usr/local/freesurfer/subjects/Anatomy0207/mri/aparc+
aseg2diff.mgz:colormap
 =lut


 mri_mask /usr/local/freesurfer/subjects/Anatomy0207/DTI/fa.nii \
  /usr/local/freesurfer/subjects/Anatomy0207/mri/wmparc2diff.mgz \
  /usr/local/freesurfer/subjects/Anatomy0207/DTI/fa-masked.mgz


 freeview -v /usr/local/freesurfer/subjects/Anatomy0207/DTI/fa-
masked.mgz/usr/local/freesurfer/subjects/Anatomy0207/mri/aparc+
aseg2diff.mgz:colormap
 =lut

 mri_segstats --seg
 /usr/local/freesurfer/subjects/Anatomy0207/mri/wmparc2diff.mgz --ctab
 $FREESURFER_HOME/FreeSurferColorLUT.txt --i
 /usr/local/freesurfer/subjects/Anatomy0207/DTI/fa-masked.mgz --sum
 /usr/local/freesurfer/subjects/Anatomy0207/stats/all_stats_fa-masked


 It'd be nice if things were that simple, but!

 Although the pre-processing is done with FSL tools, tractography is done
 with locally written code. Some gradient sets may appear to work with FSL,
 but they won't work for us. For example, some dicom converters may perform
 a L-R flip as preparation for feeding the gradient vectors into FSL. We
 need the unflipped vectors because, instead of flipping vectors, we
 convert both vectors and images to LAS orientation. This ensures that they
 work both for FSL and for us, and that you can view things correctly in
 both freeview and fslview, without the