ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkVariationalRegistrationNCCFunction.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 itkVariationalRegistrationNCCFunction_h
19 #define itkVariationalRegistrationNCCFunction_h
20 
22 #include "itkCovariantVector.h"
26 
27 namespace itk {
28 
63 template< class TFixedImage, class TMovingImage, class TDisplacementField >
65  public VariationalRegistrationFunction< TFixedImage, TMovingImage, TDisplacementField >
66 {
67 public:
74 
76  itkNewMacro(Self);
77 
80 
82  itkStaticConstMacro(ImageDimension, unsigned int,Superclass::ImageDimension);
83 
87 
91 
95 
98  typedef typename FixedImageType::SpacingType SpacingType;
99 
104 
110 
115 
117  virtual void InitializeIteration() ITK_OVERRIDE;
118 
121  virtual PixelType ComputeUpdate( const NeighborhoodType &neighborhood,
122  void *globalData,
123  const FloatOffsetType &offset = FloatOffsetType(0.0) ) ITK_OVERRIDE;
124 
128 
132 
137 
141  virtual typename Superclass::TimeStepType ComputeGlobalTimeStep(void * itkNotUsed(GlobalData)) const ITK_OVERRIDE
142  { return this->GetTimeStep() * m_Normalizer; }
143 
144 protected:
147 
149  virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE;
150 
153 
154  typedef typename Superclass::GlobalDataStruct GlobalDataStruct;
155 
161  };
162 
165 
168 
171 
173  double m_Normalizer;
174 
175 private:
176  VariationalRegistrationNCCFunction(const Self&); //purposely not implemented
177  void operator=(const Self&); //purposely not implemented
178 };
179 
180 
181 } // end namespace itk
182 
183 #ifndef ITK_MANUAL_INSTANTIATION
184 #include "itkVariationalRegistrationNCCFunction.hxx"
185 #endif
186 
187 #endif
virtual PixelType ComputeUpdate(const NeighborhoodType &neighborhood, void *globalData, const FloatOffsetType &offset=FloatOffsetType(0.0)) override
DisplacementFieldType::ConstPointer DisplacementFieldTypePointer
Base class for force calculation in the variational registration framework.
Light weight base class for most itk classes.
virtual void InitializeIteration() override
This class computes NCC forces in the variational registration framework.
Superclass::DisplacementFieldTypePointer DisplacementFieldTypePointer
VariationalRegistrationFunction< TFixedImage, TMovingImage, TDisplacementField > Superclass
virtual Superclass::TimeStepType ComputeGlobalTimeStep(void *) 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...
A templated class holding a n-Dimensional vector.
Definition: itkVector.h:62
virtual const TimeStepType GetTimeStep(void) const
Image< MaskImagePixelType, ImageDimension > MaskImageType
virtual void PrintSelf(std::ostream &os, Indent indent) const override
ConstNeighborhoodIterator< FixedImageType > FixedImageNeighborhoodIteratorType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
CentralDifferenceImageFunction< FixedImageType > GradientCalculatorType