ITK  6.0.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  * https://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 VDimension = 3>
88 class ITK_TEMPLATE_EXPORT AzimuthElevationToCartesianTransform
89  : public AffineTransform<TParametersValueType, VDimension>
90 {
91 public:
92  ITK_DISALLOW_COPY_AND_MOVE(AzimuthElevationToCartesianTransform);
93 
99 
101  static constexpr unsigned int SpaceDimension = VDimension;
102  static constexpr unsigned int ParametersDimension = VDimension * (VDimension + 1);
103 
105  itkOverrideGetNameOfClassMacro(AzimuthElevationToCartesianTransform);
106 
108  itkNewMacro(Self);
109 
111  using typename Superclass::ParametersType;
112  using typename Superclass::FixedParametersType;
113  using typename Superclass::TransformCategoryEnum;
114 
116  using typename Superclass::JacobianType;
117  using typename Superclass::JacobianPositionType;
119 
121  using typename Superclass::ScalarType;
122 
124  using typename Superclass::InputPointType;
125  using typename Superclass::OutputPointType;
126 
129 
131  void
132  SetAzimuthElevationToCartesianParameters(const double sampleSize,
133  const double firstSampleDistance,
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 firstSampleDistance,
142  const long maxAzimuth,
143  const long maxElevation);
144 
147  TransformPoint(const InputPointType & point) const override;
148 
150  inline InputPointType
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
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 
192  OutputPointType
193  TransformAzElToCartesian(const InputPointType & point) const;
194 
196  OutputPointType
197  TransformCartesianToAzEl(const OutputPointType & point) const;
198 
203  itkSetMacro(MaxAzimuth, long);
204  itkGetConstMacro(MaxAzimuth, long);
211  itkSetMacro(MaxElevation, long);
212  itkGetConstMacro(MaxElevation, long);
216  itkSetMacro(RadiusSampleSize, double);
217  itkGetConstMacro(RadiusSampleSize, double);
221  itkSetMacro(AzimuthAngularSeparation, double);
222  itkGetConstMacro(AzimuthAngularSeparation, double);
226  itkSetMacro(ElevationAngularSeparation, double);
227  itkGetConstMacro(ElevationAngularSeparation, double);
231  itkSetMacro(FirstSampleDistance, double);
232  itkGetConstMacro(FirstSampleDistance, double);
235 protected:
238 
240  ~AzimuthElevationToCartesianTransform() override = default;
241 
243  void
244  PrintSelf(std::ostream & os, Indent indent) const override;
245 
246 private:
247  long m_MaxAzimuth{};
248  long m_MaxElevation{};
249  double m_RadiusSampleSize{};
250  double m_AzimuthAngularSeparation{};
251  double m_ElevationAngularSeparation{};
252  double m_FirstSampleDistance{};
253  bool m_ForwardAzimuthElevationToPhysical{};
254 }; // class AzimuthElevationToCartesianTransform
255 } // namespace itk
256 
257 #ifndef ITK_MANUAL_INSTANTIATION
258 # include "itkAzimuthElevationToCartesianTransform.hxx"
259 #endif
260 
261 #endif /* itkAzimuthElevationToCartesianTransform_h */
itk::AzimuthElevationToCartesianTransform::BackTransformPoint
InputPointType BackTransformPoint(const OutputPointType &point) const
Definition: itkAzimuthElevationToCartesianTransform.h:167
itk::AzimuthElevationToCartesianTransform::GetTransformCategory
TransformCategoryEnum GetTransformCategory() const override
Definition: itkAzimuthElevationToCartesianTransform.h:176
itk::MatrixOffsetTransformBase< TParametersValueType, VDimension, VDimension >
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::MatrixOffsetTransformBase< TParametersValueType, VDimension, VDimension >::InverseJacobianPositionType
vnl_matrix_fixed< ParametersValueType, VInputDimension, VOutputDimension > InverseJacobianPositionType
Definition: itkTransform.h:132
itkAffineTransform.h
itk::AffineTransform
Definition: itkAffineTransform.h:101
itk::MatrixOffsetTransformBase< TParametersValueType, VDimension, VDimension >::ScalarType
ParametersValueType ScalarType
Definition: itkTransform.h:127
itk::MatrixOffsetTransformBase< TParametersValueType, VDimension, VDimension >::JacobianPositionType
vnl_matrix_fixed< ParametersValueType, VOutputDimension, VInputDimension > JacobianPositionType
Definition: itkTransform.h:131
itk::AzimuthElevationToCartesianTransform::BackTransform
InputPointType BackTransform(const OutputPointType &point) const
Definition: itkAzimuthElevationToCartesianTransform.h:151
itk::point
*par Constraints *The filter requires an image with at least two dimensions and a vector *length of at least The theory supports extension to scalar but *the implementation of the itk vector classes do not **The template parameter TRealType must be floating point(float or double) or *a user-defined "real" numerical type with arithmetic operations defined *sufficient to compute derivatives. **\par Performance *This filter will automatically multithread if run with *SetUsePrincipleComponents
itk::AzimuthElevationToCartesianTransform
Transforms from an azimuth, elevation, radius coordinate system to a Cartesian coordinate system,...
Definition: itkAzimuthElevationToCartesianTransform.h:88
itk::Matrix
A templated class holding a M x N size Matrix.
Definition: itkMatrix.h:52
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnatomicalOrientation.h:29
itk::Point< TParametersValueType, Self::InputSpaceDimension >
itk::Array2D
Array2D class representing a 2D array.
Definition: itkArray2D.h:42
itkMath.h