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
76 
78  typedef typename ParametersType::ValueType PixelType;
79  typedef Image< PixelType,
80  itkGetStaticConstMacro( SpaceDimension )> ImageType;
81  typedef typename ImageType::Pointer ImagePointer;
82 
84  typedef typename RegionType::IndexType IndexType;
85  typedef typename RegionType::SizeType SizeType;
86  typedef typename ImageType::SpacingType SpacingType;
87  typedef typename ImageType::DirectionType DirectionType;
88  typedef typename ImageType::PointType OriginType;
89  typedef typename RegionType::IndexType GridOffsetType;
92  typedef typename Superclass::WeightsType WeightsType;
93  typedef typename Superclass::
95  typedef typename Superclass::
98  typedef typename Superclass::
100  typedef typename Superclass::
102  typedef typename Superclass::
103  WeightsFunctionType WeightsFunctionType;
105  itkGetStaticConstMacro( SpaceDimension ) - 1,
106  itkGetStaticConstMacro( SplineOrder ) > RedWeightsFunctionType;
107  typedef typename RedWeightsFunctionType::
109 
111  virtual void SetGridRegion( const RegionType& region );
112 
120  virtual void TransformPoint(
121  const InputPointType & inputPoint,
122  OutputPointType & outputPoint,
123  WeightsType & weights,
124  ParameterIndexArrayType & indices,
125  bool & inside ) const;
126 
128  virtual void GetJacobian(
129  const InputPointType & ipp,
130  WeightsType & weights,
131  ParameterIndexArrayType & indices ) const;
132 
134  virtual void GetSpatialJacobian(
135  const InputPointType & ipp,
136  SpatialJacobianType & sj ) const;
137 
138 protected:
141 
142  void ComputeNonZeroJacobianIndices(
143  NonZeroJacobianIndicesType & nonZeroJacobianIndices,
144  const RegionType & supportRegion ) const;
145 
147  bool InsideValidRegion( const ContinuousIndexType & index ) const;
148 
150  virtual void SplitRegion(
151  const RegionType & imageRegion,
152  const RegionType & inRegion,
153  RegionType & outRegion1,
154  RegionType & outRegion2) const;
155 
156 private:
157  CyclicBSplineDeformableTransform(const Self&); //purposely not implemented
158  void operator=(const Self&); //purposely not implemented
159 
160 }; //class CyclicBSplineDeformableTransform
161 
162 
163 } // namespace itk
164 
165 // Define instantiation macro for this template.
166 #define ITK_TEMPLATE_CyclicBSplineDeformableTransform(_, EXPORT, x, y) namespace itk { \
167  _(3(class EXPORT CyclicBSplineDeformableTransform< ITK_TEMPLATE_3 x >)) \
168  namespace Templates { typedef CyclicBSplineDeformableTransform< ITK_TEMPLATE_3 x > \
169  CyclicBSplineDeformableTransform##y; } \
170  }
171 
172 #if ITK_TEMPLATE_EXPLICIT
173 # include "Templates/itkCyclicBSplineDeformableTransform+-.h"
174 #endif
175 
176 #if ITK_TEMPLATE_TXX
177 # include "itkCyclicBSplineDeformableTransform.txx"
178 #endif
179 
180 #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
Superclass::NumberOfParametersType NumberOfParametersType
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-01-2014 for elastix by doxygen 1.8.5 elastix logo