ITK  4.9.0
Insight Segmentation and Registration Toolkit
itkScalableAffineTransform.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 itkScalableAffineTransform_h
19 #define itkScalableAffineTransform_h
20 
21 #include "itkAffineTransform.h"
22 
23 namespace itk
24 {
33 template<
34  typename TParametersValueType=double,
35  unsigned int NDimensions = 3>
37  public AffineTransform<TParametersValueType, NDimensions>
38 {
39 public:
45 
48 
50  itkNewMacro(Self);
51 
53  itkStaticConstMacro(InputSpaceDimension, unsigned int, NDimensions);
54  itkStaticConstMacro(OutputSpaceDimension, unsigned int, NDimensions);
55  itkStaticConstMacro(SpaceDimension, unsigned int, NDimensions);
56  itkStaticConstMacro( ParametersDimension, unsigned int,
57  NDimensions * ( NDimensions + 1 ) );
59 
81 
85  typedef typename InverseTransformBaseType::Pointer InverseTransformBasePointer;
86 
90  void SetIdentity(void) ITK_OVERRIDE;
91 
93  virtual void SetScale(const InputVectorType & scale);
94 
95  virtual void SetScaleComponent(const InputVectorType & scale)
96  { this->SetScale(scale); }
97 
99  virtual void SetScale(const double scale[NDimensions]);
100 
101  virtual void SetScaleComponent(const double scale[NDimensions])
102  { this->SetScale(scale); }
103 
105  virtual const double * GetScale() const
106  { return m_Scale; }
107  virtual const double * GetScaleComponent() const
108  { return m_Scale; }
110 
112  bool GetInverse(Self *inverse) const;
113 
115  virtual InverseTransformBasePointer GetInverseTransform() const ITK_OVERRIDE;
116 
120  itkLegacyMacro(void SetMatrixComponent(const MatrixType & matrix));
121 
124  itkLegacyMacro(const MatrixType & GetMatrixComponent() const);
125 
128  itkLegacyMacro(void SetOffsetComponent(const OffsetType & offset) );
129 
132  itkLegacyMacro(const OffsetType & GetOffsetComponent(void) const );
133 
134 protected:
142  ScalableAffineTransform(const MatrixType & matrix,
143  const OutputVectorType & offset);
144  ScalableAffineTransform(unsigned int outputSpaceDimension,
145  unsigned int parametersDimension);
146  ScalableAffineTransform(unsigned int parametersDimension);
149 
150  void ComputeMatrix() ITK_OVERRIDE;
151 
153  virtual ~ScalableAffineTransform();
154 
156  void PrintSelf(std::ostream & s, Indent indent) const ITK_OVERRIDE;
157 
158  void SetVarScale(const double *scale)
159  { for ( int i = 0; i < InputSpaceDimension; i++ ) { m_Scale[i] = scale[i]; } }
160 
161 private:
162 
163  ScalableAffineTransform(const Self & other);
164  const Self & operator=(const Self &);
165 
166  double m_Scale[NDimensions];
168 }; //class ScalableAffineTransform
169 } // namespace itk
170 
171 #ifndef ITK_MANUAL_INSTANTIATION
172 #include "itkScalableAffineTransform.hxx"
173 #endif
174 
175 #endif /* itkScalableAffineTransform_h */
static const unsigned int SpaceDimension
InverseTransformBaseType::Pointer InverseTransformBasePointer
Superclass::InputCovariantVectorType InputCovariantVectorType
Superclass::ParametersType ParametersType
Superclass::MatrixType MatrixType
Light weight base class for most itk classes.
Superclass::TranslationType TranslationType
Superclass::OutputCovariantVectorType OutputCovariantVectorType
Superclass::ParametersValueType ParametersValueType
Superclass::InverseMatrixType InverseMatrixType
const Self & operator=(const Self &)
Superclass::InputCovariantVectorType InputCovariantVectorType
void SetVarScale(const double *scale)
void SetIdentity(void) override
Superclass::InputPointType InputPointType
Superclass::InputVnlVectorType InputVnlVectorType
itkLegacyMacro(void SetMatrixComponent(const MatrixType &matrix))
Superclass::OutputVnlVectorType OutputVnlVectorType
Superclass::JacobianType JacobianType
Superclass::ParametersType ParametersType
Superclass::TranslationType TranslationType
Superclass::InputVectorType InputVectorType
Superclass::OutputVnlVectorType OutputVnlVectorType
Superclass::OutputVectorType OutputVectorType
Superclass::OutputVectorType OutputVectorType
virtual const double * GetScale() const
Superclass::OutputPointType OutputPointType
void PrintSelf(std::ostream &s, Indent indent) const override
Superclass::InverseTransformBaseType InverseTransformBaseType
Superclass::JacobianType JacobianType
AffineTransform< TParametersValueType, NDimensions > Superclass
static const unsigned int OutputSpaceDimension
virtual void SetScaleComponent(const InputVectorType &scale)
bool GetInverse(Self *inverse) const
Superclass::CenterType CenterType
static const unsigned int InputSpaceDimension
Superclass::InverseMatrixType InverseMatrixType
virtual InverseTransformBasePointer GetInverseTransform() const override
Superclass::InputVnlVectorType InputVnlVectorType
virtual const double * GetScaleComponent() const
Superclass::OffsetType OffsetType
Superclass::OutputCovariantVectorType OutputCovariantVectorType
Superclass::FixedParametersType FixedParametersType
virtual void SetScale(const InputVectorType &scale)
Superclass::OutputPointType OutputPointType
Superclass::FixedParametersType FixedParametersType
virtual void SetScaleComponent(const double scale[NDimensions])
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Superclass::ScalarType ScalarType
Superclass::InputPointType InputPointType
SmartPointer< const Self > ConstPointer
static const unsigned int ParametersDimension
Superclass::FixedParametersValueType FixedParametersValueType
Affine transformation with a specified center of rotation.
Superclass::InputVectorType InputVectorType
Superclass::MatrixValueType MatrixValueType
void ComputeMatrix() override
Superclass::InverseTransformBaseType InverseTransformBaseType