[Insight-users] Cartesian to polar image transform

Luis Ibanez luis.ibanez@kitware.com
Sun, 09 Mar 2003 10:08:04 -0500


Hi Yoav,

ITK has a generic filter for performing coordinate
system transformations. You only need to provide the
specific transform to the filter.

This is discussed in detail in the SoftwareGuide,

   http://www.itk.org/ItkSoftwareGuide.pdf

In Section 5.7, pdf-pages 138 to 156.

The filter in question is the

http://public.kitware.com/Insight/Doxygen/html/classitk_1_1ResampleImageFilter.html

---

Probably the closest transform to what you need
is the:

  itkAzimuthElevationToCartesianTransform.h

http://www.itk.org/Insight/Doxygen/html/classitk_1_1AzimuthElevationToCartesianTransform.html

This transform was designed by the CMU and Pittsburgh
groups in order to manage the coordinate system of
3D Ultra Sound images.

 From your message it sounds like you are only interested in 2D.
In that case, you may have to write your own transform.

Just follow the rules below:

1) your transform should derive from the itk::Transform class

2) your transform should define the methods:

    TransformPoint()
    TransformVector()
    TransformCovariantVector()

3) Optionally you can define the computation of the Jacobian...
    but you may want to leave this for a second refinement of
    the class.

----

As far as the ResampleImageFilter is concerned, it should be
enough to define the method "TransformPoint()".


An easy way to start is to take a simple transform, like the
itk::TranslationTransform and start modifying its code.

If you get a consitent transform and would like to contribute
it, we will be happy to include it in the toolkit.


Please let us know if you have further problems,


Thanks


    Luis


--------------------------------------
Yoav Zur wrote:
> Hi,
> 
> I need to convert images from Cartesian to polar coordinates.
> For example, if I have an image of a circle with its center at the 
> center of the image, I want to convert it into an image of a horizontal 
> line.
> 
> Is there an itk filter that does that?  If not, is there a simple method 
> to accomplish it using existing itk filters, or do I have to write my 
> own filter?
> 
> Thanks in advance.
> 
> *Yoav Zur*
> *Software Eng.*
> *MediGuide LTD.*
> *Phone: 972-4-8317079*
> *Fax: 972-4-8550412*
> *mailto: yoav_zur@mediguide.co.il*