#ifndef _itkPolarToCartesianTransform_txx #define _itkPolarToCartesianTransform_txx #include "itkPolarToCartesianTransform.h" namespace itk { // Constructor with default arguments template PolarToCartesianTransform:: PolarToCartesianTransform():Superclass(NDimensions,0) { return; } // Destructor template PolarToCartesianTransform:: ~PolarToCartesianTransform() { return; } // Print self template void PolarToCartesianTransform:: PrintSelf(std::ostream &os, Indent indent) const { Superclass::PrintSelf(os,indent); } // Transform a point template typename PolarToCartesianTransform::OutputPointType PolarToCartesianTransform:: TransformPoint(const InputPointType &point) const { if (NDimensions < 2) { itkExceptionMacro(<< "Method not applicable for dimension lower than 2."); return OutputPointType(); } OutputPointType opoint(point); opoint[0] = point[1] * cos(point[0]); //r*cos(alpha) opoint[1] = point[1] * sin(point[0]); //r*sin(alpha) return opoint; } } // namespace #endif