ITK  5.2.0
Insight Toolkit
itkGPUPDEDeformableRegistrationFunction.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  * 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 itkGPUPDEDeformableRegistrationFunction_h
19 #define itkGPUPDEDeformableRegistrationFunction_h
20 
22 
23 namespace itk
24 {
40 template <typename TFixedImage, typename TMovingImage, typename TDisplacementField>
42 {
43 public:
44  ITK_DISALLOW_COPY_AND_MOVE(GPUPDEDeformableRegistrationFunction);
45 
51 
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  }
73 
75  const MovingImageType *
77  {
78  return m_MovingImage;
79  }
80 
82  void
84  {
85  m_FixedImage = ptr;
86  }
87 
89  const FixedImageType *
90  GetFixedImage() const
91  {
92  return m_FixedImage;
93  }
94 
96  void
98  {
99  m_DisplacementField = ptr;
100  }
101 
106  {
107  return m_DisplacementField;
108  }
109 
110  void
111  SetEnergy(double e)
112  {
113  m_Energy = e;
114  }
115 
116  double
117  GetEnergy() const
118  {
119  return m_Energy;
120  }
121 
122  void
124  {
125  m_GradientStep = e;
126  }
127 
128  double
130  {
131  return m_GradientStep;
132  }
133 
134  void
136  {
138  }
139 
140  bool
142  {
143  return m_NormalizeGradient;
144  }
145 
146 protected:
148  {
149  m_MovingImage = nullptr;
150  m_FixedImage = nullptr;
151  m_DisplacementField = nullptr;
152  m_Energy = 0.0;
153  m_NormalizeGradient = true;
154  m_GradientStep = 1.0;
155  }
156 
157  ~GPUPDEDeformableRegistrationFunction() override = default;
158 
159  void
160  PrintSelf(std::ostream & os, Indent indent) const override
161  {
162  Superclass::PrintSelf(os, indent);
163  os << indent << "MovingImage: ";
164  os << m_MovingImage.GetPointer() << std::endl;
165  os << indent << "FixedImage: ";
166  os << m_FixedImage.GetPointer() << std::endl;
167  }
168 
171 
174 
177 
178  mutable double m_Energy;
179 
181 
182  mutable double m_GradientStep;
183 };
184 } // end namespace itk
185 
186 #endif
itk::GPUPDEDeformableRegistrationFunction::m_MovingImage
MovingImagePointer m_MovingImage
Definition: itkGPUPDEDeformableRegistrationFunction.h:170
itk::GPUPDEDeformableRegistrationFunction::m_Energy
double m_Energy
Definition: itkGPUPDEDeformableRegistrationFunction.h:178
itk::GPUPDEDeformableRegistrationFunction::SetFixedImage
void SetFixedImage(const FixedImageType *ptr)
Definition: itkGPUPDEDeformableRegistrationFunction.h:83
itkGPUFiniteDifferenceFunction.h
itk::GPUPDEDeformableRegistrationFunction::DisplacementFieldTypePointer
typename DisplacementFieldType::Pointer DisplacementFieldTypePointer
Definition: itkGPUPDEDeformableRegistrationFunction.h:65
itk::GPUPDEDeformableRegistrationFunction::GetEnergy
double GetEnergy() const
Definition: itkGPUPDEDeformableRegistrationFunction.h:117
itk::GPUPDEDeformableRegistrationFunction::PrintSelf
void PrintSelf(std::ostream &os, Indent indent) const override
Definition: itkGPUPDEDeformableRegistrationFunction.h:160
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::GPUPDEDeformableRegistrationFunction::DisplacementFieldType
TDisplacementField DisplacementFieldType
Definition: itkGPUPDEDeformableRegistrationFunction.h:64
itk::GPUPDEDeformableRegistrationFunction::SetGradientStep
void SetGradientStep(double e)
Definition: itkGPUPDEDeformableRegistrationFunction.h:123
itk::GPUPDEDeformableRegistrationFunction::MovingImageType
TMovingImage MovingImageType
Definition: itkGPUPDEDeformableRegistrationFunction.h:56
itk::GPUPDEDeformableRegistrationFunction::GetNormalizeGradient
bool GetNormalizeGradient() const
Definition: itkGPUPDEDeformableRegistrationFunction.h:141
itk::GPUPDEDeformableRegistrationFunction::GetGradientStep
double GetGradientStep() const
Definition: itkGPUPDEDeformableRegistrationFunction.h:129
itk::GPUPDEDeformableRegistrationFunction::GPUPDEDeformableRegistrationFunction
GPUPDEDeformableRegistrationFunction()
Definition: itkGPUPDEDeformableRegistrationFunction.h:147
itk::GPUPDEDeformableRegistrationFunction::GetMovingImage
const MovingImageType * GetMovingImage() const
Definition: itkGPUPDEDeformableRegistrationFunction.h:76
itk::GPUPDEDeformableRegistrationFunction::~GPUPDEDeformableRegistrationFunction
~GPUPDEDeformableRegistrationFunction() override=default
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::GPUPDEDeformableRegistrationFunction::m_DisplacementField
DisplacementFieldTypePointer m_DisplacementField
Definition: itkGPUPDEDeformableRegistrationFunction.h:176
itk::GPUPDEDeformableRegistrationFunction::m_NormalizeGradient
bool m_NormalizeGradient
Definition: itkGPUPDEDeformableRegistrationFunction.h:180
itk::GPUFiniteDifferenceFunction
Definition: itkGPUFiniteDifferenceFunction.h:47
itk::GPUPDEDeformableRegistrationFunction::SetEnergy
void SetEnergy(double e)
Definition: itkGPUPDEDeformableRegistrationFunction.h:111
itk::GPUPDEDeformableRegistrationFunction::FixedImagePointer
typename FixedImageType::ConstPointer FixedImagePointer
Definition: itkGPUPDEDeformableRegistrationFunction.h:61
itk::GPUPDEDeformableRegistrationFunction::MovingImagePointer
typename MovingImageType::ConstPointer MovingImagePointer
Definition: itkGPUPDEDeformableRegistrationFunction.h:57
itk::GPUPDEDeformableRegistrationFunction::SetNormalizeGradient
void SetNormalizeGradient(bool e)
Definition: itkGPUPDEDeformableRegistrationFunction.h:135
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::GPUPDEDeformableRegistrationFunction::m_FixedImage
FixedImagePointer m_FixedImage
Definition: itkGPUPDEDeformableRegistrationFunction.h:173
itk::GPUPDEDeformableRegistrationFunction::GetDisplacementField
DisplacementFieldType * GetDisplacementField()
Definition: itkGPUPDEDeformableRegistrationFunction.h:105
itk::Math::e
static constexpr double e
Definition: itkMath.h:54
itk::GPUPDEDeformableRegistrationFunction::m_GradientStep
double m_GradientStep
Definition: itkGPUPDEDeformableRegistrationFunction.h:182
itk::GPUPDEDeformableRegistrationFunction::SetMovingImage
void SetMovingImage(const MovingImageType *ptr)
Definition: itkGPUPDEDeformableRegistrationFunction.h:69
itk::GPUPDEDeformableRegistrationFunction
Definition: itkGPUPDEDeformableRegistrationFunction.h:41
itk::GPUPDEDeformableRegistrationFunction::FixedImageType
TFixedImage FixedImageType
Definition: itkGPUPDEDeformableRegistrationFunction.h:60
itk::FiniteDifferenceFunction< TDisplacementField >::PrintSelf
void PrintSelf(std::ostream &os, Indent indent) const override
itk::GPUPDEDeformableRegistrationFunction::SetDisplacementField
void SetDisplacementField(DisplacementFieldTypePointer ptr)
Definition: itkGPUPDEDeformableRegistrationFunction.h:97
itk::GPUPDEDeformableRegistrationFunction::GetFixedImage
const FixedImageType * GetFixedImage() const
Definition: itkGPUPDEDeformableRegistrationFunction.h:90