[Insight-users] affine transform without scaling?
Darren Weber
darren.weber.lists at gmail.com
Wed Oct 28 16:50:53 EDT 2009
On Sun, Oct 25, 2009 at 2:35 PM, Luis Ibanez <luis.ibanez at kitware.com>wrote:
> Hi Darren,
>
> This looks like a very interesting problem.
>
> Robert's advice is probably the first thing to try
> (using the Rigid transform).
>
> ...Although...
> you mentioned that you expect to have a deformation
> on every slice...
>
> Do you think that you actually will need shearing
> and... maybe a BSpline deformation ?
>
Current work is exploring the application of Affine and BSpline transforms.
It appears that BSpline transforms may be useful (with a low order).
Anyhow, the scale problem is pressing at the moment.
Looking at 'InsightToolkit-3.16.0/Code/Common/itkAffineTransform.h', it
contains:
/** Compose affine transformation with a scaling
*
* This method modifies self to magnify the source by a given
* factor along each axis. If all factors are the same, or only a
* single factor is given, then the scaling is isotropic;
* otherwise it is anisotropic. If an odd number of factors are
* negative, then the parity of the image changes. If any of the
* factors is zero, then the transformation becomes a projection
* and is not invertible. The scaling is precomposed with self if
* pre is true, and postcomposed otherwise.
* Note that the scaling is applied centered at the origin. */
void Scale(const OutputVectorType &factor, bool pre=0);
void Scale(const TScalarType &factor, bool pre=0);
This may provide a way to 'undo' the scale component of the AffineTransform.
Is it true that myAffineTFM->Scale(0, false) would undo the scale component
of the transform?
Is the scalar factor input a 1 or 0 to 'remove' the scale component from the
transform? The scalar value 1 is probably not going to work, because the
composition is a multiplication (?). Is the use of a zero factor the right
choice here or does it do something else?
Perhaps we can clarify the meaning of this for me: "If any of the factors
is zero, then the transformation becomes a projection and is not
invertible."
My assumption is that the Scale is independent of the other affine
components (rotation, shear, translation), but using the method as above to
'undo' the scale component may have other consequences if that assumption
doesn't hold true.
In some respects, it would be nice to pull out the scale values to check for
significant anisotropy before discarding the scale. Unfortunately there is
no GetScale method (right?). It appears that such methods, Set/Get Scale,
are available in Common/itkScalableAffineTransform.h. However, my problem
would not be suitable for using that class directly. Perhaps the methods
for Set/Get Scale in itkScalableAffineTransform could migrate up to
itkAffineTransform? Should I consider programming a custom sub-class to get
those methods for the AffineTransform?
Many thanks,
Darren
>
>
> Luis
>
>
>
> -------------------------------------------------------------------------------------------------
> On Sat, Oct 24, 2009 at 11:16 PM, Darren Weber
> <darren.weber.lists at gmail.com> wrote:
> >
> >
> > On Sat, Oct 24, 2009 at 7:58 PM, Darren Weber <
> darren.weber.lists at gmail.com>
> > wrote:
> >>
> >> Is there an easy way to turn off the scaling component of an affine
> >> transform?
> >>
> >> Is there a method in itkAffineTransform to set the scale component to a
> >> constant?
> >>
> >> Would you manually pull out the matrix, etc., modify it and then reset
> it
> >> in the itkAffineTransform?
> >>
> >> TIA,
> >> Darren
> >>
> >
> > PS, Maybe a geometric problem can help (or obscure) the problem.
> Imagine a
> > series of conic sections, starting at the tip of a cone and working down
> > toward the base. Each of these 2D conic sections needs to be registered
> > into a 3D volume to recreate the cone. If each section were a "pure"
> > section taken along the axis from the tip to the center of the base, this
> > would be fairly trivial as a rigid-body registration (probably no
> > registration at all is required, just a known sequence of slices).
> However,
> > assume each section has an unknown deformation (but the series of
> sections
> > is given in a known order). If the affine registration starts at the tip
> > (img001) and propagates all the way to the base (img100), the final
> diameter
> > of the base section will be decreased to about the same diameter as the
> tip.
> >
> > The real problem is a series of microscopy images for a worm, which has a
> > smaller diameter at the head and tail than in the body.
> >
> >
> > _____________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Please keep messages on-topic and check the ITK FAQ at:
> > http://www.itk.org/Wiki/ITK_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.itk.org/mailman/listinfo/insight-users
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20091028/0700fede/attachment.htm>
More information about the Insight-users
mailing list