go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkAdvancedBSplineDeformableTransform.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 /*=========================================================================
16 
17  Program: Insight Segmentation & Registration Toolkit
18  Module: $RCSfile: itkAdvancedBSplineDeformableTransform.h,v $
19  Language: C++
20  Date: $Date: 2008-04-11 16:28:11 $
21  Version: $Revision: 1.38 $
22 
23  Copyright (c) Insight Software Consortium. All rights reserved.
24  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
25 
26  This software is distributed WITHOUT ANY WARRANTY; without even
27  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
28  PURPOSE. See the above copyright notices for more information.
29 
30 =========================================================================*/
31 #ifndef __itkAdvancedBSplineDeformableTransform_h
32 #define __itkAdvancedBSplineDeformableTransform_h
33 
35 #include "itkImage.h"
36 #include "itkImageRegion.h"
40 
41 namespace itk
42 {
43 
44 // Forward declarations for friendship
45 template< class TScalarType, unsigned int NDimensions, unsigned int VSplineOrder >
47 
125 template<
126 class TScalarType = double, // Data type for scalars
127 unsigned int NDimensions = 3, // Number of dimensions
128 unsigned int VSplineOrder = 3 >
129 // Spline order
131  public AdvancedBSplineDeformableTransformBase< TScalarType, NDimensions >
132 {
133 public:
134 
138  TScalarType, NDimensions > Superclass;
139  typedef SmartPointer< Self > Pointer;
140  typedef SmartPointer< const Self > ConstPointer;
141 
143  itkNewMacro( Self );
144 
147 
149  itkStaticConstMacro( SpaceDimension, unsigned int, NDimensions );
150 
152  itkStaticConstMacro( SplineOrder, unsigned int, VSplineOrder );
153 
166  typedef typename Superclass::InputCovariantVectorType
170 
171  typedef typename Superclass
174  typedef typename Superclass
177  typedef typename Superclass
180 
185 
188 
190  typedef typename Superclass::SizeType SizeType;
195 
197  virtual void SetGridRegion( const RegionType & region );
198 
200  OutputPointType TransformPoint( const InputPointType & point ) const;
201 
204  itkGetStaticConstMacro( SpaceDimension ),
205  itkGetStaticConstMacro( SplineOrder ) > WeightsFunctionType;
210  ScalarType,
211  itkGetStaticConstMacro( SpaceDimension ),
212  itkGetStaticConstMacro( SplineOrder ) > DerivativeWeightsFunctionType;
215  ScalarType,
216  itkGetStaticConstMacro( SpaceDimension ),
217  itkGetStaticConstMacro( SplineOrder ) > SODerivativeWeightsFunctionType;
219 
222 
230  virtual void TransformPoint(
231  const InputPointType & inputPoint,
232  OutputPointType & outputPoint,
233  WeightsType & weights,
234  ParameterIndexArrayType & indices,
235  bool & inside ) const;
236 
238  unsigned long GetNumberOfWeights( void ) const
239  {
240  return this->m_WeightsFunction->GetNumberOfWeights();
241  }
242 
243 
244  unsigned int GetNumberOfAffectedWeights( void ) const;
245 
247 
249  virtual void GetJacobian(
250  const InputPointType & ipp,
251  JacobianType & j,
252  NonZeroJacobianIndicesType & ) const;
253 
255  virtual void GetSpatialJacobian(
256  const InputPointType & ipp,
257  SpatialJacobianType & sj ) const;
258 
260  virtual void GetSpatialHessian(
261  const InputPointType & ipp,
262  SpatialHessianType & sh ) const;
263 
265  virtual void GetJacobianOfSpatialJacobian(
266  const InputPointType & ipp,
268  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const;
269 
273  virtual void GetJacobianOfSpatialJacobian(
274  const InputPointType & ipp,
275  SpatialJacobianType & sj,
277  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const;
278 
280  virtual void GetJacobianOfSpatialHessian(
281  const InputPointType & ipp,
283  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const;
284 
288  virtual void GetJacobianOfSpatialHessian(
289  const InputPointType & ipp,
290  SpatialHessianType & sh,
292  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const;
293 
294 protected:
295 
297  virtual void PrintSelf( std::ostream & os, Indent indent ) const;
298 
301 
303  // Why??
304  itkSetObjectMacro( WeightsFunction, WeightsFunctionType );
305  itkGetObjectMacro( WeightsFunction, WeightsFunctionType );
306 
308  void WrapAsImages( void );
309 
310  virtual void ComputeNonZeroJacobianIndices(
311  NonZeroJacobianIndicesType & nonZeroJacobianIndices,
312  const RegionType & supportRegion ) const;
313 
316 
322  std::vector< DerivativeWeightsFunctionPointer > m_DerivativeWeightsFunctions;
323  std::vector< std::vector< SODerivativeWeightsFunctionPointer > > m_SODerivativeWeightsFunctions;
324 
325 private:
326 
327  AdvancedBSplineDeformableTransform( const Self & ); // purposely not implemented
328  void operator=( const Self & ); // purposely not implemented
329 
331  itkGetStaticConstMacro( SpaceDimension ),
332  itkGetStaticConstMacro( SplineOrder ) >;
333 
334 };
335 
336 } // namespace itk
337 
338 #ifndef ITK_MANUAL_INSTANTIATION
339 #include "itkAdvancedBSplineDeformableTransform.hxx"
340 #endif
341 
342 #endif /* __itkAdvancedBSplineDeformableTransform_h */
Matrix< ScalarType, OutputSpaceDimension, InputSpaceDimension > SpatialJacobianType
std::vector< DerivativeWeightsFunctionPointer > m_DerivativeWeightsFunctions
Deformable transform using a B-spline representation.
itkStaticConstMacro(SpaceDimension, unsigned int, NDimensions)
virtual void SetGridRegion(const RegionType &region)
Superclass::InputCovariantVectorType InputCovariantVectorType
BSplineInterpolationSecondOrderDerivativeWeightFunction< ScalarType, itkGetStaticConstMacro(SpaceDimension), itkGetStaticConstMacro(SplineOrder) > SODerivativeWeightsFunctionType
virtual void GetJacobianOfSpatialJacobian(const InputPointType &ipp, JacobianOfSpatialJacobianType &jsj, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const
virtual void ComputeNonZeroJacobianIndices(NonZeroJacobianIndicesType &nonZeroJacobianIndices, const RegionType &supportRegion) const
Superclass::JacobianOfSpatialHessianType JacobianOfSpatialHessianType
ImageRegion< itkGetStaticConstMacro(SpaceDimension) > RegionType
Superclass::OutputCovariantVectorType OutputCovariantVectorType
BSplineInterpolationWeightFunction2< ScalarType, itkGetStaticConstMacro(SpaceDimension), itkGetStaticConstMacro(SplineOrder) > WeightsFunctionType
BSplineInterpolationDerivativeWeightFunction< ScalarType, itkGetStaticConstMacro(SpaceDimension), itkGetStaticConstMacro(SplineOrder) > DerivativeWeightsFunctionType
Returns the weights over the support region used for B-spline interpolation/reconstruction.
AdvancedBSplineDeformableTransformBase< TScalarType, NDimensions > Superclass
virtual void PrintSelf(std::ostream &os, Indent indent) const
Image< JacobianPixelType, itkGetStaticConstMacro(SpaceDimension) > JacobianImageType
Returns the weights over the support region used for B-spline interpolation/reconstruction.
Superclass::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
std::vector< std::vector< SODerivativeWeightsFunctionPointer > > m_SODerivativeWeightsFunctions
WeightsFunctionType::ContinuousIndexType ContinuousIndexType
virtual void GetJacobian(const InputPointType &ipp, JacobianType &j, NonZeroJacobianIndicesType &) const
unsigned int GetNumberOfAffectedWeights(void) const
OutputPointType TransformPoint(const InputPointType &point) const
This transform is a composition of B-spline transformations, allowing sliding motion between differen...
Image< PixelType, itkGetStaticConstMacro(SpaceDimension) > ImageType
Superclass::JacobianOfSpatialJacobianType JacobianOfSpatialJacobianType
virtual void GetSpatialJacobian(const InputPointType &ipp, SpatialJacobianType &sj) const
virtual void GetSpatialHessian(const InputPointType &ipp, SpatialHessianType &sh) const
DerivativeWeightsFunctionType::Pointer DerivativeWeightsFunctionPointer
Returns the weights over the support region used for B-spline interpolation/reconstruction.
SODerivativeWeightsFunctionType::Pointer SODerivativeWeightsFunctionPointer
Base class for deformable transform using a B-spline representation.
virtual void GetJacobianOfSpatialHessian(const InputPointType &ipp, JacobianOfSpatialHessianType &jsh, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const
FixedArray< Matrix< ScalarType, InputSpaceDimension, InputSpaceDimension >, OutputSpaceDimension > SpatialHessianType
virtual NumberOfParametersType GetNumberOfNonZeroJacobianIndices(void) const


Generated on 27-04-2014 for elastix by doxygen 1.8.6 elastix logo