go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkCyclicBSplineDeformableTransform.h
Go to the documentation of this file.
1 /*======================================================================
2 
3 This file is part of the elastix software.
4 
5 Copyright (c) Erasmus MC University Medical Center Rotterdam.
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 __itkCyclicBSplineDeformableTransform_h
16 #define __itkCyclicBSplineDeformableTransform_h
17 
18 #include "itkAdvancedTransform.h"
19 #include "itkImage.h"
20 #include "itkImageRegion.h"
26 
27 namespace itk
28 {
29 
37 template <
38  class TScalarType = double, // Data type for scalars
39  unsigned int NDimensions = 3, // Number of dimensions
40  unsigned int VSplineOrder = 3 > // Spline order
42  : public AdvancedBSplineDeformableTransform< TScalarType, NDimensions, VSplineOrder >
43 {
44 public:
48  TScalarType, NDimensions, VSplineOrder > Superclass;
49  typedef SmartPointer<Self> Pointer;
50  typedef SmartPointer<const Self> ConstPointer;
51 
53  itkNewMacro( Self );
54 
57 
59  itkStaticConstMacro( SpaceDimension, unsigned int, NDimensions );
60 
62  itkStaticConstMacro( SplineOrder, unsigned int, VSplineOrder );
63 
66  typedef typename Superclass
68  typedef typename Superclass
71  typedef typename Superclass
75 
77  typedef typename ParametersType::ValueType PixelType;
78  typedef Image< PixelType,
79  itkGetStaticConstMacro( SpaceDimension )> ImageType;
80  typedef typename ImageType::Pointer ImagePointer;
81 
83  typedef typename RegionType::IndexType IndexType;
84  typedef typename RegionType::SizeType SizeType;
85  typedef typename ImageType::SpacingType SpacingType;
86  typedef typename ImageType::DirectionType DirectionType;
87  typedef typename ImageType::PointType OriginType;
88  typedef typename RegionType::IndexType GridOffsetType;
91  typedef typename Superclass::WeightsType WeightsType;
92  typedef typename Superclass::
94  typedef typename Superclass::
97  typedef typename Superclass::
99  typedef typename Superclass::
101  typedef typename Superclass::
102  WeightsFunctionType WeightsFunctionType;
104  itkGetStaticConstMacro( SpaceDimension ) - 1,
105  itkGetStaticConstMacro( SplineOrder ) > RedWeightsFunctionType;
106  typedef typename RedWeightsFunctionType::
108 
110  virtual void SetGridRegion( const RegionType& region );
111 
119  virtual void TransformPoint(
120  const InputPointType & inputPoint,
121  OutputPointType & outputPoint,
122  WeightsType & weights,
123  ParameterIndexArrayType & indices,
124  bool & inside ) const;
125 
127  virtual const JacobianType & GetJacobian( const InputPointType & point ) const;
128 
130  virtual void GetJacobian(
131  const InputPointType & ipp,
132  WeightsType & weights,
133  ParameterIndexArrayType & indices ) const;
134 
136  virtual void GetSpatialJacobian(
137  const InputPointType & ipp,
138  SpatialJacobianType & sj ) const;
139 
140 protected:
143 
144  void ComputeNonZeroJacobianIndices(
145  NonZeroJacobianIndicesType & nonZeroJacobianIndices,
146  const RegionType & supportRegion ) const;
147 
149  bool InsideValidRegion( const ContinuousIndexType & index ) const;
150 
152  virtual void SplitRegion(
153  const RegionType & imageRegion,
154  const RegionType & inRegion,
155  RegionType & outRegion1,
156  RegionType & outRegion2) const;
157 
158 private:
159  CyclicBSplineDeformableTransform(const Self&); //purposely not implemented
160  void operator=(const Self&); //purposely not implemented
161 
162 }; //class CyclicBSplineDeformableTransform
163 
164 
165 } // namespace itk
166 
167 // Define instantiation macro for this template.
168 #define ITK_TEMPLATE_CyclicBSplineDeformableTransform(_, EXPORT, x, y) namespace itk { \
169  _(3(class EXPORT CyclicBSplineDeformableTransform< ITK_TEMPLATE_3 x >)) \
170  namespace Templates { typedef CyclicBSplineDeformableTransform< ITK_TEMPLATE_3 x > \
171  CyclicBSplineDeformableTransform##y; } \
172  }
173 
174 #if ITK_TEMPLATE_EXPLICIT
175 # include "Templates/itkCyclicBSplineDeformableTransform+-.h"
176 #endif
177 
178 #if ITK_TEMPLATE_TXX
179 # include "itkCyclicBSplineDeformableTransform.txx"
180 #endif
181 
182 #endif /* __itkCyclicBSplineDeformableTransform_h */
Deformable transform using a B-spline representation.
BSplineInterpolationWeightFunction2< ScalarType, itkGetStaticConstMacro(SpaceDimension)-1, itkGetStaticConstMacro(SplineOrder) > RedWeightsFunctionType
Image< PixelType, itkGetStaticConstMacro(SpaceDimension)> ImageType
ImageRegion< itkGetStaticConstMacro(SpaceDimension) > RegionType
Superclass::JacobianOfSpatialJacobianType JacobianOfSpatialJacobianType
Returns the weights over the support region used for B-spline interpolation/reconstruction.
Superclass::JacobianOfSpatialHessianType JacobianOfSpatialHessianType
Deformable transform using a B-spline representation in which the B-spline grid is formulated in a cy...
Image< JacobianPixelType, itkGetStaticConstMacro(SpaceDimension) > JacobianImageType
Superclass::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
Superclass::JacobianOfSpatialHessianType JacobianOfSpatialHessianType
WeightsFunctionType::ContinuousIndexType ContinuousIndexType
RedWeightsFunctionType::ContinuousIndexType RedContinuousIndexType
Superclass::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
AdvancedBSplineDeformableTransform< TScalarType, NDimensions, VSplineOrder > Superclass
ContinuousIndex< ScalarType, SpaceDimension > ContinuousIndexType
Superclass::JacobianOfSpatialJacobianType JacobianOfSpatialJacobianType
Superclass::ParameterIndexArrayType ParameterIndexArrayType


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