ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkAzimuthElevationToCartesianTransform.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkAzimuthElevationToCartesianTransform_h
19 #define itkAzimuthElevationToCartesianTransform_h
20 
21 #include "itkAffineTransform.h"
22 #include "itkMath.h"
23 
24 namespace itk
25 {
83 template<typename TParametersValueType=double,
84  unsigned int NDimensions = 3>
85 class ITK_TEMPLATE_EXPORT AzimuthElevationToCartesianTransform:
86  public AffineTransform<TParametersValueType, NDimensions>
87 {
88 public:
94 
96  itkStaticConstMacro(SpaceDimension, unsigned int, NDimensions);
97  itkStaticConstMacro( ParametersDimension, unsigned int,
98  NDimensions * ( NDimensions + 1 ) );
100 
103 
105  itkNewMacro(Self);
106 
108  typedef typename Superclass::ParametersType ParametersType;
109  typedef typename Superclass::FixedParametersType FixedParametersType;
110  typedef typename Superclass::TransformCategoryType TransformCategoryType;
111 
113  typedef typename Superclass::JacobianType JacobianType;
114 
116  typedef typename Superclass::ScalarType ScalarType;
117 
119  typedef typename Superclass::InputPointType InputPointType;
120  typedef typename Superclass::OutputPointType OutputPointType;
121 
123  typedef Matrix< TParametersValueType, itkGetStaticConstMacro(SpaceDimension),
124  itkGetStaticConstMacro(SpaceDimension) > MatrixType;
125 
127  void SetAzimuthElevationToCartesianParameters(
128  const double sampleSize,
129  const double blanking,
130  const long maxAzimuth,
131  const long maxElevation,
132  const double azimuthAngleSeparation,
133  const double elevationAngleSeparation);
134 
135  void SetAzimuthElevationToCartesianParameters(const double sampleSize,
136  const double blanking,
137  const long maxAzimuth,
138  const long maxElevation);
139 
141  OutputPointType TransformPoint(const InputPointType & point) const ITK_OVERRIDE;
142 
144  inline InputPointType BackTransform(const OutputPointType & point) const
145  {
146  InputPointType result;
147 
148  if ( m_ForwardAzimuthElevationToPhysical )
149  {
150  result = static_cast< InputPointType >( TransformCartesianToAzEl(point) );
151  }
152  else
153  {
154  result = static_cast< InputPointType >( TransformAzElToCartesian(point) );
155  }
156  return result;
157  }
158 
160  {
161  return BackTransform(point);
162  }
163 
164 
167  virtual TransformCategoryType GetTransformCategory() const ITK_OVERRIDE
168  {
169  return Self::UnknownTransformCategory;
170  }
171 
174  void SetForwardAzimuthElevationToCartesian();
175 
178  void SetForwardCartesianToAzimuthElevation();
179 
182  OutputPointType TransformAzElToCartesian(const InputPointType & point) const;
183 
186  OutputPointType TransformCartesianToAzEl(const OutputPointType & point) const;
187 
192  itkSetMacro(MaxAzimuth, long);
193  itkGetConstMacro(MaxAzimuth, long);
195 
200  itkSetMacro(MaxElevation, long);
201  itkGetConstMacro(MaxElevation, long);
203 
205  itkSetMacro(RadiusSampleSize, double);
206  itkGetConstMacro(RadiusSampleSize, double);
208 
210  itkSetMacro(AzimuthAngularSeparation, double);
211  itkGetConstMacro(AzimuthAngularSeparation, double);
213 
215  itkSetMacro(ElevationAngularSeparation, double);
216  itkGetConstMacro(ElevationAngularSeparation, double);
218 
220  itkSetMacro(FirstSampleDistance, double);
221  itkGetConstMacro(FirstSampleDistance, double);
223 
224 protected:
227 
229  virtual ~AzimuthElevationToCartesianTransform() ITK_OVERRIDE;
230 
232  void PrintSelf(std::ostream & s, Indent indent) const ITK_OVERRIDE;
233 
234 private:
235  ITK_DISALLOW_COPY_AND_ASSIGN(AzimuthElevationToCartesianTransform);
236 
237  long m_MaxAzimuth;
238  long m_MaxElevation;
239  double m_RadiusSampleSize;
240  double m_AzimuthAngularSeparation;
241  double m_ElevationAngularSeparation;
242  double m_FirstSampleDistance;
243  bool m_ForwardAzimuthElevationToPhysical;
244 }; //class AzimuthElevationToCartesianTransform
245 } // namespace itk
246 
247 #ifndef ITK_MANUAL_INSTANTIATION
248 #include "itkAzimuthElevationToCartesianTransform.hxx"
249 #endif
250 
251 #endif /* itkAzimuthElevationToCartesianTransform_h */
AffineTransform< TParametersValueType, NDimensions > Superclass
A templated class holding a M x N size Matrix.
Definition: itkMatrix.h:53
Light weight base class for most itk classes.
InputPointType BackTransformPoint(const OutputPointType &point) const
virtual TransformCategoryType GetTransformCategory() const override
Transforms from an azimuth, elevation, radius coordinate system to a Cartesian coordinate system...
Matrix< TParametersValueType, itkGetStaticConstMacro(SpaceDimension), itkGetStaticConstMacro(SpaceDimension) > MatrixType
InputPointType BackTransform(const OutputPointType &point) const
Superclass::OutputPointType OutputPointType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Superclass::InputPointType InputPointType