Dear Giovanni,
there is actually a very easy way to obtain what you are after. If you
"start" your fnirt with the affine matrix you obtain from flirt, i.e.
run
fnirt --ref=JHU-ICBM-FA-2mm --in=FA --affine=affine.mat --
config=conf.cnf --cout=LinearAndnonLinear
then both the affine and the non-linear parts will be reflected in
LinearAndnonLinear, and you can just use fnirtfileutils to obtain the
Jacobian of the combined transform.
I hope that answers your question?
Good Luck Jesper
On 17 Mar 2010, at 16:25, Giovanni Giulietti wrote:
> Dear FSL users,
>
> I have normalized a fractional anisotropy map, called "FA", on the
> FA atlas
> "JHU-ICBM-FA-2mm". I used a double transformation obtained applying
> first an
> affine transformation (flirt: input FA --> output
> FA_affine_trasformed),
> followed by a non-linear one (fnirt: input FA_affine_trasformed -->
> output
> FA_warped).
> Now, I'm interested in computing the jacobian of the total
> transformation,
> excluding the roto-translational component of the affine
> transformation, to
> obtain a quantitative parameter of deformation (shrinking,
> enlargement) that
> each voxel of the original FA map underwent to match the FA atlas.
>
> I used the following FSL commands:
>
> flirt -ref JHU-ICBM-FA-2mm -in FA -out FA_affine_trasformed -dof 12 -
> omat
> affine.mat
>
> I used the following 3 instructions to compute the roto-translation
> (6 dof)
> component of affine.mat, that I called D6.mat, and D12.mat that
> represent
> the affine transformations without the D6.mat component:
>
> avscale affine.mat | sed -n 2,5\p > D6.mat
> convert_xfm -omat invD6.mat -inverse D6.mat
> convert_xfm -omat D12.mat -concat invD6.mat affine.mat
>
> Then I ran the command:
> fnirt --ref=JHU-ICBM-FA-2mm --in=FA_affine_trasformed --
> config=conf.cnf
> --cout=nonLinear
>
> Then, to compute the "merged" transformation "D12_nonLinear", I used
> this
> instruction:
> convertwarp --ref=nonLinear --warp1=nonLinear --premat=D12.mat
> --out=D12_nonLinear --relout
>
> After that, to obtain the jacobian of the "total" transformation:
> fnirtfileutils --in=D12_nonLinear --ref=JHU-ICBM-FA-2mm
> --jac=jac_D12_nonLinear --withaff
>
> I'd like to know if it makes sense to compute the jacobian of this
> double
> transformation (D12+nonLinear), and if so, if this was the right way
> to proceed.
>
> Thanks for the help
> Giovanni
>
|