ITK  4.6.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 "vnl/vnl_math.h"
23 
24 namespace itk
25 {
79 template< typename TScalar = float, // Data type for scalars
80  unsigned int NDimensions = 3 >
81 // (e.g. float or double)
83  public AffineTransform< TScalar, NDimensions >
84 {
85 public:
91 
93  itkStaticConstMacro(SpaceDimension, unsigned int, NDimensions);
94  itkStaticConstMacro( ParametersDimension, unsigned int,
95  NDimensions * ( NDimensions + 1 ) );
97 
100 
102  itkNewMacro(Self);
103 
106 
109 
112 
116 
118  typedef Matrix< TScalar, itkGetStaticConstMacro(SpaceDimension),
119  itkGetStaticConstMacro(SpaceDimension) > MatrixType;
120 
123  const double sampleSize,
124  const double blanking,
125  const long maxAzimuth,
126  const long maxElevation,
127  const double azimuthAngleSeparation,
128  const double elevationAngleSeparation);
129 
130  void SetAzimuthElevationToCartesianParameters(const double sampleSize,
131  const double blanking,
132  const long maxAzimuth,
133  const long maxElevation);
134 
136  OutputPointType TransformPoint(const InputPointType & point) const;
137 
139  inline InputPointType BackTransform(const OutputPointType & point) const
140  {
141  InputPointType result;
142 
144  {
145  result = static_cast< InputPointType >( TransformCartesianToAzEl(point) );
146  }
147  else
148  {
149  result = static_cast< InputPointType >( TransformAzElToCartesian(point) );
150  }
151  return result;
152  }
153 
155  {
156  return BackTransform(point);
157  }
158 
162 
166 
170 
174 
179  itkSetMacro(MaxAzimuth, long);
180  itkGetConstMacro(MaxAzimuth, long);
182 
187  itkSetMacro(MaxElevation, long);
188  itkGetConstMacro(MaxElevation, long);
190 
192  itkSetMacro(RadiusSampleSize, double);
193  itkGetConstMacro(RadiusSampleSize, double);
195 
197  itkSetMacro(AzimuthAngularSeparation, double);
198  itkGetConstMacro(AzimuthAngularSeparation, double);
200 
202  itkSetMacro(ElevationAngularSeparation, double);
203  itkGetConstMacro(ElevationAngularSeparation, double);
205 
207  itkSetMacro(FirstSampleDistance, double);
208  itkGetConstMacro(FirstSampleDistance, double);
210 
211 protected:
214 
217 
219  void PrintSelf(std::ostream & s, Indent indent) const;
220 
221 private:
222  AzimuthElevationToCartesianTransform(const Self &); // purposely not
223  // implemented
224  void operator=(const Self &); //purposely not
225 
226  // implemented
227 
235 }; //class AzimuthElevationToCartesianTransform
236 } // namespace itk
237 
238 #ifndef ITK_MANUAL_INSTANTIATION
239 #include "itkAzimuthElevationToCartesianTransform.hxx"
240 #endif
241 
242 #endif /* __itkAzimuthElevationToCartesianTransform_h */
A templated class holding a M x N size Matrix.
Definition: itkMatrix.h:46
OutputPointType TransformCartesianToAzEl(const OutputPointType &point) const
Light weight base class for most itk classes.
Superclass::ScalarType ScalarType
Superclass::ParametersType ParametersType
Superclass::OutputPointType OutputPointType
InputPointType BackTransform(const OutputPointType &point) const
OutputPointType TransformPoint(const InputPointType &point) const
Matrix< TScalar, itkGetStaticConstMacro(SpaceDimension), itkGetStaticConstMacro(SpaceDimension) > MatrixType
OutputPointType TransformAzElToCartesian(const InputPointType &point) const
Superclass::InputPointType InputPointType
Superclass::JacobianType JacobianType
Transforms from an azimuth, elevation, radius coordinate system to a Cartesian coordinate system...
void SetAzimuthElevationToCartesianParameters(const double sampleSize, const double blanking, const long maxAzimuth, const long maxElevation, const double azimuthAngleSeparation, const double elevationAngleSeparation)
Control indentation during Print() invocation.
Definition: itkIndent.h:49
InputPointType BackTransformPoint(const OutputPointType &point) const
void PrintSelf(std::ostream &s, Indent indent) const