ITK  4.4.0
Insight Segmentation and Registration Toolkit
itkANTSNeighborhoodCorrelationImageToImageMetricv4.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 __itkANTSNeighborhoodCorrelationImageToImageMetricv4_h
19 #define __itkANTSNeighborhoodCorrelationImageToImageMetricv4_h
20 
23 
24 namespace itk {
25 
93 template<class TFixedImage, class TMovingImage, class TVirtualImage = TFixedImage>
95  public ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage>
96 {
97 public:
98 
104 
106  itkNewMacro(Self);
107 
109  itkTypeMacro(Self, Superclass);
110 
112  typedef typename Superclass::MeasureType MeasureType;
113  typedef typename Superclass::DerivativeType DerivativeType;
114  typedef typename Superclass::DerivativeValueType DerivativeValueType;
115  typedef typename Superclass::VirtualPointType VirtualPointType;
116  typedef typename Superclass::FixedImagePointType FixedImagePointType;
117  typedef typename Superclass::FixedImagePixelType FixedImagePixelType;
118  typedef typename Superclass::FixedTransformType FixedTransformType;
119  typedef typename Superclass::FixedImageGradientType FixedImageGradientType;
120  typedef typename FixedTransformType::JacobianType FixedImageJacobianType;
121 
122  typedef typename Superclass::MovingImagePointType MovingImagePointType;
123  typedef typename Superclass::MovingImagePixelType MovingImagePixelType;
124  typedef typename Superclass::MovingImageGradientType MovingImageGradientType;
125  typedef typename Superclass::MovingTransformType MovingTransformType;
126  typedef typename MovingTransformType::JacobianType MovingImageJacobianType;
127  typedef typename Superclass::JacobianType JacobianType;
128 
129  typedef typename Superclass::VirtualImageGradientType VirtualImageGradientType;
130 
131  typedef typename Superclass::FixedImageType FixedImageType;
132  typedef typename Superclass::MovingImageType MovingImageType;
133  typedef typename Superclass::VirtualImageType VirtualImageType;
134  typedef typename Superclass::FixedOutputPointType FixedOutputPointType;
135  typedef typename Superclass::MovingOutputPointType MovingOutputPointType;
136 
137  typedef typename Superclass::InternalComputationValueType InternalComputationValueType;
138 
139  typedef typename Superclass::FixedTransformType::JacobianType
141  typedef typename Superclass::MovingTransformType::JacobianType
143 
144  typedef typename Superclass::NumberOfParametersType NumberOfParametersType;
145  typedef typename Superclass::ImageDimensionType ImageDimensionType;
146 
147  typedef typename VirtualImageType::RegionType ImageRegionType;
148  typedef typename VirtualImageType::SizeType RadiusType;
149  typedef typename VirtualImageType::IndexType IndexType;
150 
151  /* Image dimension accessors */
152  itkStaticConstMacro(FixedImageDimension, ImageDimensionType,
153  FixedImageType::ImageDimension);
154 
155  itkStaticConstMacro(MovingImageDimension, ImageDimensionType,
156  MovingImageType::ImageDimension);
157 
158  itkStaticConstMacro(VirtualImageDimension, ImageDimensionType,
159  VirtualImageType::ImageDimension);
160 
161  // Set the radius of the neighborhood window centered at each pixel.
162  // See the note above about using a radius less than 2.
163  itkSetMacro(Radius, RadiusType);
164 
165  // Get the Radius of the neighborhood window centered at each pixel
166  itkGetMacro(Radius, RadiusType);
167  itkGetConstMacro(Radius, RadiusType);
168 
169  void Initialize(void) throw ( itk::ExceptionObject );
170 
171 protected:
173  virtual ~ANTSNeighborhoodCorrelationImageToImageMetricv4();
174 
178 
180  typedef ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, Superclass, Self >
182 
183  virtual void PrintSelf(std::ostream & os, Indent indent) const;
184 
185 private:
186  ANTSNeighborhoodCorrelationImageToImageMetricv4( const Self & ); //purposely not implemented
187  void operator=(const Self &); //purposely not implemented
188 
189  // Radius of the neighborhood window centered at each pixel
190  RadiusType m_Radius;
191 };
192 
193 } // end namespace itk
194 
195 #ifndef ITK_MANUAL_INSTANTIATION
196 #include "itkANTSNeighborhoodCorrelationImageToImageMetricv4.hxx"
197 #endif
198 
199 #endif
200