Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkAzimuthElevationToCartesianTransform.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkAzimuthElevationToCartesianTransform.h,v $
00005   Language:  C++
00006   Date:      $Date: 2007-01-25 23:18:04 $
00007   Version:   $Revision: 1.22 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
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,  // Data type for scalars
00078            unsigned int NDimensions=3 > // (e.g. float or double)
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     {
00138     InputPointType result; 
00139     if( m_ForwardAzimuthElevationToPhysical ) 
00140       {
00141       result = static_cast<InputPointType>(TransformCartesianToAzEl(point));
00142       }
00143     else 
00144       {
00145       result = static_cast<InputPointType>(TransformAzElToCartesian(point));
00146       }
00147     return result;
00148     } 
00150 
00151   inline InputPointType  BackTransformPoint(const OutputPointType  &point) const
00152     {
00153     return BackTransform(point);
00154     }
00155     
00158   void SetForwardAzimuthElevationToCartesian();
00159 
00162   void SetForwardCartesianToAzimuthElevation();
00163 
00166   OutputPointType TransformAzElToCartesian(const InputPointType &point) const; 
00167 
00170   OutputPointType TransformCartesianToAzEl(const OutputPointType &point) const;
00171 
00176   itkSetMacro(MaxAzimuth, long);
00177 
00182   itkSetMacro(MaxElevation, long);
00183 
00185   itkSetMacro(RadiusSampleSize, double);
00186 
00188   itkSetMacro(AzimuthAngularSeparation, double);
00189 
00191   itkSetMacro(ElevationAngularSeparation, double);
00192 
00194   itkSetMacro(FirstSampleDistance, double);
00195 
00196 protected:
00198   AzimuthElevationToCartesianTransform();
00199 
00201   virtual ~AzimuthElevationToCartesianTransform();
00202 
00204   void PrintSelf(std::ostream &s, Indent indent) const;
00205 
00206 private:
00207   AzimuthElevationToCartesianTransform(const Self&); // purposely not
00208                                                      // implemented
00209   void operator=(const Self&); //purposely not implemented
00210 
00211   long    m_MaxAzimuth;
00212   long    m_MaxElevation;
00213   double  m_RadiusSampleSize;
00214   double  m_AzimuthAngularSeparation;
00215   double  m_ElevationAngularSeparation;
00216   double  m_FirstSampleDistance;
00217   bool    m_ForwardAzimuthElevationToPhysical;
00218 
00219 }; //class AzimuthElevationToCartesianTransform
00220 
00221 
00222 }  // namespace itk
00223 
00224 // Define instantiation macro for this template.
00225 #define ITK_TEMPLATE_AzimuthElevationToCartesianTransform(_, EXPORT, x, y) \
00226   namespace itk { \
00227   _(2(class EXPORT AzimuthElevationToCartesianTransform< ITK_TEMPLATE_2 x >)) \
00228   namespace Templates { \
00229   typedef AzimuthElevationToCartesianTransform< ITK_TEMPLATE_2 x > \
00230   AzimuthElevationToCartesianTransform##y; } \
00231   }
00232 
00233 #if ITK_TEMPLATE_EXPLICIT
00234 # include "Templates/itkAzimuthElevationToCartesianTransform+-.h"
00235 #endif
00236 
00237 #if ITK_TEMPLATE_TXX
00238 # include "itkAzimuthElevationToCartesianTransform.txx"
00239 #endif
00240 
00241 #endif /* __itkAzimuthElevationToCartesianTransform_h */
00242 

Generated at Mon Jul 12 2010 17:45:38 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000