Polar Transforms for ITK

Please use this identifier to cite or link to this publication: http://hdl.handle.net/1926/342
Polar transform is a geometric transform, that transforms points form cartesian coordinates to so-called polar coordinates. In case of 2D space, a point in polar coordinate system is addressed by radius and angle. In image processing, polar transform is usually used to convert rotations around the origin of polar coordinate system to translations.

This submission contains the implementation of forward and inverse polar transforms in two very simple classes for the Insight Toolkit.
Data
minus 2 Files (188Kb)
Code
minus Automatic Testing Results by Insight-Journal Dashboard on Mon Jan 22 10:29:32 2007 for revision #2
starstarstarstarstar expertise: 5 sensitivity: 4.3
yellow This project passed all of its tests.
Click here for more details.

Go here to access the main testing dashboard.
plus Automatic Testing Results by Insight-Journal Dashboard on Mon Oct 30 10:18:37 2006 for revision #1
starstarstarstarstar expertise: 5 sensitivity: 5

Reviews
minus itkTransform API change by David Doria on 2011-01-25 16:18:37 for revision #2
starstarstarstarstar expertise: 3 sensitivity: 4.7
yellow
Summary:

Since this code was written the itkTransform API has changed to require (pure virtual) SetParameters and SetFixedParameters functions to be implemented. I have attached the headers that include the previous reviewer's fixes (Cory) and these new fixes. I encourage you to create a Version 3 of this article with these patches so that the next user can download it and it will work right out of the box.

Free comment :

The code seems to work after some very brief testing.

review PolarFixedHeaders.zip (3Kb)

minus A useful transform, but some compilation problems by Cory Quammen on 2010-10-07 15:18:22 for revision #2
starstarstarstarstar expertise: 5 sensitivity: 4.7
yellow
Summary:

The author proposes two classes for transforming between Cartesian and polar (2D) or cylinder (3D) coordinate systems. These transforms seem generally useful in certain image processing and analysis tasks. Source code implementing the transforms and a test for the source code is included.

Open Science:

Source code for the transforms is provided. No input images are required to verify that the classes work correctly.


Enough details are provided to replicate the work.

Reproducibility:

I downloaded and attempted to compile the code. There were two problems:


1). In the method GetJacobian() in itkPolarToCartesianTransform.h and itkCartesianToPolarTransform.h, the line "return m_Jacobian;" needed to be changed to "return this->m_Jacobian;" to compile under ITK 3.20 with g++ 4.2.1 on Mac OS 10.6.


2). In the file itkPolarTransformTest.cxx at lines 34, 43, 51, 60, and 69, the compiler warns of a comparison between signed and unsigned integers.

Open source Contributions:

With some fixes, the source code would be immediately useful. It took about 5 minutes to fix it and get it to run. If the source code were fixed, I would change the rating to 5.

Code Quality :

The code mostly conforms to ITK's coding style. The main difference is that tabs are used instead of spaces.

Interest:

I've written a class similar to itk::CartesianToPolarTransform to compute coordinates into a 2D image that serves as a radial profile image when computing a 3D image radially symmetric about an axis. Passing this transform to the itk::ResampleImageFilter makes computation of the symmetric image easy.


I could use itk::CartesianToPolarTransform for this purpose if I could set the second coordinate value to 0. Perhaps another transform that sets a given coordinate value to a constant could be chained with itk::CartesianToPolarTransform to suit my needs.


 

Add a new review
Quick Comments
Comment by Rina Rudyanto yellow
I downloaded version 1.2, and transforming from cartesian to polar for point (1, 1) gives the result in (theta, radius). I don't know if it was intentionally so; but it looks like an error, because the conversion from polar to cartesian considers the input to be (radius, theta).


Resources
backyellow
Download All

Statistics more
backyellow
Global rating: starstarstarstarstar
Review rating: starstarstarstarstar [review]
Code rating: starstarstarstarstar
Paper Quality: plus minus
1 comment

Information more
backyellow
Categories: Geometric transforms, Geometric transforms, Transforms, Transforms
Keywords: ITK, transform, polar transform
Toolkits: ITK, CMake
Export citation:

Share
backyellow
Share

Linked Publications more
backyellow
Simulink Libraries for Visual Programming of VTK and ITK Simulink Libraries for Visual Programming of VTK and ITK
by Gobbi D., Mousavi P., Li K., Xiang J., Campigotto A., LaPointe A., Fichtinger G., Abolmaesumi P.
N4ITK:  Nick's N3 ITK Implementation For MRI Bias Field Correction N4ITK: Nick's N3 ITK Implementation For MRI Bias Field Correction
by Tustison N., Gee J.

View license
Loading license...

Send a message to the author
main_flat
ISSN 2327-770X
Powered by Midas