ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkNCCRegistrationFunction.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 itkNCCRegistrationFunction_h
19 #define itkNCCRegistrationFunction_h
20 
22 #include "itkPoint.h"
25 
26 namespace itk
27 {
52 template< typename TFixedImage, typename TMovingImage, typename TDisplacementField >
53 class ITK_TEMPLATE_EXPORT NCCRegistrationFunction:
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(NCCRegistrationFunction,
72 
74  typedef typename Superclass::MovingImageType MovingImageType;
75  typedef typename Superclass::MovingImagePointer MovingImagePointer;
76 
79  typedef typename Superclass::FixedImagePointer FixedImagePointer;
82  typedef typename FixedImageType::SpacingType SpacingType;
83 
85  typedef typename Superclass::DisplacementFieldType DisplacementFieldType;
86  typedef typename Superclass::DisplacementFieldTypePointer
88 
90  itkStaticConstMacro(ImageDimension, unsigned int, Superclass::ImageDimension);
91 
93  typedef typename Superclass::PixelType PixelType;
96 // typedef typename Superclass::NeighborhoodType BoundaryNeighborhoodType;
99 
101  typedef double CoordRepType;
103 
108 
111 
115 
118  { m_MovingImageInterpolator = ptr; }
119 
122  { return m_MovingImageInterpolator; }
123 
125  virtual TimeStepType ComputeGlobalTimeStep( void *itkNotUsed(GlobalData) ) const ITK_OVERRIDE
126  { return m_TimeStep; }
127 
130  virtual void * GetGlobalDataPointer() const ITK_OVERRIDE
131  {
132  GlobalDataStruct *global = new GlobalDataStruct();
133 
134  return global;
135  }
136 
138  virtual void ReleaseGlobalDataPointer(void *GlobalData) const ITK_OVERRIDE
139  { delete (GlobalDataStruct *)GlobalData; }
140 
142  virtual void InitializeIteration() ITK_OVERRIDE;
143 
147  virtual PixelType ComputeUpdate( const NeighborhoodType & neighborhood,
148  void *globalData,
149  const FloatOffsetType & offset = FloatOffsetType(0.0) ) ITK_OVERRIDE;
150 
151 protected:
153  ~NCCRegistrationFunction() ITK_OVERRIDE {}
154  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
155 
158 
163  };
164 
165 private:
166  ITK_DISALLOW_COPY_AND_ASSIGN(NCCRegistrationFunction);
167 
170 
172 
174 
176 
179 
182 
183  mutable double m_MetricTotal;
184 };
185 } // end namespace itk
186 
187 #ifndef ITK_MANUAL_INSTANTIATION
188 #include "itkNCCRegistrationFunction.hxx"
189 #endif
190 
191 #endif
Light weight base class for most itk classes.
CovariantVector< double, itkGetStaticConstMacro(ImageDimension) > CovariantVectorType
InterpolatorType::PointType PointType
virtual void * GetGlobalDataPointer() const override
SmartPointer< const Self > ConstPointer
PDEDeformableRegistrationFunction< TFixedImage, TMovingImage, TDisplacementField > Superclass
GradientCalculatorType::Pointer GradientCalculatorPointer
Superclass::DisplacementFieldTypePointer DisplacementFieldTypePointer
FixedImageType::IndexType IndexType
ConstNeighborhoodIterator< TDisplacementField >::RadiusType RadiusType
Calculate the derivative by central differencing.
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
ConstNeighborhoodIterator< FixedImageType > FixedImageNeighborhoodIteratorType
Superclass::TimeStepType TimeStepType
Superclass::DisplacementFieldType DisplacementFieldType
Superclass::MovingImagePointer MovingImagePointer
Superclass::NeighborhoodType NeighborhoodType
Superclass::FloatOffsetType FloatOffsetType
Superclass::MovingImageType MovingImageType
A templated class holding a n-Dimensional vector.
Definition: itkVector.h:62
void SetMovingImageInterpolator(InterpolatorType *ptr)
LinearInterpolateImageFunction< MovingImageType, CoordRepType > DefaultInterpolatorType
InterpolateImageFunction< MovingImageType, CoordRepType > InterpolatorType
Superclass::FixedImageType FixedImageType
Linearly interpolate an image at specified positions.
Base class for all image interpolaters.
CentralDifferenceImageFunction< FixedImageType > GradientCalculatorType
FixedImageType::SpacingType SpacingType
FixedImageNeighborhoodIteratorType m_FixedImageIterator
InterpolatorType * GetMovingImageInterpolator(void)
GradientCalculatorPointer m_FixedImageGradientCalculator
Superclass::FixedImagePointer FixedImagePointer
Control indentation during Print() invocation.
Definition: itkIndent.h:49
InterpolatorType::Pointer InterpolatorPointer
virtual TimeStepType ComputeGlobalTimeStep(void *) const override
A templated class holding a geometric point in n-Dimensional space.
Definition: itkPoint.h:52
A templated class holding a n-Dimensional covariant vector.
virtual void ReleaseGlobalDataPointer(void *GlobalData) const override