ITK  4.8.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 >
54  public PDEDeformableRegistrationFunction< TFixedImage,
55  TMovingImage, TDisplacementField >
56 {
57 public:
58 
61  typedef PDEDeformableRegistrationFunction< TFixedImage,
62  TMovingImage, TDisplacementField > Superclass;
65 
67  itkNewMacro(Self);
68 
70  itkTypeMacro(MeanSquareRegistrationFunction,
72 
76 
80  typedef typename FixedImageType::IndexType IndexType;
81  typedef typename FixedImageType::SizeType SizeType;
82  typedef typename FixedImageType::SpacingType SpacingType;
83 
86  typedef typename DisplacementFieldType::PixelType DisplacementFieldPixelType;
89 
91  itkStaticConstMacro(ImageDimension, unsigned int, Superclass::ImageDimension);
92 
94  typedef typename Superclass::PixelType PixelType;
99 
101  typedef double CoordRepType;
106 
109 
113 
116  { m_MovingImageInterpolator = ptr; }
117 
120  { return m_MovingImageInterpolator; }
121 
123  virtual TimeStepType ComputeGlobalTimeStep( void *itkNotUsed(GlobalData) ) const ITK_OVERRIDE
124  { return m_TimeStep; }
125 
128  virtual void * GetGlobalDataPointer() const ITK_OVERRIDE
129  {
130  GlobalDataStruct *global = new GlobalDataStruct();
131 
132  return global;
133  }
134 
136  virtual void ReleaseGlobalDataPointer(void *GlobalData) const ITK_OVERRIDE
137  { delete (GlobalDataStruct *)GlobalData; }
138 
140  virtual void InitializeIteration() ITK_OVERRIDE;
141 
144  virtual PixelType ComputeUpdate( const NeighborhoodType & neighborhood,
145  void *globalData,
146  const FloatOffsetType & offset = FloatOffsetType(0.0) ) ITK_OVERRIDE;
147 
148 protected:
150  ~MeanSquareRegistrationFunction() {}
151  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
152 
155 
160  };
161 
162 private:
163  MeanSquareRegistrationFunction(const Self &); //purposely not implemented
164  void operator=(const Self &); //purposely not implemented
165 
168 
171 
174 
177 
180 
183 };
184 } // end namespace itk
185 
186 #ifndef ITK_MANUAL_INSTANTIATION
187 #include "itkMeanSquareRegistrationFunction.hxx"
188 #endif
189 
190 #endif
InterpolateImageFunction< MovingImageType, CoordRepType > InterpolatorType
Light weight base class for most itk classes.
LinearInterpolateImageFunction< MovingImageType, CoordRepType > DefaultInterpolatorType
virtual void ReleaseGlobalDataPointer(void *GlobalData) const override
ConstNeighborhoodIterator< TDisplacementField >::RadiusType RadiusType
Calculate the derivative by central differencing.
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
CentralDifferenceImageFunction< FixedImageType > GradientCalculatorType
GradientCalculatorType::Pointer GradientCalculatorPointer
CovariantVector< double, itkGetStaticConstMacro(ImageDimension) > CovariantVectorType
virtual void * GetGlobalDataPointer() const override
A templated class holding a n-Dimensional vector.
Definition: itkVector.h:62
virtual TimeStepType ComputeGlobalTimeStep(void *) const override
void PrintSelf(std::ostream &os, Indent indent) const override
DisplacementFieldType::PixelType DisplacementFieldPixelType
Linearly interpolate an image at specified positions.
Superclass::DisplacementFieldTypePointer DisplacementFieldTypePointer
Base class for all image interpolaters.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
PDEDeformableRegistrationFunction< TFixedImage, TMovingImage, TDisplacementField > Superclass
ConstNeighborhoodIterator< FixedImageType > FixedImageNeighborhoodIteratorType
A templated class holding a geometric point in n-Dimensional space.
Definition: itkPoint.h:51
A templated class holding a n-Dimensional covariant vector.
Superclass::DisplacementFieldType DisplacementFieldType
virtual PixelType ComputeUpdate(const NeighborhoodType &neighborhood, void *globalData, const FloatOffsetType &offset=FloatOffsetType(0.0)) override
virtual void InitializeIteration() override