00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __itkAzimuthElevationToCartesianTransform_h
00019 #define __itkAzimuthElevationToCartesianTransform_h
00020
00021 #include "itkAffineTransform.h"
00022 #include "vnl/vnl_math.h"
00023
00024 namespace itk
00025 {
00026
00077 template < class TScalarType=float,
00078 unsigned int NDimensions=3 >
00079 class ITK_EXPORT AzimuthElevationToCartesianTransform :
00080 public AffineTransform< TScalarType, NDimensions >
00081 {
00082 public:
00084 typedef AzimuthElevationToCartesianTransform Self;
00085 typedef AffineTransform< TScalarType, NDimensions > Superclass;
00086 typedef SmartPointer<Self> Pointer;
00087 typedef SmartPointer<const Self> ConstPointer;
00088
00090 itkStaticConstMacro(SpaceDimension, unsigned int, NDimensions);
00091 itkStaticConstMacro(ParametersDimension, unsigned int,
00092 NDimensions * (NDimensions+1) );
00094
00096 itkTypeMacro( AzimuthElevationToCartesianTransform, AffineTransform);
00097
00099 itkNewMacro( Self );
00100
00102 typedef typename Superclass::ParametersType ParametersType;
00103
00105 typedef typename Superclass::JacobianType JacobianType;
00106
00108 typedef typename Superclass::ScalarType ScalarType;
00109
00111 typedef typename Superclass::InputPointType InputPointType;
00112 typedef typename Superclass::OutputPointType OutputPointType;
00113
00115 typedef Matrix<TScalarType, itkGetStaticConstMacro(SpaceDimension),
00116 itkGetStaticConstMacro(SpaceDimension)> MatrixType;
00117
00119 void SetAzimuthElevationToCartesianParameters(
00120 const double sampleSize,
00121 const double blanking,
00122 const long maxAzimuth,
00123 const long maxElevation,
00124 const double azimuthAngleSeparation,
00125 const double elevationAngleSeparation);
00126
00127 void SetAzimuthElevationToCartesianParameters( const double sampleSize,
00128 const double blanking,
00129 const long maxAzimuth,
00130 const long maxElevation);
00131
00133 OutputPointType TransformPoint (const InputPointType &point ) const;
00134
00136 inline InputPointType BackTransform(const OutputPointType &point ) const;
00137 InputPointType BackTransformPoint(const OutputPointType &point) const;
00139
00142 void SetForwardAzimuthElevationToCartesian();
00143
00146 void SetForwardCartesianToAzimuthElevation();
00147
00150 OutputPointType TransformAzElToCartesian(const InputPointType &point) const;
00151
00154 OutputPointType TransformCartesianToAzEl(const OutputPointType &point) const;
00155
00160 itkSetMacro(MaxAzimuth, long);
00161
00166 itkSetMacro(MaxElevation, long);
00167
00169 itkSetMacro(RadiusSampleSize, double);
00170
00172 itkSetMacro(AzimuthAngularSeparation, double);
00173
00175 itkSetMacro(ElevationAngularSeparation, double);
00176
00178 itkSetMacro(FirstSampleDistance, double);
00179
00180 protected:
00182 AzimuthElevationToCartesianTransform();
00183
00185 virtual ~AzimuthElevationToCartesianTransform();
00186
00188 void PrintSelf(std::ostream &s, Indent indent) const;
00189
00190 private:
00191 AzimuthElevationToCartesianTransform(const Self&);
00192
00193 void operator=(const Self&);
00194
00195 long m_MaxAzimuth;
00196 long m_MaxElevation;
00197 double m_RadiusSampleSize;
00198 double m_AzimuthAngularSeparation;
00199 double m_ElevationAngularSeparation;
00200 double m_FirstSampleDistance;
00201 bool m_ForwardAzimuthElevationToPhysical;
00202
00203 };
00204
00205
00206 }
00207
00208
00209 #ifndef ITK_MANUAL_INSTANTIATION
00210 #include "itkAzimuthElevationToCartesianTransform.txx"
00211 #endif
00212
00213 #endif
00214