Thank you that is very helpful and should get me where I need to go!
(BTW with img2imgcoord I'm getting one point translated per second or
so, with multiple points sent in the same command, though I am running
on a slowish networked file system and am only using version 5.0.1)
-syam
Sent from my Android phone using TouchDown (www.nitrodesk.com)
-----Original Message-----
*From:* Mark Jenkinson [[log in to unmask]]
*Received:* Friday, 01 Nov 2013, 5:54PM
*To:* [log in to unmask] [[log in to unmask]]
*Subject:* Re: [FSL] img2imgcoord or altenative?
Hi,
It is true that the current code is inefficient, as we do not normally
convert huge numbers of coordinates, although it converts roughly 300
coordinates in 10 seconds.
The inverse of the affine matrix is used because our affine matrices
work by mapping input coordinates to reference coordinates (i.e. x_ref
= A * x_in), whereas the warp fields are most naturally stored with the
displacement vectors attached to the reference space, such that x_in =
x_ref + v(x_ref). Therefore the affine matrix is inverted so that it
goes _from_ the reference space _to_ the input space.
All the best,
Mark
On 31 Oct 2013, at 14:57, Syam Gadde <[log in to unmask]> wrote:
> Hi all,
>
> I am very interested in using img2imgcoord to translate fiber track
> points (from another tool) into MNI space using an already generated
> FNIRT warp file. I had been working on my own implementation using the
> warp field provided by fnirtfileutils, but I discovered img2imgcoord
> might be exactly what I needed.
>
> Unfortunately, it is very slow, and I'm wondering if it's because it's
> regenerating the field for every input point, even though it hasn't
> changed. i.e. this is in NewImageCoord2NewImageCoord in
> src/flirt/img2imgcoord.cpp:
>
> static volume4D<float> fieldVolume(
> fnirtfile.FieldAsNewimageVolume4D(true) );
>
> I may have to go back to my other alternative. In which case, can
> someone give some intuition why the --withaff option to fnirtfileutils
> applies the*inverse* of the affine matrix in the warp file, rather than
> the straight affine matrix? Your assistance is greatly appreciated!
>
> -syam
|