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

For Azimuth = 0 and Elevation = 45, the result is:</div><div>Azimuth: 0.00872665 (instead of 0) Elevation: 0.794125 (instead of 0.785398163)</div><div><br></div><div>Replace with the below and it will behave as expected:</div>
<div><div>  ScalarType Azimuth = ((2*vnl_math::pi) / 360) * (point[0]);</div></div><div><div>  ScalarType Elevation   = ((2*vnl_math::pi) / 360) * point[1]);</div></div><div><br></div><div><br></div><div><br></div><div><br>
</div><div><br></div><div class="gmail_quote">
On Thu, Mar 17, 2011 at 3:01 PM, David Doria <span dir="ltr">&lt;<a href="mailto:daviddoria@gmail.com" target="_blank">daviddoria@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div>I am confused about the output of this filter:</div><div><br></div><a href="http://www.itk.org/Wiki/ITK/Examples/Utilities/AzimuthElevationToCartesianTransform" target="_blank">http://www.itk.org/Wiki/ITK/Examples/Utilities/AzimuthElevationToCartesianTransform</a><div>


<br></div><div>My input is AzEl(0, 45, 1) - which I interpret to mean &quot;45 degree elevation, distance 1 from the origin&quot;</div><div><br></div><div>The output of azimuthElevation-&gt;TransformAzElToCartesian(AzEl) is:</div>


<div><br></div><div><div>Cartesian: [0.00611663, 0.713237, 0.700896]</div></div><div><br></div><div>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?</div>


<div><a href="http://www.itk.org/Wiki/ITK/Examples/Utilities/AzimuthElevationToCartesianTransform" target="_blank"></a><br clear="all">Thanks,<br><br>David<br>
</div>
<br>_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br></blockquote></div><br></div>