Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
itkBSplineDeformableTransformInitializer.h
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef __itkBSplineDeformableTransformInitializer_h
18 #define __itkBSplineDeformableTransformInitializer_h
19 
20 #include "itkObject.h"
21 #include "itkObjectFactory.h"
22 
23 #include <iostream>
24 
25 namespace itk
26 {
39  template <class TTransform, class TImage>
40  class ITK_EXPORT BSplineDeformableTransformInitializer : public Object
41  {
42  public:
45  typedef Object Superclass;
48 
50  itkFactorylessNewMacro(Self) itkCloneMacro(Self)
51 
54 
56  typedef TTransform TransformType;
57 
59  typedef typename TransformType::Pointer TransformPointer;
60  typedef typename TransformType::RegionType TransformRegionType;
61  typedef typename TransformRegionType::SizeType TransformSizeType;
62 
64  itkStaticConstMacro(SpaceDimension, unsigned int, TransformType::InputSpaceDimension);
65 
67  typedef TImage ImageType;
68  typedef typename ImageType::ConstPointer ImagePointer;
69 
71  itkSetObjectMacro(Transform, TransformType);
72 
74  itkSetConstObjectMacro(Image, ImageType);
75 
79  itkSetMacro(GridSizeInsideTheImage, TransformSizeType);
80 
87  void SetNumberOfGridNodesInsideTheImage(unsigned int numberOfNodes)
88  {
89  this->m_GridSizeInsideTheImage.Fill(numberOfNodes);
90  this->Modified();
91  }
92 
94  virtual void InitializeTransform() const;
95 
96  protected:
99 
100  void PrintSelf(std::ostream &os, Indent indent) const override;
101 
102  private:
103  BSplineDeformableTransformInitializer(const Self &); // purposely not implemented
104  void operator=(const Self &); // purposely not implemented
105 
106  TransformPointer m_Transform;
107 
108  ImagePointer m_Image;
109 
110  TransformSizeType m_GridSizeInsideTheImage;
111 
112  unsigned int m_NumberOfGridNodesInsideTheImage;
113 
114  }; // class BSplineDeformableTransformInitializer
115 
116 } // namespace itk
117 
118 #ifndef ITK_MANUAL_INSTANTIATION
120 #endif
121 
122 #endif /* __itkBSplineDeformableTransformInitializer_h */
BSplineDeformableTransformInitializer is a helper class intended to initialize the grid parameters of...
class ITK_EXPORT Image