[ITK-users] Polar2Cartesian Behavior

Matt McCormick matt.mccormick at kitware.com
Sun Sep 11 13:37:48 EDT 2016


Hi Somesh,

One issue: the domain of the Polar image (Step 3) needs to be larger
if it is going to be sampled in the domain requested in Step 4. If
Step 4, the radius goes up to sqrt(20^2 + 20^2) instead of 20.

In general, a SpecialCoordinatesImage like
itkAzimuthElevationToCartesionTransform works better than using a
Transform in ITK. This is implemented here:

  https://github.com/KitwareMedical/ITKUltrasound/blob/master/include/itkCurvilinearArraySpecialCoordinatesImage.h

HTH,
Matt

On Sat, Sep 10, 2016 at 12:11 PM, Somesh <someshsandbox at gmail.com> wrote:
> Hi,
> I have a very simple polar to cartesian filter. Its similar to
> itkAzimuthElevationToCartesianTransform. The source code can be found @
> https://github.com/someshSandbox/Polar2Cartesian
>
> I generate cartesian and polar images and use the resample filter to do the
> conversion for testing. While the conversion from Cartesian to Polar works,
> Polar to conversion doesn't. The sample images can be found at the following
> links:
>
> Created Cartesian Image: origin(-20, -20) size(40,40), spacing(1, 1)
> https://github.com/someshSandbox/Polar2Cartesian/blob/master/images/Cartesian.png
>
> Used filter to convert Cartesian Image to Polar: origin(0, 0) size(20,360),
> spacing(1, 1). This works.
> https://github.com/someshSandbox/Polar2Cartesian/blob/master/images/Cartesian2Polar.png
>
> Created Polar Image: origin(0, 0) size(20,360), spacing(1, 1)
> https://github.com/someshSandbox/Polar2Cartesian/blob/master/images/Polar.png
>
> User filter to convert Polar Image to cartesian: origin(-20, -20)
> size(40,40), spacing(1,1). This doesn't work.
> https://github.com/someshSandbox/Polar2Cartesian/blob/master/images/Polar2Cartesian.png
>
> I am probably missing something trivial, but can't seem to locate the bug. I
> would appreciate if someone can review the code.
>
> Thanks,
> Somesh
>
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
>
> 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://public.kitware.com/mailman/listinfo/insight-users
>


More information about the Insight-users mailing list