[Insight-users] AzimuthElevationToCartesianTransform

robert tamburo robert.tamburo at gmail.com
Thu Mar 17 16:07:18 EDT 2011


Looks like there's some error in these calculations:
  ScalarType Azimuth = ((2*vnl_math::pi) / 360)
                       * (point[0]*m_AzimuthAngularSeparation
                       - ((m_MaxAzimuth-1)/2.0) );
  ScalarType Elevation   = ((2*vnl_math::pi) / 360)
                           * (point[1]*m_ElevationAngularSeparation
                           - ((m_MaxElevation-1)/2.0) );

For Azimuth = 0 and Elevation = 45, the result is:
Azimuth: 0.00872665 (instead of 0) Elevation: 0.794125 (instead
of 0.785398163)

Replace with the below and it will behave as expected:
  ScalarType Azimuth = ((2*vnl_math::pi) / 360) * (point[0]);
  ScalarType Elevation   = ((2*vnl_math::pi) / 360) * point[1]);





On Thu, Mar 17, 2011 at 3:01 PM, David Doria <daviddoria at gmail.com> wrote:

> I am confused about the output of this filter:
>
>
> http://www.itk.org/Wiki/ITK/Examples/Utilities/AzimuthElevationToCartesianTransform
>
> My input is AzEl(0, 45, 1) - which I interpret to mean "45 degree
> elevation, distance 1 from the origin"
>
> The output of azimuthElevation->TransformAzElToCartesian(AzEl) is:
>
> Cartesian: [0.00611663, 0.713237, 0.700896]
>
> I would have expected exactly zero in one dimensions, and the other two
> dimensions exactly equal to each other. Can anyone explain where I am
> misinterpreting?
> <http://www.itk.org/Wiki/ITK/Examples/Utilities/AzimuthElevationToCartesianTransform>
> Thanks,
>
> David
>
> _____________________________________
> 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.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/20110317/560a392a/attachment.htm>


More information about the Insight-users mailing list