ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkMeanSquareRegistrationFunction.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 itkMeanSquareRegistrationFunction_h
19 #define itkMeanSquareRegistrationFunction_h
20 
22 #include "itkPoint.h"
25 
26 namespace itk
27 {
52 template< typename TFixedImage, typename TMovingImage, typename TDisplacementField >
53 class ITK_TEMPLATE_EXPORT MeanSquareRegistrationFunction:
54  public PDEDeformableRegistrationFunction< TFixedImage,
55  TMovingImage, TDisplacementField >
56 {
57 public:
58  ITK_DISALLOW_COPY_AND_ASSIGN(MeanSquareRegistrationFunction);
59 
62  using Superclass = PDEDeformableRegistrationFunction< TFixedImage,
63  TMovingImage, TDisplacementField >;
66 
68  itkNewMacro(Self);
69 
71  itkTypeMacro(MeanSquareRegistrationFunction,
73 
77 
83  using SpacingType = typename FixedImageType::SpacingType;
84 
87  using DisplacementFieldPixelType = typename DisplacementFieldType::PixelType;
89 
91  static constexpr unsigned int ImageDimension = Superclass::ImageDimension;
92 
94  using PixelType = typename Superclass::PixelType;
98  using TimeStepType = typename Superclass::TimeStepType;
99 
101  using CoordRepType = double;
106 
109 
113 
116  { m_MovingImageInterpolator = ptr; }
117 
120  { return m_MovingImageInterpolator; }
121 
123  TimeStepType ComputeGlobalTimeStep( void *itkNotUsed(GlobalData) ) const override
124  { return m_TimeStep; }
125 
128  void * GetGlobalDataPointer() const override
129  {
130  auto * global = new GlobalDataStruct();
131 
132  return global;
133  }
134 
136  void ReleaseGlobalDataPointer(void *GlobalData) const override
137  { delete (GlobalDataStruct *)GlobalData; }
138 
140  void InitializeIteration() override;
141 
144  PixelType ComputeUpdate( const NeighborhoodType & neighborhood,
145  void *globalData,
146  const FloatOffsetType & offset = FloatOffsetType(0.0) ) override;
147 
148 protected:
150  ~MeanSquareRegistrationFunction() override = default;
151  void PrintSelf(std::ostream & os, Indent indent) const override;
152 
155 
160  };
161 
162 private:
165 
168 
171 
174 
177 
180 };
181 } // end namespace itk
182 
183 #ifndef ITK_MANUAL_INSTANTIATION
184 #include "itkMeanSquareRegistrationFunction.hxx"
185 #endif
186 
187 #endif
typename Superclass::NeighborhoodType NeighborhoodType
Light weight base class for most itk classes.
typename Superclass::FixedImagePointer FixedImagePointer
typename FixedImageType::SpacingType SpacingType
TimeStepType ComputeGlobalTimeStep(void *) const override
typename DisplacementFieldType::Pointer DisplacementFieldTypePointer
Calculate the derivative by central differencing.
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
typename GradientCalculatorType::Pointer GradientCalculatorPointer
typename Superclass::MovingImagePointer MovingImagePointer
typename Superclass::MovingImageType MovingImageType
typename Superclass::DisplacementFieldTypePointer DisplacementFieldTypePointer
typename Superclass::DisplacementFieldType DisplacementFieldType
typename FixedImageType::IndexType IndexType
typename InterpolatorType::Pointer InterpolatorPointer
typename ConstNeighborhoodIterator< TDisplacementField >::RadiusType RadiusType
A templated class holding a n-Dimensional vector.
Definition: itkVector.h:62
typename MovingImageType::ConstPointer MovingImagePointer
typename InterpolatorType::PointType PointType
Linearly interpolate an image at specified positions.
typename DisplacementFieldType::PixelType DisplacementFieldPixelType
Base class for all image interpolaters.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
typename Superclass::FixedImageType FixedImageType
typename Superclass::TimeStepType TimeStepType
typename FixedImageType::ConstPointer FixedImagePointer
A templated class holding a n-Dimensional covariant vector.
void ReleaseGlobalDataPointer(void *GlobalData) const override
typename Superclass::FloatOffsetType FloatOffsetType