go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkWeightedCombinationTransform.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 __itkWeightedCombinationTransform_h
16 #define __itkWeightedCombinationTransform_h
17 
18 #include "itkAdvancedTransform.h"
19 
20 namespace itk
21 {
22 
38 template <class TScalarType,
39  unsigned int NInputDimensions = 3,
40  unsigned int NOutputDimensions = 3>
42  : public AdvancedTransform< TScalarType, NInputDimensions, NOutputDimensions >
43 {
44 public:
47  typedef AdvancedTransform< TScalarType,
48  NInputDimensions,
49  NOutputDimensions > Superclass;
50  typedef SmartPointer< Self > Pointer;
51  typedef SmartPointer< const Self > ConstPointer;
52 
54  itkNewMacro( Self );
55 
58 
60  itkStaticConstMacro( InputSpaceDimension, unsigned int, NInputDimensions );
61  itkStaticConstMacro( OutputSpaceDimension, unsigned int, NOutputDimensions );
62 
69  typedef typename Superclass
71  typedef typename Superclass
77  typedef typename
80  typedef typename
83 
85  typedef Transform< TScalarType,
86  NInputDimensions,
87  NOutputDimensions > TransformType;
89  typedef typename TransformType::Pointer TransformPointer;
90  typedef std::vector< TransformPointer > TransformContainerType;
91 
93  virtual OutputPointType TransformPoint(const InputPointType & ipp ) const;
94 
100  virtual void GetJacobian(
101  const InputPointType & ipp,
102  JacobianType & jac,
103  NonZeroJacobianIndicesType & nzji ) const;
104 
106  virtual const JacobianType & GetJacobian( const InputPointType & ipp) const;
107 
111  virtual void SetParameters( const ParametersType & param );
112 
114  itkGetConstReferenceMacro( Parameters, ParametersType );
115 
117  virtual unsigned int GetNumberOfParameters(void) const
118  {
119  return this->m_TransformContainer.size();
120  };
121 
124  itkSetMacro( NormalizeWeights, bool );
125  itkGetConstMacro( NormalizeWeights, bool );
126 
128  virtual void SetTransformContainer( const TransformContainerType & transformContainer )
129  {
130  this->m_TransformContainer = transformContainer;
131  this->Modified();
132  };
133 
144  {
145  return this->m_TransformContainer;
146  }
147 
148 protected:
151 
154 
155 private:
156 
157  WeightedCombinationTransform(const Self&); // purposely not implemented
158  void operator=(const Self&); // purposely not implemented
159 
161 
162 }; // end class WeightedCombinationTransform
163 
164 } // end namespace itk
165 
166 // \todo: copied the below from itk. does this just work like this?:
167 
168 // Define instantiation macro for this template.
169 #define ITK_TEMPLATE_WeightedCombination(_, EXPORT, x, y) namespace itk { \
170  _(3(class EXPORT WeightedCombinationTransform< ITK_TEMPLATE_3 x >)) \
171  namespace Templates { typedef WeigthedCombinationTransform< ITK_TEMPLATE_3 x > WeightedCombinationTransform##y; } \
172  }
173 
174 #if ITK_TEMPLATE_EXPLICIT
175 # include "Templates/itkWeightedCombinationTransform+-.h"
176 #endif
177 
178 #if ITK_TEMPLATE_TXX
179 # include "itkWeightedCombinationTransform.txx"
180 #endif
181 
182 #endif
Superclass::SpatialJacobianType SpatialJacobianType
virtual unsigned int GetNumberOfParameters(void) const
Matrix< ScalarType, OutputSpaceDimension, InputSpaceDimension > SpatialJacobianType
virtual OutputPointType TransformPoint(const InputPointType &ipp) const
Superclass::OutputVnlVectorType OutputVnlVectorType
AdvancedTransform< TScalarType, NInputDimensions, NOutputDimensions > Superclass
Superclass::OutputCovariantVectorType OutputCovariantVectorType
std::vector< unsigned long > NonZeroJacobianIndicesType
Superclass::JacobianOfSpatialJacobianType JacobianOfSpatialJacobianType
std::vector< TransformPointer > TransformContainerType
Superclass::ScalarType ScalarType
Superclass::OutputCovariantVectorType OutputCovariantVectorType
Superclass::SpatialHessianType SpatialHessianType
Superclass::OutputVnlVectorType OutputVnlVectorType
Superclass::ParametersType ParametersType
Transform maps points, vectors and covariant vectors from an input space to an output space...
const TransformContainerType & GetTransformContainer(void) const
Superclass::InputVnlVectorType InputVnlVectorType
Superclass::OutputVectorType OutputVectorType
Superclass::JacobianType JacobianType
Superclass::InputPointType InputPointType
Implements a weighted linear combination of multiple transforms.
itkStaticConstMacro(InputSpaceDimension, unsigned int, NInputDimensions)
Superclass::InputVectorType InputVectorType
Transform< TScalarType, NInputDimensions, NOutputDimensions > TransformType
virtual void SetParameters(const ParametersType &param)
virtual void GetJacobian(const InputPointType &ipp, JacobianType &jac, NonZeroJacobianIndicesType &nzji) const
Superclass::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
Superclass::InputCovariantVectorType InputCovariantVectorType
Superclass::OutputPointType OutputPointType
std::vector< SpatialJacobianType > JacobianOfSpatialJacobianType
Superclass::InputVnlVectorType InputVnlVectorType
virtual void SetTransformContainer(const TransformContainerType &transformContainer)
Superclass::InputCovariantVectorType InputCovariantVectorType
FixedArray< Matrix< ScalarType, InputSpaceDimension, InputSpaceDimension >, OutputSpaceDimension > SpatialHessianType


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