go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkDeformationFieldInterpolatingTransform.h
Go to the documentation of this file.
1 /*======================================================================
2 
3  This file is part of the elastix software.
4 
5  Copyright (c) University Medical Center Utrecht. All rights reserved.
6  See src/CopyrightElastix.txt or http://elastix.isi.uu.nl/legal.php for
7  details.
8 
9  This software is distributed WITHOUT ANY WARRANTY; without even
10  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11  PURPOSE. See the above copyright notices for more information.
12 
13 ======================================================================*/
14 
15 #ifndef __itkDeformationFieldInterpolatingTransform_h
16 #define __itkDeformationFieldInterpolatingTransform_h
17 
18 #include <iostream>
19 #include "itkAdvancedTransform.h"
20 #include "itkExceptionObject.h"
21 #include "itkImage.h"
22 #include "itkVectorInterpolateImageFunction.h"
23 #include "itkVectorNearestNeighborInterpolateImageFunction.h"
24 
25 
26 namespace itk
27 {
28 
40  template <
41  class TScalarType=double, // Data type for scalars (float or double)
42  unsigned int NDimensions=3, // Number of input dimensions
43  class TComponentType=double> // ComponentType of the deformation field
45  public AdvancedTransform< TScalarType, NDimensions, NDimensions >
46  {
47  public:
51  typedef SmartPointer<Self> Pointer;
52  typedef SmartPointer<const Self> ConstPointer;
53 
55  itkNewMacro( Self );
56 
59 
61  itkStaticConstMacro(InputSpaceDimension, unsigned int, Superclass::InputSpaceDimension);
62  itkStaticConstMacro(OutputSpaceDimension, unsigned int, Superclass::OutputSpaceDimension);
63 
76 
77  typedef TComponentType DeformationFieldComponentType;
78  typedef Vector<DeformationFieldComponentType,
79  itkGetStaticConstMacro(OutputSpaceDimension) > DeformationFieldVectorType;
80  typedef Image< DeformationFieldVectorType,
81  itkGetStaticConstMacro(InputSpaceDimension) > DeformationFieldType;
82 
83  typedef VectorInterpolateImageFunction<
86  typedef VectorNearestNeighborInterpolateImageFunction<
89 
90 
94  OutputPointType TransformPoint( const InputPointType & point ) const;
95 
98  void SetIdentity( void );
99 
101  virtual void SetDeformationField( DeformationFieldType * _arg );
102  itkGetObjectMacro(DeformationField, DeformationFieldType);
103 
106  itkGetObjectMacro(DeformationFieldInterpolator, DeformationFieldInterpolatorType);
107 
108  virtual bool IsLinear( void ) const { return false; };
109 
110  virtual void SetParameters( const ParametersType & )
111  {
112  itkExceptionMacro( << "ERROR: The DeformationFieldInterpolatingTransform is "
113  << "NOT suited for image registration. Just use it as an (initial) fixed transform "
114  << "that is not optimized." );
115  }
116 
117 
118  protected:
121 
123  typedef typename DeformationFieldInterpolatorType::ContinuousIndexType
125  typedef typename DeformationFieldInterpolatorType::OutputType InterpolatorOutputType;
126 
128  void PrintSelf(std::ostream &os, Indent indent) const;
129 
130  typename DeformationFieldType::Pointer m_DeformationField;
131  typename DeformationFieldType::Pointer m_ZeroDeformationField;
132  typename DeformationFieldInterpolatorType::Pointer m_DeformationFieldInterpolator;
133 
134  private:
135  DeformationFieldInterpolatingTransform(const Self&); //purposely not implemented
136  void operator=(const Self&); //purposely not implemented
137 
138 
139  }; //class DeformationFieldInterpolatingTransform
140 
141 
142 } // namespace itk
143 
144 
145 #ifndef ITK_MANUAL_INSTANTIATION
146 #include "itkDeformationFieldInterpolatingTransform.txx"
147 #endif
148 
149 #endif /* __itkDeformationFieldInterpolatingTransform_h */
DeformationFieldInterpolatorType::OutputType InterpolatorOutputType
OutputPointType TransformPoint(const InputPointType &point) const
AdvancedTransform< TScalarType, NDimensions, NDimensions > Superclass
DeformationFieldInterpolatorType::Pointer m_DeformationFieldInterpolator
itkStaticConstMacro(InputSpaceDimension, unsigned int, Superclass::InputSpaceDimension)
void PrintSelf(std::ostream &os, Indent indent) const
Vector< DeformationFieldComponentType, itkGetStaticConstMacro(OutputSpaceDimension) > DeformationFieldVectorType
VectorInterpolateImageFunction< DeformationFieldType, ScalarType > DeformationFieldInterpolatorType
Transform maps points, vectors and covariant vectors from an input space to an output space...
virtual void SetDeformationField(DeformationFieldType *_arg)
virtual void SetDeformationFieldInterpolator(DeformationFieldInterpolatorType *_arg)
Image< DeformationFieldVectorType, itkGetStaticConstMacro(InputSpaceDimension) > DeformationFieldType
Transform that interpolates a given deformation field.
VectorNearestNeighborInterpolateImageFunction< DeformationFieldType, ScalarType > DefaultDeformationFieldInterpolatorType
DeformationFieldInterpolatorType::ContinuousIndexType InputContinuousIndexType


Generated on 06-12-2013 for elastix by doxygen 1.8.5 elastix logo