ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkLandmarkBasedTransformInitializer.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 itkLandmarkBasedTransformInitializer_h
19#define itkLandmarkBasedTransformInitializer_h
20
21#include "itkObject.h"
22#include "itkObjectFactory.h"
25#include "itkRigid2DTransform.h"
26#include "itkAffineTransform.h"
27#include "itkBSplineTransform.h"
28#include "itkPoint.h"
29#include "itkPointSet.h"
32#include <vector>
33
34namespace itk
35{
83template <typename TTransform,
86class ITK_TEMPLATE_EXPORT LandmarkBasedTransformInitializer : public Object
87{
88public:
89 ITK_DISALLOW_COPY_AND_MOVE(LandmarkBasedTransformInitializer);
90
96
98 itkNewMacro(Self);
99
101 itkOverrideGetNameOfClassMacro(LandmarkBasedTransformInitializer);
102
104 using TransformType = TTransform;
105 using TransformPointer = typename TransformType::Pointer;
106
108 static constexpr unsigned int InputSpaceDimension = TransformType::InputSpaceDimension;
109 static constexpr unsigned int OutputSpaceDimension = TransformType::OutputSpaceDimension;
110
112 itkSetObjectMacro(Transform, TransformType);
113
115 using FixedImageType = TFixedImage;
116 using MovingImageType = TMovingImage;
117
119 itkSetConstObjectMacro(ReferenceImage, FixedImageType);
120
122 itkSetMacro(BSplineNumberOfControlPoints, unsigned int);
123
124 using FixedImagePointer = typename FixedImageType::ConstPointer;
125 using MovingImagePointer = typename MovingImageType::ConstPointer;
126
128 static constexpr unsigned int ImageDimension = FixedImageType::ImageDimension;
129
131 using InputPointType = typename TransformType::InputPointType;
132 using OutputVectorType = typename TransformType::OutputVectorType;
133
136 using LandmarkPointContainer = std::vector<LandmarkPointType>;
137 using PointsContainerConstIterator = typename LandmarkPointContainer::const_iterator;
138
139 using ParametersType = typename TransformType::ParametersType;
140 using ParametersValueType = typename ParametersType::ValueType;
141 using LandmarkWeightType = std::vector<double>;
142 using LandmarkWeightConstIterator = LandmarkWeightType::const_iterator;
143
145 void
147 {
148 this->m_FixedLandmarks = fixedLandmarks;
149 }
150
152 void
154 {
155 this->m_MovingLandmarks = movingLandmarks;
156 }
157
161 void
163 {
164 this->m_LandmarkWeight = landmarkWeight;
165 }
166
172
173 static constexpr unsigned int SplineOrder = 3;
175
177 virtual void
179
180protected:
183
184 void
185 PrintSelf(std::ostream & os, Indent indent) const override;
186
187private:
189 template <typename TTransform2>
190 void
192
194 void
196
198 void
200
202 void
204
206 void
208
210 void
212
215
216 void
219
224
228
229}; // class LandmarkBasedTransformInitializer
230} // namespace itk
231
232#ifndef ITK_MANUAL_INSTANTIATION
233# include "itkLandmarkBasedTransformInitializer.hxx"
234#endif
235
236#endif /* itkLandmarkBasedTransformInitializer_h */
Deformable transform using a BSpline representation.
Control indentation during Print() invocation.
Definition itkIndent.h:50
void InternalInitializeTransform(Similarity3DTransformType *)
void SetLandmarkWeight(LandmarkWeightType &landmarkWeight)
LandmarkWeightType::const_iterator LandmarkWeightConstIterator
BSplineTransform< ParametersValueType, FixedImageType::ImageDimension, SplineOrder > BSplineTransformType
~LandmarkBasedTransformInitializer() override=default
Rigid2DTransform< ParametersValueType > Rigid2DTransformType
void InternalInitializeTransform(BSplineTransformType *)
Similarity3DTransform< ParametersValueType > Similarity3DTransformType
void InternalInitializeTransform(TTransform2 *)
void InternalInitializeTransform(VersorRigid3DTransformType *)
void InternalInitializeTransform(AffineTransformType *)
typename TransformType::InputPointType InputPointType
typename TransformType::OutputVectorType OutputVectorType
typename MovingImageType::ConstPointer MovingImagePointer
void CreateMatrix(itk::Matrix< ParametersValueType, 4, 4 > &, const itk::Matrix< ParametersValueType, ImageDimension, ImageDimension >)
typename TransformType::ParametersType ParametersType
void SetFixedLandmarks(const LandmarkPointContainer &fixedLandmarks)
void PrintSelf(std::ostream &os, Indent indent) const override
PointType3D ComputeCentroid(const LandmarkPointContainer)
AffineTransform< ParametersValueType, FixedImageType::ImageDimension > AffineTransformType
typename FixedImageType::ConstPointer FixedImagePointer
VersorRigid3DTransform< ParametersValueType > VersorRigid3DTransformType
void SetMovingLandmarks(const LandmarkPointContainer &movingLandmarks)
void InternalInitializeTransform(Rigid2DTransformType *)
typename LandmarkPointContainer::const_iterator PointsContainerConstIterator
A templated class holding a M x N size Matrix.
Definition itkMatrix.h:53
A templated class holding a geometric point in n-Dimensional space.
Definition itkPoint.h:54
Rigid2DTransform of a vector space (e.g. space coordinates)
Similarity3DTransform of a vector space (e.g. space coordinates)
Implements transparent reference counting.
Transform points and vectors from an input space to an output space.
VersorRigid3DTransform of a vector space (e.g. space coordinates)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
class ITK_TEMPLATE_EXPORT ImageBase