ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkPDEDeformableRegistrationFunction.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 itkPDEDeformableRegistrationFunction_h
19#define itkPDEDeformableRegistrationFunction_h
20
22
23namespace itk
24{
40template <typename TFixedImage, typename TMovingImage, typename TDisplacementField>
41class ITK_TEMPLATE_EXPORT PDEDeformableRegistrationFunction : public FiniteDifferenceFunction<TDisplacementField>
42{
43public:
44 ITK_DISALLOW_COPY_AND_MOVE(PDEDeformableRegistrationFunction);
45
51
53 itkOverrideGetNameOfClassMacro(PDEDeformableRegistrationFunction);
54
56 using MovingImageType = TMovingImage;
57 using MovingImagePointer = typename MovingImageType::ConstPointer;
58
60 using FixedImageType = TFixedImage;
61 using FixedImagePointer = typename FixedImageType::ConstPointer;
62
64 using DisplacementFieldType = TDisplacementField;
65 using DisplacementFieldTypePointer = typename DisplacementFieldType::Pointer;
66
68 void
70 {
71 m_MovingImage = ptr;
72 }
77 {
79 }
82 void
89 const FixedImageType *
91 {
93 }
94
96 void
101
106 {
107 return m_DisplacementField;
108 }
110 void
111 SetEnergy(double e)
112 {
113 m_Energy = e;
114 }
115 double
116 GetEnergy() const
118 return m_Energy;
119 }
120 void
122 {
123 m_GradientStep = e;
124 }
125 double
127 {
128 return m_GradientStep;
129 }
130 void
132 {
134 }
135 bool
137 {
138 return m_NormalizeGradient;
139 }
140
141protected:
143 {
144 m_MovingImage = nullptr;
145 m_FixedImage = nullptr;
146 m_DisplacementField = nullptr;
147 m_Energy = 0.0;
148 m_NormalizeGradient = true;
149 m_GradientStep = 1.0;
150 }
151
153
154 void
155 PrintSelf(std::ostream & os, Indent indent) const override
156 {
157 Superclass::PrintSelf(os, indent);
158 os << indent << "MovingImage: ";
159 os << m_MovingImage.GetPointer() << std::endl;
160 os << indent << "FixedImage: ";
161 os << m_FixedImage.GetPointer() << std::endl;
162 }
163
166
169
172
173 mutable double m_Energy{};
174
176
177 mutable double m_GradientStep{};
178};
179} // end namespace itk
180
181#endif
void PrintSelf(std::ostream &os, Indent indent) const override
Control indentation during Print() invocation.
Definition itkIndent.h:50
void SetDisplacementField(DisplacementFieldTypePointer ptr)
~PDEDeformableRegistrationFunction() override=default
void PrintSelf(std::ostream &os, Indent indent) const override
FiniteDifferenceFunction< TDisplacementField > Superclass
typename DisplacementFieldType::Pointer DisplacementFieldTypePointer
typename FixedImageType::ConstPointer FixedImagePointer
typename MovingImageType::ConstPointer MovingImagePointer
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....