ITK  6.0.0
Insight Toolkit
itkBSplineTransformInitializer.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
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 * https://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
24namespace itk
25{
40template <typename TTransform, typename TImage>
41class ITK_TEMPLATE_EXPORT BSplineTransformInitializer : public Object
42{
43public:
44 ITK_DISALLOW_COPY_AND_MOVE(BSplineTransformInitializer);
45
51
53 itkNewMacro(Self);
54
56 itkOverrideGetNameOfClassMacro(BSplineTransformInitializer);
57
59 using TransformType = TTransform;
60
62 using ImageType = TImage;
66 using ImagePointCoordinateType = typename ImagePointType::CoordinateType;
67#ifndef ITK_FUTURE_LEGACY_REMOVE
68 using ImagePointCoordRepType ITK_FUTURE_DEPRECATED(
69 "ITK 6 discourages using `ImagePointCoordRepType`. Please use `ImagePointCoordinateType` instead!") =
71#endif
72
77 using SpacingType = typename TransformType::SpacingType;
78 using OriginType = typename TransformType::OriginType;
80 using PhysicalDimensionsType = typename TransformType::PhysicalDimensionsType;
81 using MeshSizeType = typename TransformType::MeshSizeType;
82 using SpacingComponentType = typename SpacingType::ComponentType;
83
85 static constexpr unsigned int SpaceDimension = TransformType::SpaceDimension;
86
88 itkGetConstObjectMacro(Transform, TransformType);
89 itkSetObjectMacro(Transform, TransformType);
93 itkGetConstObjectMacro(Image, ImageType);
94 itkSetConstObjectMacro(Image, ImageType);
100 itkGetConstMacro(TransformDomainMeshSize, MeshSizeType);
101 void
106 virtual void
108
109protected:
111 ~BSplineTransformInitializer() override = default;
112
113 void
114 PrintSelf(std::ostream & os, Indent indent) const override;
115
116private:
117 ImagePointer m_Image{};
118 TransformPointer m_Transform{};
119
120 MeshSizeType m_TransformDomainMeshSize{ MeshSizeType::Filled(1) };
121 bool m_SetTransformDomainMeshSizeViaInitializer{ false };
122
123}; // class BSplineTransformInitializer
124} // namespace itk
125
126#ifndef ITK_MANUAL_INSTANTIATION
127# include "itkBSplineTransformInitializer.hxx"
128#endif
129
130#endif /* itkBSplineTransformInitializer_h */
BSplineTransformInitializer is a helper class intended to initialize the control point grid such that...
void PrintSelf(std::ostream &os, Indent indent) const override
typename TransformType::OriginType OriginType
~BSplineTransformInitializer() override=default
typename TransformType::MeshSizeType MeshSizeType
void SetTransformDomainMeshSize(const MeshSizeType)
typename ImageType::PointType ImagePointType
typename ImagePointType::CoordinateType ImagePointCoordinateType
typename ImageType::ConstPointer ImagePointer
typename SpacingType::ComponentType SpacingComponentType
typename TransformType::Pointer TransformPointer
typename TransformType::PhysicalDimensionsType PhysicalDimensionsType
typename TransformType::DirectionType DirectionType
virtual void InitializeTransform() const
typename TransformType::RegionType RegionType
typename TransformType::SpacingType SpacingType
Templated n-dimensional image class.
Definition: itkImage.h:89
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
Base class for most ITK classes.
Definition: itkObject.h:62
Transform points and vectors from an input space to an output space.
Definition: itkTransform.h:84
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....