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  * 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 #ifndef __itkWeightedCombinationTransform_h
19 #define __itkWeightedCombinationTransform_h
20 
21 #include "itkAdvancedTransform.h"
22 
23 namespace itk
24 {
25 
41 template< class TScalarType,
42 unsigned int NInputDimensions = 3,
43 unsigned int NOutputDimensions = 3 >
45  public AdvancedTransform< TScalarType, NInputDimensions, NOutputDimensions >
46 {
47 public:
48 
51  typedef AdvancedTransform< TScalarType,
52  NInputDimensions,
53  NOutputDimensions > Superclass;
55  typedef SmartPointer< const Self > ConstPointer;
56 
58  itkNewMacro( Self );
59 
62 
64  itkStaticConstMacro( InputSpaceDimension, unsigned int, NInputDimensions );
65  itkStaticConstMacro( OutputSpaceDimension, unsigned int, NOutputDimensions );
66 
74  typedef typename Superclass
76  typedef typename Superclass
82  typedef typename
85  typedef typename
88  typedef typename Superclass
90 
92  typedef Transform< TScalarType,
93  NInputDimensions,
94  NOutputDimensions > TransformType;
96  typedef typename TransformType::Pointer TransformPointer;
97  typedef std::vector< TransformPointer > TransformContainerType;
98 
100  virtual OutputPointType TransformPoint( const InputPointType & ipp ) const;
101 
103  virtual OutputVectorType TransformVector( const InputVectorType & ) const
104  {
105  itkExceptionMacro(
106  << "TransformVector(const InputVectorType &) is not implemented "
107  << "for WeightedCombinationTransform" );
108  }
109 
110 
111  virtual OutputVnlVectorType TransformVector( const InputVnlVectorType & ) const
112  {
113  itkExceptionMacro(
114  << "TransformVector(const InputVnlVectorType &) is not implemented "
115  << "for WeightedCombinationTransform" );
116  }
117 
118 
119  virtual OutputCovariantVectorType TransformCovariantVector( const InputCovariantVectorType & ) const
120  {
121  itkExceptionMacro(
122  << "TransformCovariantVector(const InputCovariantVectorType &) is not implemented "
123  << "for WeightedCombinationTransform" );
124  }
125 
126 
132  virtual void GetJacobian(
133  const InputPointType & ipp,
134  JacobianType & jac,
135  NonZeroJacobianIndicesType & nzji ) const;
136 
140  virtual void SetParameters( const ParametersType & param );
141 
143  itkGetConstReferenceMacro( Parameters, ParametersType );
144 
146  virtual void SetFixedParameters( const ParametersType & )
147  {
148  // \todo: to be implemented by Stefan
149  }
150 
151 
153  virtual const ParametersType & GetFixedParameters( void ) const
154  {
155  // \todo: to be implemented by Stefan: check this:
156  return this->m_FixedParameters;
157  }
158 
159 
161  virtual NumberOfParametersType GetNumberOfParameters( void ) const
162  {
163  return this->m_TransformContainer.size();
164  }
165 
166 
169  itkSetMacro( NormalizeWeights, bool );
170  itkGetConstMacro( NormalizeWeights, bool );
171 
173  virtual void SetTransformContainer( const TransformContainerType & transformContainer )
174  {
175  this->m_TransformContainer = transformContainer;
176  this->Modified();
177  }
178 
179 
189  const TransformContainerType & GetTransformContainer( void ) const
190  {
191  return this->m_TransformContainer;
192  }
193 
194 
196  virtual void GetSpatialJacobian(
197  const InputPointType & ipp, SpatialJacobianType & sj ) const
198  {
199  itkExceptionMacro( << "Not implemented for WeightedCombinationTransform" );
200  }
201 
202 
203  virtual void GetSpatialHessian(
204  const InputPointType & ipp, SpatialHessianType & sh ) const
205  {
206  itkExceptionMacro( << "Not implemented for WeightedCombinationTransform" );
207  }
208 
209 
211  const InputPointType & ipp, JacobianOfSpatialJacobianType & jsj,
212  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const
213  {
214  itkExceptionMacro( << "Not implemented for WeightedCombinationTransform" );
215  }
216 
217 
219  const InputPointType & ipp, SpatialJacobianType & sj,
220  JacobianOfSpatialJacobianType & jsj,
221  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const
222  {
223  itkExceptionMacro( << "Not implemented for WeightedCombinationTransform" );
224  }
225 
226 
228  const InputPointType & ipp, JacobianOfSpatialHessianType & jsh,
229  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const
230  {
231  itkExceptionMacro( << "Not implemented for WeightedCombinationTransform" );
232  }
233 
234 
236  const InputPointType & ipp, SpatialHessianType & sh,
237  JacobianOfSpatialHessianType & jsh,
238  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const
239  {
240  itkExceptionMacro( << "Not implemented for WeightedCombinationTransform" );
241  }
242 
243 
244 protected:
245 
248 
249  TransformContainerType m_TransformContainer;
251 
253  NonZeroJacobianIndicesType m_NonZeroJacobianIndices;
254 
255 private:
256 
257  WeightedCombinationTransform( const Self & ); // purposely not implemented
258  void operator=( const Self & ); // purposely not implemented
259 
261 
262 };
263 
264 } // end namespace itk
265 
266 #ifndef ITK_MANUAL_INSTANTIATION
267 #include "itkWeightedCombinationTransform.hxx"
268 #endif
269 
270 #endif
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-09-2015 for elastix by doxygen 1.8.9.1 elastix logo