go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkAdvancedRigid2DTransform.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright UMC Utrecht and contributors
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/*=========================================================================
19
20 Program: Insight Segmentation & Registration Toolkit
21 Module: $RCSfile: itkAdvancedRigid2DTransform.h,v $
22 Language: C++
23 Date: $Date: 2009-01-14 18:39:05 $
24 Version: $Revision: 1.22 $
25
26 Copyright (c) Insight Software Consortium. All rights reserved.
27 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
28
29 This software is distributed WITHOUT ANY WARRANTY; without even
30 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
31 PURPOSE. See the above copyright notices for more information.
32
33=========================================================================*/
34#ifndef __itkAdvancedRigid2DTransform_h
35#define __itkAdvancedRigid2DTransform_h
36
37#include <iostream>
39#include "itkMacro.h"
40
41namespace itk
42{
43
74template< class TScalarType = double >
75// Data type for scalars (float or double)
77 public AdvancedMatrixOffsetTransformBase< TScalarType, 2, 2 > // Dimensions of input and output spaces
78{
79public:
80
85 typedef SmartPointer< const Self > ConstPointer;
86
89
91 itkNewMacro( Self );
92
94 itkStaticConstMacro( InputSpaceDimension, unsigned int, 2 );
95 itkStaticConstMacro( OutputSpaceDimension, unsigned int, 2 );
96 itkStaticConstMacro( ParametersDimension, unsigned int, 3 );
97
100
104
107
110
113
117
121
125
129
130 typedef typename Superclass
133 typedef typename Superclass
136 typedef typename Superclass
139
152 void SetMatrix( const MatrixType & matrix ) override;
153
159 virtual void SetRotationMatrix( const MatrixType & matrix )
160 { this->SetMatrix( matrix ); }
162 { return this->GetMatrix(); }
163
171 void Translate( const OffsetType & offset, bool pre = false );
172
181 inline InputPointType BackTransform( const OutputPointType & point ) const;
182
183 inline InputVectorType BackTransform( const OutputVectorType & vector ) const;
184
186
188 const OutputCovariantVectorType & vector ) const;
189
191 void SetAngle( TScalarType angle );
192
193 itkGetConstReferenceMacro( Angle, TScalarType );
194
197
202 { this->SetAngle( angle ); }
203 virtual const TScalarType & GetRotation() const
204 { return m_Angle; }
205
214 void SetParameters( const ParametersType & parameters ) override;
215
224 const ParametersType & GetParameters( void ) const override;
225
231 const InputPointType &,
232 JacobianType &,
233 NonZeroJacobianIndicesType & ) const override;
234
239 void CloneInverseTo( Pointer & newinverse ) const;
240
245 void CloneTo( Pointer & clone ) const;
246
248 void SetIdentity( void ) override;
249
250protected:
251
253 AdvancedRigid2DTransform( unsigned int parametersDimension );
254 AdvancedRigid2DTransform( unsigned int outputSpaceDimension, unsigned int parametersDimension );
255
257
261 void PrintSelf( std::ostream & os, Indent indent ) const override;
262
267 void ComputeMatrix( void ) override;
268
273 void ComputeMatrixParameters( void ) override;
274
277 { m_Angle = angle; }
278
281
282private:
283
284 AdvancedRigid2DTransform( const Self & ); // purposely not implemented
285 void operator=( const Self & ); // purposely not implemented
286
288
289};
290
291// Back transform a point
292template< class TScalarType >
293inline
296{
297 itkWarningMacro(
298 << "BackTransform(): This method is slated to be removed from ITK. Instead, please use GetInverse() to generate an inverse transform and then perform the transform using that inverted transform."
299 );
300 return this->GetInverseMatrix() * ( point - this->GetOffset() );
301}
302
303
304// Back transform a vector
305template< class TScalarType >
306inline
310{
311 itkWarningMacro(
312 << "BackTransform(): This method is slated to be removed from ITK. Instead, please use GetInverse() to generate an inverse transform and then perform the transform using that inverted transform."
313 );
314 return this->GetInverseMatrix() * vect;
315}
316
317
318// Back transform a vnl_vector
319template< class TScalarType >
320inline
324{
325 itkWarningMacro(
326 << "BackTransform(): This method is slated to be removed from ITK. Instead, please use GetInverse() to generate an inverse transform and then perform the transform using that inverted transform."
327 );
328 return this->GetInverseMatrix() * vect;
329}
330
331
332// Back Transform a CovariantVector
333template< class TScalarType >
334inline
338{
339 itkWarningMacro(
340 << "BackTransform(): This method is slated to be removed from ITK. Instead, please use GetInverse() to generate an inverse transform and then perform the transform using that inverted transform."
341 );
342 return this->GetMatrix() * vect;
343}
344
345
346} // namespace itk
347
348#ifndef ITK_MANUAL_INSTANTIATION
349#include "itkAdvancedRigid2DTransform.hxx"
350#endif
351
352#endif /* __itkAdvancedRigid2DTransform_h */
Superclass::InputCovariantVectorType InputCovariantVectorType
Superclass::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
Superclass::JacobianOfSpatialJacobianType JacobianOfSpatialJacobianType
Superclass::JacobianOfSpatialHessianType JacobianOfSpatialHessianType
Superclass::OutputCovariantVectorType OutputCovariantVectorType
Matrix< TScalarType, itkGetStaticConstMacro(OutputSpaceDimension), itkGetStaticConstMacro(InputSpaceDimension) > MatrixType
AdvancedRigid2DTransform of a vector space (e.g. space coordinates)
void PrintSelf(std::ostream &os, Indent indent) const override
void CloneTo(Pointer &clone) const
virtual void SetRotationMatrix(const MatrixType &matrix)
Superclass::OffsetType OffsetType
Standard vector type for this class.
Superclass::InputCovariantVectorType InputCovariantVectorType
Standard covariant vector type for this class.
Superclass::InputVnlVectorType InputVnlVectorType
Standard vnl_vector type for this class.
Superclass::JacobianOfSpatialJacobianType JacobianOfSpatialJacobianType
Superclass::SpatialHessianType SpatialHessianType
InputVnlVectorType BackTransform(const OutputVnlVectorType &vector) const
const ParametersType & GetParameters(void) const override
InputPointType BackTransform(const OutputPointType &point) const
Superclass::InternalMatrixType InternalMatrixType
Superclass::MatrixType MatrixType
Standard matrix type for this class.
itkStaticConstMacro(OutputSpaceDimension, unsigned int, 2)
SmartPointer< const Self > ConstPointer
AdvancedRigid2DTransform(const Self &)
Superclass::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
void SetParameters(const ParametersType &parameters) override
Superclass::OutputCovariantVectorType OutputCovariantVectorType
Superclass::NumberOfParametersType NumberOfParametersType
void GetJacobian(const InputPointType &, JacobianType &, NonZeroJacobianIndicesType &) const override
void ComputeMatrix(void) override
InputCovariantVectorType BackTransform(const OutputCovariantVectorType &vector) const
itkStaticConstMacro(InputSpaceDimension, unsigned int, 2)
Superclass::InputPointType InputPointType
Standard coordinate point type for this class.
Superclass::OutputVnlVectorType OutputVnlVectorType
const MatrixType & GetRotationMatrix() const
Superclass::JacobianOfSpatialHessianType JacobianOfSpatialHessianType
Superclass::ParametersType ParametersType
Superclass::OutputVectorType OutputVectorType
virtual void PrecomputeJacobianOfSpatialJacobian(void)
AdvancedMatrixOffsetTransformBase< TScalarType, 2, 2 > Superclass
void CloneInverseTo(Pointer &newinverse) const
void SetAngle(TScalarType angle)
void operator=(const Self &)
AdvancedRigid2DTransform(unsigned int parametersDimension)
void SetAngleInDegrees(TScalarType angle)
AdvancedRigid2DTransform(unsigned int outputSpaceDimension, unsigned int parametersDimension)
Superclass::InputVectorType InputVectorType
Standard vector type for this class.
void ComputeMatrixParameters(void) override
Superclass::SpatialJacobianType SpatialJacobianType
Superclass::OutputPointType OutputPointType
virtual const TScalarType & GetRotation() const
void SetMatrix(const MatrixType &matrix) override
void Translate(const OffsetType &offset, bool pre=false)
itkStaticConstMacro(ParametersDimension, unsigned int, 3)
InputVectorType BackTransform(const OutputVectorType &vector) const
void SetIdentity(void) override


Generated on 1667476801 for elastix by doxygen 1.9.4 elastix logo