ITK  5.0.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:
89  ITK_DISALLOW_COPY_AND_ASSIGN(AzimuthElevationToCartesianTransform);
90 
96 
98  static constexpr unsigned int SpaceDimension = NDimensions;
99  static constexpr unsigned int ParametersDimension = NDimensions * ( NDimensions + 1 );
100 
103 
105  itkNewMacro(Self);
106 
108  using ParametersType = typename Superclass::ParametersType;
109  using FixedParametersType = typename Superclass::FixedParametersType;
110  using TransformCategoryType = typename Superclass::TransformCategoryType;
111 
113  using JacobianType = typename Superclass::JacobianType;
114  using JacobianPositionType = typename Superclass::JacobianPositionType;
115  using InverseJacobianPositionType = typename Superclass::InverseJacobianPositionType;
116 
118  using ScalarType = typename Superclass::ScalarType;
119 
121  using InputPointType = typename Superclass::InputPointType;
122  using OutputPointType = typename Superclass::OutputPointType;
123 
125  using MatrixType = Matrix< TParametersValueType, Self::SpaceDimension,
126  Self::SpaceDimension >;
127 
129  void SetAzimuthElevationToCartesianParameters(
130  const double sampleSize,
131  const double blanking,
132  const long maxAzimuth,
133  const long maxElevation,
134  const double azimuthAngleSeparation,
135  const double elevationAngleSeparation);
136 
137  void SetAzimuthElevationToCartesianParameters(const double sampleSize,
138  const double blanking,
139  const long maxAzimuth,
140  const long maxElevation);
141 
143  OutputPointType TransformPoint(const InputPointType & point) const override;
144 
146  inline InputPointType BackTransform(const OutputPointType & point) const
147  {
148  InputPointType result;
149 
150  if ( m_ForwardAzimuthElevationToPhysical )
151  {
152  result = static_cast< InputPointType >( TransformCartesianToAzEl(point) );
153  }
154  else
155  {
156  result = static_cast< InputPointType >( TransformAzElToCartesian(point) );
157  }
158  return result;
159  }
160 
162  {
163  return BackTransform(point);
164  }
165 
166 
170  {
171  return Self::UnknownTransformCategory;
172  }
173 
176  void SetForwardAzimuthElevationToCartesian();
177 
180  void SetForwardCartesianToAzimuthElevation();
181 
184  OutputPointType TransformAzElToCartesian(const InputPointType & point) const;
185 
188  OutputPointType TransformCartesianToAzEl(const OutputPointType & point) const;
189 
194  itkSetMacro(MaxAzimuth, long);
195  itkGetConstMacro(MaxAzimuth, long);
197 
202  itkSetMacro(MaxElevation, long);
203  itkGetConstMacro(MaxElevation, long);
205 
207  itkSetMacro(RadiusSampleSize, double);
208  itkGetConstMacro(RadiusSampleSize, double);
210 
212  itkSetMacro(AzimuthAngularSeparation, double);
213  itkGetConstMacro(AzimuthAngularSeparation, double);
215 
217  itkSetMacro(ElevationAngularSeparation, double);
218  itkGetConstMacro(ElevationAngularSeparation, double);
220 
222  itkSetMacro(FirstSampleDistance, double);
223  itkGetConstMacro(FirstSampleDistance, double);
225 
226 protected:
229 
231  ~AzimuthElevationToCartesianTransform() override = default;
232 
234  void PrintSelf(std::ostream & s, Indent indent) const override;
235 
236 private:
244 }; //class AzimuthElevationToCartesianTransform
245 } // namespace itk
246 
247 #ifndef ITK_MANUAL_INSTANTIATION
248 #include "itkAzimuthElevationToCartesianTransform.hxx"
249 #endif
250 
251 #endif /* itkAzimuthElevationToCartesianTransform_h */
A templated class holding a M x N size Matrix.
Definition: itkMatrix.h:49
Light weight base class for most itk classes.
typename Superclass::JacobianType JacobianType
InputPointType BackTransformPoint(const OutputPointType &point) const
typename Superclass::JacobianPositionType JacobianPositionType
typename Superclass::MatrixType MatrixType
typename Superclass::FixedParametersType FixedParametersType
Transforms from an azimuth, elevation, radius coordinate system to a Cartesian coordinate system...
InputPointType BackTransform(const OutputPointType &point) const
typename Superclass::OutputPointType OutputPointType
typename Superclass::InputPointType InputPointType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
typename Superclass::ParametersType ParametersType
typename Superclass::ScalarType ScalarType
typename Superclass::InverseJacobianPositionType InverseJacobianPositionType