ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkBSplineTransformInitializer.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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 itkBSplineTransformInitializer_h
19 #define itkBSplineTransformInitializer_h
20 
21 #include "itkObject.h"
22 #include "itkObjectFactory.h"
23 
24 namespace itk
25 {
40 template<typename TTransform, typename TImage>
41 class ITK_TEMPLATE_EXPORT BSplineTransformInitializer
42 : public Object
43 {
44 public:
45  ITK_DISALLOW_COPY_AND_ASSIGN(BSplineTransformInitializer);
46 
49  using Superclass = Object;
52 
54  itkNewMacro( Self );
55 
57  itkTypeMacro( BSplineTransformInitializer, Object );
58 
60  using TransformType = TTransform;
61 
63  using ImageType = TImage;
64  using ImagePointer = typename ImageType::ConstPointer;
65  using IndexType = typename ImageType::IndexType;
67  using ImagePointCoordRepType = typename ImagePointType::CoordRepType;
68 
70  using TransformPointer = typename TransformType::Pointer;
72  using SizeType = typename RegionType::SizeType;
73  using SpacingType = typename TransformType::SpacingType;
74  using OriginType = typename TransformType::OriginType;
76  using PhysicalDimensionsType = typename TransformType::PhysicalDimensionsType;
77  using MeshSizeType = typename TransformType::MeshSizeType;
78  using SpacingComponentType = typename SpacingType::ComponentType;
79 
81  static constexpr unsigned int SpaceDimension = TransformType::SpaceDimension;
82 
84  itkGetConstObjectMacro( Transform, TransformType );
85  itkSetObjectMacro( Transform, TransformType );
87 
89  itkGetConstObjectMacro( Image, ImageType );
90  itkSetConstObjectMacro( Image, ImageType );
92 
96  itkGetConstMacro( TransformDomainMeshSize, MeshSizeType );
97  void SetTransformDomainMeshSize( const MeshSizeType );
99 
101  virtual void InitializeTransform() const;
102 
103 protected:
105  ~BSplineTransformInitializer() override = default;
106 
107  void PrintSelf( std::ostream & os, Indent indent ) const override;
108 
109 private:
112 
114  bool m_SetTransformDomainMeshSizeViaInitializer{ false };
115 
116 }; //class BSplineTransformInitializer
117 } // namespace itk
118 
119 #ifndef ITK_MANUAL_INSTANTIATION
120 #include "itkBSplineTransformInitializer.hxx"
121 #endif
122 
123 #endif /* itkBSplineTransformInitializer_h */
BSplineTransformInitializer is a helper class intended to initialize the control point grid such that...
Light weight base class for most itk classes.
typename TransformType::SpacingType SpacingType
typename TransformType::PhysicalDimensionsType PhysicalDimensionsType
typename TransformType::DirectionType DirectionType
typename ImageType::ConstPointer ImagePointer
typename TransformType::MeshSizeType MeshSizeType
Transform points and vectors from an input space to an output space.
Definition: itkTransform.h:83
typename SpacingType::ComponentType SpacingComponentType
typename ImageType::PointType ImagePointType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
typename TransformType::OriginType OriginType
Base class for most ITK classes.
Definition: itkObject.h:60
typename TransformType::RegionType RegionType
typename ImagePointType::CoordRepType ImagePointCoordRepType
Templated n-dimensional image class.
Definition: itkImage.h:75
typename TransformType::Pointer TransformPointer