Affine Registration to MNI Space chops off top of brain

443 views
Skip to first unread message

SIMON JONES

unread,
Oct 1, 2014, 6:16:48 PM10/1/14
to dt...@googlegroups.com

I have followed most of the recommended steps to align subjects dtitk images into standard space. If I do

The final step proposed on http://dti-tk.sourceforge.net/pmwiki/pmwiki.php?n=Documentation.StdSpace

dfComposition -df2 subj_combined.df.nii.gz -df1 mean_combined.df.nii.gz -out subj_to_template.df.nii.gz

I get results that look good. However, I want to follow steps similar to FSL TBSS processing. This involves non-linear warping to a group space followed by affine transformation to MNI space. Something like as FSL web site says “each subject's FA image has the nonlinear transform to the target and then the affine transform to MNI152 space applied, resulting in a transformation of the original FA image into MNI152 space (actually the two transformations are combined before being applied, to avoid having to resample the image twice).” From the FSL TBSS User Guide.

So I thought it would be best to follow the proposed steps to

dti_affine_reg template.nii.gz mean.nii.gz EDS 4 4 4 0.001 1

(explicitly dti_affine_reg IITmean_dtitk.nii.gz mean_diffeomorphic_initial6.nii.gz  EDS 4 4 4 0.001 1 )

And then create a composition of the initial df to template and the aff from the affine transformation of the group template to MNI space. So I added

dfRightComposeAffine -df subj_combined.df.nii.gz -aff mean_diffeomorphic_initial6.aff -out  subj_combined_mni.df.nii.gz
and
deformationSymTensor3DVolume –in subj.nii.gz -trans subj_combined_mni.df.nii.gz -target  IITmean_dtitk.nii.gz  -out subj_combined_mni.nii.gz

Unfortunately, although the brains subj_combined_mni.nii.gz  are roughly aligned with the template the tops of the brains are chopped off as in the attached picture. The left image is the template IITmean_dtitk.nii.gz , the orange is the df + aff transformation which I want (although I would like the tops of the brains too), and hidden behind on the right is the image made from df2 + df1 which is a full brain well aligned (better than the orange one but then it is made from 2 non-linear steps). 

Is the solution to do something like the df2 + df1 step but constrain the df2 step some way such as warping an image to itself so there are no non-linear components? I suppose in practice the area missing might not be relevant to white matter analysis.

Thank you for your help


Simon

Hui Zhang

unread,
Oct 2, 2014, 2:58:29 PM10/2/14
to DTI ToolKit (DTI-TK)
Hi Simon,

I think you have followed the steps properly.  I suspect the problem is that the physical dimension of subj_combined.df.nii.gz is smaller than the physical dimension of the IITmean_dtitk.nii.gz.  Can you check?

Gary


--

---
You received this message because you are subscribed to the Google Groups "DTI-TK" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dtitk+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

SIMON JONES

unread,
Oct 3, 2014, 11:02:38 AM10/3/14
to dt...@googlegroups.com
Hi Gary,

There are differences in voxel sizes and dimensions:

subj.nii.gz is 96x96x63 ; 2x2x2
subj_combined.df.nii.gz is 224x224x144 ; 1x1x1
IITmean_dtitk.nii.gz = 128x128x128; 1.42x1.70x1.42

In the df1 + df2 composition that works
df1 =  182x218x182 ; 1x1x1
df2 =  224x224x144 ; 1x1x1

i will have a look at a simpler method to get to the result through the FA.

Thanks

Simon

Hui Zhang

unread,
Oct 3, 2014, 12:28:53 PM10/3/14
to DTI ToolKit (DTI-TK)
This confirms my suspicion.  The physical dimension of df2 along the z-axis is 144 mm (144x1) while that of df1 is 182 mm.  So the df2 covers a much smaller area along the z-axis.  When they are combined with dfComposition, the answer will only be sensible for the overlapping area of the two.

If you can send me the relevant files, I can have a try myself.

Gary

SIMON JONES

unread,
Oct 5, 2014, 7:17:30 AM10/5/14
to dt...@googlegroups.com

DDear Gary

I have left the files at

http://www.fileconvoy.com/dfl.php?id=gae0053e9162201e1999565097ffbab2e42a13401c

Example subject
ecc_pt129_23386_dti_63_raw_s2_5_dtitk.nii.gz
ecc_pt129_23386_dti_63_raw_s2_5_dtitk.aff
ecc_pt129_23386_dti_63_raw_s2_5_dtitk_aff_diffeo.df.nii.gz
ecc_pt129_23386_dti_63_raw_s2_5_dtitk_combined.df.nii.gz
ecc_pt129_23386_dti_63_raw_s2_5_dtitk_diffeo.nii.gz


Combining Affine with the combined.df produces combined_mni.df

dti_affine_reg IITmean_dtitk.nii.gz mean_diffeomorphic_initial6.nii.gz  EDS 4 4 4 0.001

dfRightComposeAffine -df ecc_pt129_23386_dti_63_raw_s2_5_dtitk_combined.df.nii.gz -aff mean_diffeomorphic_initial6.aff -out ecc_pt129_23386_dti_63_raw_s2_5_dtitk_combined_mni.df.nii.gz

Using combined_mni.df to write a volumes results in _combined_mni but this has the top of brain missing
deformationSymTensor3DVolume –in ecc_pt129_23386_dti_63_raw_s2_5_dtitk.nii.gz -trans ecc_pt129_23386_dti_63_raw_s2_5_dtitk_combined_mni.df.nii.gz -target IITmean_dtitk.nii.gz -out ecc_pt129_23386_dti_63_raw_s2_5_dtitk_combined_df1af_mni.nii.gz


Combining two dfs as suggested looks like it works
dfComposition -df2 ecc_pt129_23386_dti_63_raw_s2_5_dtitk_combined.df.nii.gz -df1 mean_diffeomorphic_initial6_combined_mni.df.nii.gz -out ecc_pt129_23386_dti_63_raw_s2_5_dtitk_df1df2_mni.df.nii.gz

deformationSymTensor3DVolume –in ecc_pt129_23386_dti_63_raw_s2_5_dtitk.nii.gz -trans ecc_pt129_23386_dti_63_raw_s2_5_dtitk_df1df2_mni.df.nii.gz -target IITmean_dtitk.nii.gz -out ecc_pt129_23386_dti_63_raw_s2_5_dtitk_df1df2_mni.nii.gz

Simon

Yishi Wang

unread,
Oct 19, 2015, 11:11:04 PM10/19/15
to DTI-TK
Hi Simon,

Sorry to refresh this thread, but I don't understand why do you have to use affine transformation from group space to MNI space instead of the recommended steps to align subjects dtitk images into standard space?

Best
Yishi

在 2014年10月2日星期四 UTC+8上午6:16:48,SIMON JONES写道:

Hui Zhang

unread,
Oct 30, 2015, 11:32:48 AM10/30/15
to DTI ToolKit (DTI-TK)
Hi Yishi,

Affine transformation can get you 90% aligned in the MNI space.  Often this is sufficient in practice and is more robust.

Gary

--

Yishi Wang

unread,
Nov 1, 2015, 3:53:55 AM11/1/15
to DTI-TK
Thanks, Gary, and did you solve the physical dimension problem? How?

Yishi

在 2015年10月30日星期五 UTC+8下午11:32:48,Gary写道:

Jamie Hanson

unread,
Mar 22, 2016, 9:11:53 AM3/22/16
to DTI-TK
I was running into a similar problem. Any working solutions for this?
I thought about expanding the bounding box of the MNI template (but that seemed somewhat counter-productive). 

Ariadna Albajara Sáenz

unread,
Oct 21, 2019, 1:20:39 PM10/21/19
to DTI-TK
Dear all,

How was this solved? I am experiencing the same problem. The final images are chopped. I followed the same commands:

dfRightComposeAffine -aff mean_diffeomorphic_initial6.aff -df mean_diffeomorphic_initial6_aff_diffeo.df.nii.gz -out mean_combined.df.nii.gz
Ouput: mean_combined.df.nii.gz
dfComposition -df2 VRIM003_dtitk_combined.df.nii.gz -df1 mean_combined.df.nii.gz -out VRIM003_to_template.df.nii.gz
deformationSymTensor3DVolume -in VRIM003_dtitk.nii.gz -trans VRIM003_to_template.df.nii.gz -target IIT2mean.nii.gz -out VRIM003_combined_mni.nii.gz

The top of my "subj_combined_mni.nii.gz" files are chopped.

The dimensions of my "subj_dtitk_combined.df.nii.gz" files are:
Dimensions: 224x224x144
Spacing: 1x1x1

The dimensions of my "IIT2mean" image are:
Dimensions: 128x128x128
Spacing: 1.42x1.70x1.42

I am having the same problem as the person who initiated this thread. Could you please tell me how was this solved?

Thank you in advance,

Ariadna


Hui Zhang

unread,
Oct 29, 2019, 3:28:36 PM10/29/19
to DTI ToolKit (DTI-TK)
Hi Ariadna,

What is the dimension of mean_combined.df.nii.gz?  This should match IIT2mean.

Gary

--

---
You received this message because you are subscribed to the Google Groups "DTI-TK" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dtitk+un...@googlegroups.com.

Ariadna Albajara Sáenz

unread,
Oct 29, 2019, 5:35:23 PM10/29/19
to dt...@googlegroups.com
The dimensions of my "subj_dtitk_combined.df.nii.gz" files are:
Dimensions: 224x224x144
Spacing: 1x1x1

The dimensions of my "IIT2mean" image are:
Dimensions: 128x128x128
Spacing: 1.42x1.70x1.42 

Yes, they are not the same but I don't know how to solve this. 
How was this solved in the previous post? 

Thank you in advance, 

 
Ariadna Albajara Sáenz
UR2NF - Neuropsychology and Functional Imaging Research Group
CRCN - Center for Research in Cognition and Neurosciences
       
UNIVERSITÉ LIBRE DE BRUXELLES, Avenue F. Roosevelt 50, CP 151, 1050 Brussels (Belgium). 
Office: DB10-237


You received this message because you are subscribed to a topic in the Google Groups "DTI-TK" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dtitk/BRX1s6I-FuI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dtitk+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dtitk/CA%2BMh5Qfd1XZBGCwSZWX0SGHcnH0F2krWGMY24hc9%2BUgd%3DwEfpA%40mail.gmail.com.

Hui Zhang

unread,
Oct 29, 2019, 5:56:44 PM10/29/19
to DTI ToolKit (DTI-TK)
You didn't answer my question.  I was asking about a different file: mean_combined.df.nii.gz.

Gary

Ariadna Albajara Sáenz

unread,
Nov 4, 2019, 4:28:02 AM11/4/19
to dt...@googlegroups.com
Sorry, 
the dimensions of the mean_combined.di.nii.gz are: 
182x218x182
Spacing 1x1x1
origin: [0, 0, 0]

Ariadna Albajara Sáenz
UR2NF - Neuropsychology and Functional Imaging Research Group
CRCN - Center for Research in Cognition and Neurosciences
       
UNIVERSITÉ LIBRE DE BRUXELLES, Avenue F. Roosevelt 50, CP 151, 1050 Brussels (Belgium). 
Office: DB10-237

Chris Parker

unread,
Nov 13, 2019, 5:37:03 AM11/13/19
to DTI-TK
Hi Ariadna,

Your population -> atlas transformation appears to be the correct size, but your subject -> atlas transformation is the wrong size.

Therefore, I would say there is an error somewhere with how the transformations (subject->population & population->template) were composed.

Did you use dfRightComposeAffine for both subject -> population and population -> template, followed by dfComposition on the resulting transformation fields?

Best,
Chris


On Monday, 4 November 2019 09:28:02 UTC, Ariadna Albajara Sáenz wrote:
Sorry, 
the dimensions of the mean_combined.di.nii.gz are: 
182x218x182
Spacing 1x1x1
origin: [0, 0, 0]

Ariadna Albajara Sáenz
UR2NF - Neuropsychology and Functional Imaging Research Group
CRCN - Center for Research in Cognition and Neurosciences
       
UNIVERSITÉ LIBRE DE BRUXELLES, Avenue F. Roosevelt 50, CP 151, 1050 Brussels (Belgium). 
Office: DB10-237


El mar., 29 oct. 2019 a las 22:56, Hui Zhang (<garyhu...@gmail.com>) escribió:
You didn't answer my question.  I was asking about a different file: mean_combined.df.nii.gz.

Gary

On Tue, Oct 29, 2019 at 9:35 PM Ariadna Albajara Sáenz <ariadna...@gmail.com> wrote:
The dimensions of my "subj_dtitk_combined.df.nii.gz" files are:
Dimensions: 224x224x144
Spacing: 1x1x1

The dimensions of my "IIT2mean" image are:
Dimensions: 128x128x128
Spacing: 1.42x1.70x1.42 

Yes, they are not the same but I don't know how to solve this. 
How was this solved in the previous post? 

Thank you in advance, 

 
Ariadna Albajara Sáenz
Office: DB10-237


To unsubscribe from this group and stop receiving emails from it, send an email to dt...@googlegroups.com.

--

---
You received this message because you are subscribed to a topic in the Google Groups "DTI-TK" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dtitk/BRX1s6I-FuI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dt...@googlegroups.com.

--

---
You received this message because you are subscribed to the Google Groups "DTI-TK" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dt...@googlegroups.com.

--

---
You received this message because you are subscribed to the Google Groups "DTI-TK" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dt...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages