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 
70  typedef typename Superclass
72  typedef typename Superclass
78  typedef typename
81  typedef typename
84  typedef typename Superclass
86 
88  typedef Transform< TScalarType,
89  NInputDimensions,
90  NOutputDimensions > TransformType;
92  typedef typename TransformType::Pointer TransformPointer;
93  typedef std::vector< TransformPointer > TransformContainerType;
94 
96  virtual OutputPointType TransformPoint( const InputPointType & ipp ) const;
97 
100  {
101  itkExceptionMacro(
102  << "TransformVector(const InputVectorType &) is not implemented "
103  << "for WeightedCombinationTransform" );
104  }
106  {
107  itkExceptionMacro(
108  << "TransformVector(const InputVnlVectorType &) is not implemented "
109  << "for WeightedCombinationTransform" );
110  }
112  {
113  itkExceptionMacro(
114  << "TransformCovariantVector(const InputCovariantVectorType &) is not implemented "
115  << "for WeightedCombinationTransform" );
116  }
117 
123  virtual void GetJacobian(
124  const InputPointType & ipp,
125  JacobianType & jac,
126  NonZeroJacobianIndicesType & nzji ) const;
127 
131  virtual void SetParameters( const ParametersType & param );
132 
134  itkGetConstReferenceMacro( Parameters, ParametersType );
135 
137  virtual void SetFixedParameters( const ParametersType & )
138  {
139  // \todo: to be implemented by Stefan
140  }
141 
143  virtual const ParametersType & GetFixedParameters( void ) const
144  {
145  // \todo: to be implemented by Stefan: check this:
146  return this->m_FixedParameters;
147  }
148 
151  {
152  return this->m_TransformContainer.size();
153  };
154 
157  itkSetMacro( NormalizeWeights, bool );
158  itkGetConstMacro( NormalizeWeights, bool );
159 
161  virtual void SetTransformContainer( const TransformContainerType & transformContainer )
162  {
163  this->m_TransformContainer = transformContainer;
164  this->Modified();
165  };
166 
177  {
178  return this->m_TransformContainer;
179  }
180 
182  virtual void GetSpatialJacobian(
183  const InputPointType & ipp, SpatialJacobianType & sj ) const
184  {
185  itkExceptionMacro( << "Not implemented for WeightedCombinationTransform" );
186  }
187  virtual void GetSpatialHessian(
188  const InputPointType & ipp, SpatialHessianType & sh ) const
189  {
190  itkExceptionMacro( << "Not implemented for WeightedCombinationTransform" );
191  }
194  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const
195  {
196  itkExceptionMacro( << "Not implemented for WeightedCombinationTransform" );
197  }
199  const InputPointType & ipp, SpatialJacobianType & sj,
201  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const
202  {
203  itkExceptionMacro( << "Not implemented for WeightedCombinationTransform" );
204  }
206  const InputPointType & ipp, JacobianOfSpatialHessianType & jsh,
207  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const
208  {
209  itkExceptionMacro( << "Not implemented for WeightedCombinationTransform" );
210  }
212  const InputPointType & ipp, SpatialHessianType & sh,
214  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const
215  {
216  itkExceptionMacro( << "Not implemented for WeightedCombinationTransform" );
217  }
218 
219 protected:
222 
225 
228 
229 private:
230 
231  WeightedCombinationTransform(const Self&); // purposely not implemented
232  void operator=(const Self&); // purposely not implemented
233 
235 
236 }; // end class WeightedCombinationTransform
237 
238 } // end namespace itk
239 
240 // \todo: copied the below from itk. does this just work like this?:
241 
242 // Define instantiation macro for this template.
243 #define ITK_TEMPLATE_WeightedCombination(_, EXPORT, x, y) namespace itk { \
244  _(3(class EXPORT WeightedCombinationTransform< ITK_TEMPLATE_3 x >)) \
245  namespace Templates { typedef WeigthedCombinationTransform< ITK_TEMPLATE_3 x > WeightedCombinationTransform##y; } \
246  }
247 
248 #if ITK_TEMPLATE_EXPLICIT
249 # include "Templates/itkWeightedCombinationTransform+-.h"
250 #endif
251 
252 #if ITK_TEMPLATE_TXX
253 # include "itkWeightedCombinationTransform.txx"
254 #endif
255 
256 #endif
257 
Superclass::SpatialJacobianType SpatialJacobianType
Matrix< ScalarType, OutputSpaceDimension, InputSpaceDimension > SpatialJacobianType
virtual OutputPointType TransformPoint(const InputPointType &ipp) const
Superclass::JacobianOfSpatialHessianType JacobianOfSpatialHessianType
Superclass::OutputVnlVectorType OutputVnlVectorType
AdvancedTransform< TScalarType, NInputDimensions, NOutputDimensions > Superclass
Superclass::OutputCovariantVectorType OutputCovariantVectorType
virtual void GetJacobianOfSpatialHessian(const InputPointType &ipp, JacobianOfSpatialHessianType &jsh, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const
std::vector< unsigned long > NonZeroJacobianIndicesType
Superclass::JacobianOfSpatialJacobianType JacobianOfSpatialJacobianType
virtual void GetJacobianOfSpatialHessian(const InputPointType &ipp, SpatialHessianType &sh, JacobianOfSpatialHessianType &jsh, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const
std::vector< TransformPointer > TransformContainerType
Superclass::ScalarType ScalarType
virtual void GetJacobianOfSpatialJacobian(const InputPointType &ipp, JacobianOfSpatialJacobianType &jsj, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const
Superclass::OutputCovariantVectorType OutputCovariantVectorType
virtual void GetSpatialJacobian(const InputPointType &ipp, SpatialJacobianType &sj) const
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
virtual void SetFixedParameters(const ParametersType &)
Superclass::OutputVectorType OutputVectorType
Superclass::NumberOfParametersType NumberOfParametersType
Superclass::JacobianType JacobianType
virtual const ParametersType & GetFixedParameters(void) const
virtual OutputVectorType TransformVector(const InputVectorType &) const
virtual OutputCovariantVectorType TransformCovariantVector(const InputCovariantVectorType &) const
virtual NumberOfParametersType GetNumberOfParameters(void) const
Superclass::InputPointType InputPointType
virtual OutputVnlVectorType TransformVector(const InputVnlVectorType &) const
Implements a weighted linear combination of multiple transforms.
itkStaticConstMacro(InputSpaceDimension, unsigned int, NInputDimensions)
virtual void GetJacobianOfSpatialJacobian(const InputPointType &ipp, SpatialJacobianType &sj, JacobianOfSpatialJacobianType &jsj, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const
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
virtual void GetSpatialHessian(const InputPointType &ipp, SpatialHessianType &sh) const
Superclass::InputCovariantVectorType InputCovariantVectorType
Superclass::OutputPointType OutputPointType
Superclass::NumberOfParametersType NumberOfParametersType
std::vector< SpatialJacobianType > JacobianOfSpatialJacobianType
std::vector< SpatialHessianType > JacobianOfSpatialHessianType
Superclass::InputVnlVectorType InputVnlVectorType
virtual void SetTransformContainer(const TransformContainerType &transformContainer)
Superclass::InputCovariantVectorType InputCovariantVectorType
FixedArray< Matrix< ScalarType, InputSpaceDimension, InputSpaceDimension >, OutputSpaceDimension > SpatialHessianType


Generated on 04-01-2014 for elastix by doxygen 1.8.5 elastix logo