ITK  4.8.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 
85  typedef typename Superclass::MovingImageType MovingImageType;
86  typedef typename Superclass::MovingImagePointer MovingImagePointer;
87 
89  typedef typename Superclass::FixedImageType FixedImageType;
90  typedef typename Superclass::FixedImagePointer FixedImagePointer;
91 
93  typedef typename Superclass::MaskImageType MaskImageType;
94  typedef typename Superclass::MaskImagePointer MaskImagePointer;
95 
96  typedef typename FixedImageType::IndexType IndexType;
97  typedef typename FixedImageType::SizeType SizeType;
98  typedef typename FixedImageType::SpacingType SpacingType;
99 
101  typedef typename Superclass::DisplacementFieldType DisplacementFieldType;
102  typedef typename Superclass::DisplacementFieldTypePointer
104 
110 
115 
117  virtual void InitializeIteration();
118 
121  virtual PixelType ComputeUpdate( const NeighborhoodType &neighborhood,
122  void *globalData,
123  const FloatOffsetType &offset = FloatOffsetType(0.0) );
124 
127  { m_GradientType = GRADIENT_TYPE_FIXED; }
128 
131  { m_GradientType = GRADIENT_TYPE_WARPED; }
132 
136  { m_GradientType = GRADIENT_TYPE_SYMMETRIC; }
137 
141  virtual typename Superclass::TimeStepType ComputeGlobalTimeStep(void * gd ) const;
142 
143 protected:
146 
148  virtual void PrintSelf(std::ostream& os, Indent indent) const;
149 
152 
153  typedef typename Superclass::GlobalDataStruct GlobalDataStruct;
154 
157  GRADIENT_TYPE_WARPED = 0,
158  GRADIENT_TYPE_FIXED = 1,
159  GRADIENT_TYPE_SYMMETRIC = 2
160  };
161 
162 private:
163  VariationalRegistrationNCCFunction(const Self&); //purposely not implemented
164  void operator=(const Self&); //purposely not implemented
165 
168 
171 
174 
176  double m_Normalizer;
177 
178 };
179 
180 
181 } // end namespace itk
182 
183 #ifndef ITK_MANUAL_INSTANTIATION
184 #include "itkVariationalRegistrationNCCFunction.hxx"
185 #endif
186 
187 #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.
Superclass::DisplacementFieldTypePointer DisplacementFieldTypePointer
VariationalRegistrationFunction< TFixedImage, TMovingImage, TDisplacementField > Superclass
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
ConstNeighborhoodIterator< FixedImageType > FixedImageNeighborhoodIteratorType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
CentralDifferenceImageFunction< FixedImageType > GradientCalculatorType