Hi Rosalia,


On Tue, Oct 7, 2014 at 6:07 PM, Rosalia Dacosta Aguayo <[log in to unmask]> wrote:
Hi Niels,

Thank you for your comment. With fsl gui BBR only appears when doing registration to the main structural image using the main structural image for registration.

But if I use FLIRT directly, from the fsl gui, it does not appear this parameter....I have the last version of FSL (5.0.7).

I rarely use the GUI tools but you can do it from the command line. It does require an additional step of getting a WM segmentation of your structural image, but it sounds like you already have that. I'm also assuming that there is decent GM/WM contrast in your b0 image - otherwise BBR will have difficulties.

The flirt call then becomes something like:
flirt  -in EPI-IMAGE -ref STRUC-IMAGE -dof 6  -cost bbr -wmseg WMSEG -omat func2anat.mat -out EPI_REG -schedule ${FSLDIR}/etc/flirtsch/bbr.sch
 

Regarding fieldmap, as far as I know it was not adquired.

Okay, that's too bad. It definitely would have helped.
 

I think maybe your other questions below were answered separately by Anderson.


I have a last two questions I do not understand:

1. The authors dilated the binarized mask to 2mm (I guess that using ApllyxFM) with identity matrix. But a) I do not know why they decide to dilate the mask if the with the last step we turn again to 1mm resolution...as far as I have understood. And by the other way, they call this as a conservative method...I can not imagine why.

2. They say:  A local maximum FA, constrained by a search space, was then projected onto the skeleton. To account for residual misalignments and facilitate group-wise comparison, each individual’s FA image is searched for local maximum value in the orthogonal to the skeleton. This local maximum was then projected onto the skeleton (Smith et al, 2006). Only voxels that were included in the SWM mask were retained for further analysis, and then compared between groups.

If you could en light me I would be very grateful.
With kind regards,
Rosalia.

 






2014-10-07 17:39 GMT+02:00 Niels Bergsland <[log in to unmask]>:
You're likely to get better results using the  BBR cost function for registering your diffusion data to your T1. I'd also use a fieldmap if those have been acquired. 


On Tuesday, October 7, 2014, Rosalia Dacosta Aguayo <[log in to unmask]> wrote:
Thank you Paul, Ricarda and Bryson for your patience and your help!!

All of you have been very kind.

Kind regards,
Rosalia.

2014-10-07 16:57 GMT+02:00 paul mccarthy <[log in to unmask]>:
Hi Rosalia,

You're very close ... Change your last two commands (convertwarp and applywarp) to:

convertwarp -m  data.to.T1.mat -w T1.to.MNI_field -r  JHU ICBM FA 1mm -o data.to.MNI_field

applywarp --ref= JHU ICBM FA 1mm  –in=sub1_FA_sup_wm_mask --warp=data.to.MNI_field --out=w_sub1_FA_sup_wm_mask

The convertwarp command concatenates the data.to.T1.mat linear transformation and the T1.to.MNI non-linear transformation, forming a single non-linear warp field data.to.MNI_field, which can be used to transform images from DWI space into MNI space.

Cheers,

Paul




On Tue, Oct 7, 2014 at 3:29 PM, Rosalia Dacosta Aguayo <[log in to unmask]> wrote:
Dear Paul, Ricarda and Bryson,

Thank you a lot for all your helping.

I am trying to write a pipeline in order to do every step correctly, so...taking into account your suggestions I have wrote the following:

1.  To create this SWM mask, FA images from all of the subjects were thresholded at 0.2–0.3, which mainly corresponds to the white matter that lies adjacent to the cortical areas,

I have individual FA images that were created after running DTIFIT. So, I do the following with every subject FA image:
fslmaths sub1_FA thr 0.2 -uthr 0.3 -bin sub1_FA_sup_wm_mask


2. A diffusion-weighted image was rigidly transformed to T1 images 

flirt -in data.nii.gz -ref t1_sub1_brain.nii.gz  -out data.to.t1 -omat data.to.t1.mat -bins 256 -cost corratio -searchrx -90 90 -searchry -90 90 -searchrz -90 90 -2D -dof 6  -interp trilinear -applyxfm


and each T1 image was nonlinearly transformed to MNI space.

flirt -ref /usr/share/fsl/5.0/data/standard/MNI152_T1_2mm_brain -in T1_brain.nii (betted) -omat T1.to.MNI.mat -out T1_brain_flirted

fnirt –in=T1_brain (not betted) --aff=T1.to.MNI.mat --config=T1_2_MNI152_2mm.cnf --cout=T1.to.MNI_field –iout=T1_brain_fnirted

applywarp --ref=/usr/share/fsl/data/standard/MNI152_T1_2mm_brain –in=T1_brain --warp=T1.to.MNI_field.nii.gz --out=wT1_brain.nii.gz

3. The concatenation of these two transformations was used to transform FA images to MNI space (I understand that they speak about linear + non linear transformations...)


converwarp -m  T1.to.MNI.mat -r  JHU ICBM FA 1mm -o test_convertwarp

applywarp --ref= JHU ICBM FA 1mm  –in=sub1_FA_sup_wm_mask --warp=test_convertwarp --out=w_sub1_FA_sup_wm_mask


All this because I need individual white matter masks perfectly registered to MNI standard space, in this case, to JHU ICBM FA 1mm atlas.....

Is this ok?

Thank you,
Rosalia









2014-10-07 16:00 GMT+02:00 paul mccarthy <[log in to unmask]>:
Hi Rosalia,

When you run 'applywarp', to apply a non-linear transformation, you can use the '--premat' option to pass in a linear transformation matrix, which will be applied before the non-linear transformation. You can achieve the same result by using the '-aff' option to fnirt.

1. Use flirt to calculate the DWI -> T1 linear transformation, making sure to save the transformation matrix using the '-omat' option.

2. Use fnirt to calculate the T1 -> standard space non-linear transformation, making sure to save the non-linear warp field image using the '--cout' option.

3. Use applywarp to apply those transformations, using '--premat' for the linear transformation matrix, and '--warp' for the non-linear warp field image.

Cheers,

Paul

On Tue, Oct 7, 2014 at 2:33 PM, Rosalia Dacosta Aguayo <[log in to unmask]> wrote:
Hi!

I have seen this: http://fsl.fmrib.ox.ac.uk/fsl/fsl-4.1.9/flirt/examples.html

To concatenate two transformations:

convert_xfm -omat AtoC.mat -concat BtoC.mat AtoB.mat

But still do not understand clearly because it is concatenating two linear matrices but as I have interpreted the paper, they concatenate one linear and on non-linear....I am lost...


Rosalia.




2014-10-07 15:08 GMT+02:00 Bryson Dietz <[log in to unmask]>:
Hey Rosalia,
Although, I am assuming they performed an affine transformation on the bet-ed T1 to the MNI brain, and followed with a non-linear transform using the non-bet-ed T1 to the non-bet-ed MNI. So perhaps they meant to say that they concatenated the two linear-transforms (DWI -(6DOF)> T1 -(12DOF)> MNI).

This would be done using convert_xfm.

The command you could use to take a linear transform and non-linear transform is applywarp (example from web page example).

applywarp --ref=example_func --in=mask_in_standard_space --warp=highres2standard_warp_inv --postmat=highres2example_func.mat --out=mask_in_functional_space

2: Not sure about this point, perhaps someone else can comment.

Cheers,

Bryson

On Tue, Oct 7, 2014 at 8:43 AM, Rosalia Dacosta Aguayo <[log in to unmask]> wrote:

I have been reading a paper and I have been following its methodology step by step but there are a couple of issues I do not understand how to do and I would be very grateful if anyone of you could help me with them.

- First point it says:

"A diffusion-weighted image was rigidly transformed to T1 images and each T1 image was non linearly transformed to MNI space"

Well, I have done it, but then it follows:  The concatenation of these two transformations was used to transform FA images to MNI space?!! How??

- Second point it says:

....the deep white matter regions from the ICBM-DTI-81 white matter labels atlas were removed from the resulting mask?! How?? I figure that I have to binarize and set to 0 the labels from ICBM_DTI_81 atlas....but I am unsure about if this is correct....



Thank you in advance for all your kindness and your time.

Yours sincerely,
Rosalia.








--
Niels Bergsland
Integration Director
Buffalo Neuroimaging Analysis Center
100 High St. Buffalo NY 14203
[log in to unmask]




--
Niels Bergsland
Integration Director
Buffalo Neuroimaging Analysis Center
100 High St. Buffalo NY 14203
[log in to unmask]