ITK  5.0.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< typename TFixedImage, typename TMovingImage, typename TDisplacementField >
65  public VariationalRegistrationFunction< TFixedImage, TMovingImage, TDisplacementField >
66 {
67 public:
68  ITK_DISALLOW_COPY_AND_ASSIGN(VariationalRegistrationNCCFunction);
69 
75 
77  itkNewMacro(Self);
78 
81 
83  static constexpr unsigned int ImageDimension = Superclass::ImageDimension;
84 
88 
92 
96 
99  using SpacingType = typename FixedImageType::SpacingType;
100 
104 
110 
114 
116  void InitializeIteration() override;
117 
120  PixelType ComputeUpdate( const NeighborhoodType &neighborhood,
121  void *globalData,
122  const FloatOffsetType &offset = FloatOffsetType(0.0) ) override;
123 
127 
131 
136 
140  typename Superclass::TimeStepType ComputeGlobalTimeStep(void * itkNotUsed(GlobalData)) const override
141  { return this->GetTimeStep() * m_Normalizer; }
142 
143 protected:
146 
148  void PrintSelf(std::ostream& os, Indent indent) const override;
149 
152 
153  using GlobalDataStruct = typename Superclass::GlobalDataStruct;
154 
160  };
161 
164 
167 
170 
172  double m_Normalizer;
173 };
174 
175 
176 } // end namespace itk
177 
178 #ifndef ITK_MANUAL_INSTANTIATION
179 #include "itkVariationalRegistrationNCCFunction.hxx"
180 #endif
181 
182 #endif
Base class for force calculation in the variational registration framework.
Light weight base class for most itk classes.
This class computes NCC forces in the variational registration framework.
typename MaskImageType::ConstPointer MaskImagePointer
typename DisplacementFieldType::ConstPointer DisplacementFieldTypePointer
Superclass::TimeStepType ComputeGlobalTimeStep(void *) const override
Calculate the derivative by central differencing.
Image< MaskImagePixelType, ImageDimension > MaskImageType
typename ConstNeighborhoodIterator< TDisplacementField >::RadiusType RadiusType
virtual const TimeStepType GetTimeStep(void) const
typename GradientCalculatorType::Pointer GradientCalculatorPointer
PixelType ComputeUpdate(const NeighborhoodType &neighborhood, void *globalData, const FloatOffsetType &offset=FloatOffsetType(0.0)) override
typename FixedImageType::ConstPointer FixedImagePointer
void PrintSelf(std::ostream &os, Indent indent) const override
Control indentation during Print() invocation.
Definition: itkIndent.h:49
typename MovingImageType::ConstPointer MovingImagePointer
ConstNeighborhoodIterator< TDisplacementField, DefaultBoundaryConditionType > NeighborhoodType
Templated n-dimensional image class.
Definition: itkImage.h:75