ITK  5.2.0
Insight Toolkit
itkAzimuthElevationToCartesianTransform.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
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 {
87 template <typename TParametersValueType = double, unsigned int NDimensions = 3>
88 class ITK_TEMPLATE_EXPORT AzimuthElevationToCartesianTransform
89  : public AffineTransform<TParametersValueType, NDimensions>
90 {
91 public:
92  ITK_DISALLOW_COPY_AND_ASSIGN(AzimuthElevationToCartesianTransform);
93 
99 
101  static constexpr unsigned int SpaceDimension = NDimensions;
102  static constexpr unsigned int ParametersDimension = NDimensions * (NDimensions + 1);
103 
106 
108  itkNewMacro(Self);
109 
111  using ParametersType = typename Superclass::ParametersType;
112  using FixedParametersType = typename Superclass::FixedParametersType;
113  using TransformCategoryEnum = typename Superclass::TransformCategoryEnum;
114 
116  using JacobianType = typename Superclass::JacobianType;
117  using JacobianPositionType = typename Superclass::JacobianPositionType;
118  using InverseJacobianPositionType = typename Superclass::InverseJacobianPositionType;
119 
121  using ScalarType = typename Superclass::ScalarType;
122 
124  using InputPointType = typename Superclass::InputPointType;
125  using OutputPointType = typename Superclass::OutputPointType;
126 
129 
131  void
132  SetAzimuthElevationToCartesianParameters(const double sampleSize,
133  const double blanking,
134  const long maxAzimuth,
135  const long maxElevation,
136  const double azimuthAngleSeparation,
137  const double elevationAngleSeparation);
138 
139  void
140  SetAzimuthElevationToCartesianParameters(const double sampleSize,
141  const double blanking,
142  const long maxAzimuth,
143  const long maxElevation);
144 
147  TransformPoint(const InputPointType & point) const override;
148 
150  inline InputPointType
151  BackTransform(const OutputPointType & point) const
152  {
153  InputPointType result;
154 
155  if (m_ForwardAzimuthElevationToPhysical)
156  {
157  result = static_cast<InputPointType>(TransformCartesianToAzEl(point));
158  }
159  else
160  {
161  result = static_cast<InputPointType>(TransformAzElToCartesian(point));
162  }
163  return result;
164  }
165 
166  inline InputPointType
167  BackTransformPoint(const OutputPointType & point) const
168  {
169  return BackTransform(point);
170  }
171 
172 
175  TransformCategoryEnum
176  GetTransformCategory() const override
177  {
178  return Self::TransformCategoryEnum::UnknownTransformCategory;
179  }
180 
183  void
184  SetForwardAzimuthElevationToCartesian();
185 
188  void
189  SetForwardCartesianToAzimuthElevation();
190 
193  OutputPointType
194  TransformAzElToCartesian(const InputPointType & point) const;
195 
198  OutputPointType
199  TransformCartesianToAzEl(const OutputPointType & point) const;
200 
205  itkSetMacro(MaxAzimuth, long);
206  itkGetConstMacro(MaxAzimuth, long);
208 
213  itkSetMacro(MaxElevation, long);
214  itkGetConstMacro(MaxElevation, long);
216 
218  itkSetMacro(RadiusSampleSize, double);
219  itkGetConstMacro(RadiusSampleSize, double);
221 
223  itkSetMacro(AzimuthAngularSeparation, double);
224  itkGetConstMacro(AzimuthAngularSeparation, double);
226 
228  itkSetMacro(ElevationAngularSeparation, double);
229  itkGetConstMacro(ElevationAngularSeparation, double);
231 
233  itkSetMacro(FirstSampleDistance, double);
234  itkGetConstMacro(FirstSampleDistance, double);
236 
237 protected:
240 
242  ~AzimuthElevationToCartesianTransform() override = default;
243 
245  void
246  PrintSelf(std::ostream & s, Indent indent) const override;
247 
248 private:
256 }; // class AzimuthElevationToCartesianTransform
257 } // namespace itk
258 
259 #ifndef ITK_MANUAL_INSTANTIATION
260 # include "itkAzimuthElevationToCartesianTransform.hxx"
261 #endif
262 
263 #endif /* itkAzimuthElevationToCartesianTransform_h */
itk::AzimuthElevationToCartesianTransform::m_ElevationAngularSeparation
double m_ElevationAngularSeparation
Definition: itkAzimuthElevationToCartesianTransform.h:253
itk::AffineTransform::ScalarType
typename Superclass::ScalarType ScalarType
Definition: itkAffineTransform.h:132
itk::AzimuthElevationToCartesianTransform::BackTransformPoint
InputPointType BackTransformPoint(const OutputPointType &point) const
Definition: itkAzimuthElevationToCartesianTransform.h:167
itk::AzimuthElevationToCartesianTransform::m_RadiusSampleSize
double m_RadiusSampleSize
Definition: itkAzimuthElevationToCartesianTransform.h:251
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itkAffineTransform.h
itk::AffineTransform
Definition: itkAffineTransform.h:101
itk::AffineTransform::MatrixType
typename Superclass::MatrixType MatrixType
Definition: itkAffineTransform.h:141
itk::AzimuthElevationToCartesianTransform::m_MaxAzimuth
long m_MaxAzimuth
Definition: itkAzimuthElevationToCartesianTransform.h:249
itk::AffineTransform::ParametersType
typename Superclass::ParametersType ParametersType
Definition: itkAffineTransform.h:127
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::AffineTransform::FixedParametersType
typename Superclass::FixedParametersType FixedParametersType
Definition: itkAffineTransform.h:128
itk::AzimuthElevationToCartesianTransform
Transforms from an azimuth, elevation, radius coordinate system to a Cartesian coordinate system,...
Definition: itkAzimuthElevationToCartesianTransform.h:88
itk::AzimuthElevationToCartesianTransform::m_MaxElevation
long m_MaxElevation
Definition: itkAzimuthElevationToCartesianTransform.h:250
itk::AzimuthElevationToCartesianTransform::m_AzimuthAngularSeparation
double m_AzimuthAngularSeparation
Definition: itkAzimuthElevationToCartesianTransform.h:252
itk::AffineTransform::InverseJacobianPositionType
typename Superclass::InverseJacobianPositionType InverseJacobianPositionType
Definition: itkAffineTransform.h:131
itk::AffineTransform::JacobianPositionType
typename Superclass::JacobianPositionType JacobianPositionType
Definition: itkAffineTransform.h:130
itk::AzimuthElevationToCartesianTransform::TransformCategoryEnum
typename Superclass::TransformCategoryEnum TransformCategoryEnum
Definition: itkAzimuthElevationToCartesianTransform.h:113
itk::Matrix
A templated class holding a M x N size Matrix.
Definition: itkMatrix.h:51
itk::AzimuthElevationToCartesianTransform::m_FirstSampleDistance
double m_FirstSampleDistance
Definition: itkAzimuthElevationToCartesianTransform.h:254
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::AffineTransform::OutputPointType
typename Superclass::OutputPointType OutputPointType
Definition: itkAffineTransform.h:134
itk::AzimuthElevationToCartesianTransform::GetTransformCategory
TransformCategoryEnum GetTransformCategory() const override
Definition: itkAzimuthElevationToCartesianTransform.h:176
itk::AzimuthElevationToCartesianTransform::BackTransform
InputPointType BackTransform(const OutputPointType &point) const
Definition: itkAzimuthElevationToCartesianTransform.h:151
itk::AffineTransform::InputPointType
typename Superclass::InputPointType InputPointType
Definition: itkAffineTransform.h:133
itk::AzimuthElevationToCartesianTransform::m_ForwardAzimuthElevationToPhysical
bool m_ForwardAzimuthElevationToPhysical
Definition: itkAzimuthElevationToCartesianTransform.h:255
itkMath.h
itk::AffineTransform::JacobianType
typename Superclass::JacobianType JacobianType
Definition: itkAffineTransform.h:129