[Insight-users] use of transform with itk volume

Luis Ibanez luis.ibanez@kitware.com
Fri, 29 Nov 2002 13:41:55 -0500


Hi Jorn,

The scale factors can still be extracted from a 3x3
matrix that combines rotation and scaling.

You basically compute the eigenvalues of the matrix.
A pure rotational matrix should have 3 eigenvalues
equal to 1.0

This is still a manual solution, and probably not the
best way to go in the long run.

An alternative is to add a second set of Interpolators
which will delegate the computation of Point->Index to
the images. The image will use its internal transform.

The advantage of this option is that users who don't
care about generic transform can continue using the
current interpolators. Users interested in the generic
transform could use the new set, with some performance
penalty. At least the cost in performance will only
be paid when it is actually useful.

Another option is to add a boolean to the class
itkImageFunction which is the base class of the interpolator
where the Point to Index computation are performed.

Depending on this boolean the computation could be done
using spacing/origin or by delegating to the image.

This last option seems to be easier to try.



   Luis



=====================================


J. Van Dalen wrote:

> Dear Luis,
> 
... 
> 
> Okee, but I only succeed in doing this for some specific
> images (eg CT or PET). Eg when I have an image with the following 
> initial transformation (indextophysical transform):
> 0.78 0 0 -206.61
> 0 0.78 0 -348.61
> 0.00 0.00 8.00 79.50
> 0.00 0.00 0.00 1.00
> Then the spacing is given by (0.78,0.78,8.00) and the
> origin by (-206.61,-348.61,79.50). Now, I can use
> SetSpacing and SetOrigin as you suggested.
> 
> However, when I have the following initial (=indextophysical) transform 
> (eg from a MRI):
> 0.78 0.00 0.00 -85.13
> 0.00 0.76 0.67 -90.17
> 0.00 0.18 -2.92 29.36
> 0.00 0.00 0.00 1.00
> then I do not know what the spacing is (due to a present rotation).
> What to do? I want to connect this initial transform to the
> image, but even if I would be able to subtract both the spacing
> and origin from this, I would still have to take into account the 
> present rotation.
> 
> Regards,
> Jorn.
>