Hi FSL experts,
i have some questions about normalization procedure with fnirt. FSL tutorials say that a correct precedure would be first to use flirt for estimating affine transformation that maps an input image to the reference one in mni space; later applying fnirt by initializing the affine transformation by using --aff flag; eventually you can use applywarp to apply your transormation to your image.
For diagnostic reasons, I want displacement field and jacobian determinant as well.
An example code I made is written below
flirt -in my_scan -ref ref_scan -omat my_affine_matrix #hence 12 dof
fnirt --in=my_scan --ref=ref_scan --aff=my_affine_matrix --cout=my_spline_coeffs [--config]
applywarp --in=my_scan --out=my_warped_image --ref=ref_scan --warp=my_spline_coeffs
To get displacement field and jacobian as well, I type the following command
fnirtfileutils --in=my_spline_coeffs --ref=ref_scan --out=my_field --jac=my_jacobian --withaff
with withaff flag I include affine transformation into displacement field.
My questions are:
1)given I want to apply warping using a lower resolution reference scan, and supposing I hence have a refscan_1mm and a refscan_2mm, can I insert refscan_2mm as reference in applywarp using the spline coefficents output of fnirt where refscan was refscan_1mm?I have read somewhere else in the maillist it is doable and better than directly using refscan_2mm in fnirt command.
2)Should I insert my_affine_matrix using premat argument into applywarp to correctly have my warped image? Or is it implicitly considered given I calculate my_spline_coefficients in fnirt by using aff flag? Guides are not clear to me about this point.
3)Given i want displacement field at 2mm resolution, can I use refscan_2mm as argument in fnirtfileutils even if spline coefficients have been estimated with refscan_1mm? Is it fine or will I introduce some error or blurring by doing that?
4)Here it comes the most important question i would like to get help about: waht is the impact of affine matrix output of flirt on fnirt command?
I mean, in fnirt guide, normalization is explained as an affine matrix A plus a displacement field d. If I initialize the affine matrix into fnirt, what does that mean in the end? Wil in a taylor expansion of the final tranformation at a given point the linear part (the jacobian) always be the affine matrix I insert? Or will the jacobian be modified at each point by the transformation? Probably I have misunderstood difference between affine matrix and jacobian of transformation..What would be ideal is to get the full jacobian at each point; do you know a way for getting full jacobian of the transformation at each point? I am primarly interested on understanding what is the final affine transformation applied to the points. Will it be different at each point or the same when comparing results after using or not --aff flag in fnirt?
Sorry for this very long email, I would be gratefully for any answer or comment on my questions :)
Happy summer!
Best Regards,
Alessandro
|