ITK  4.8.0
Insight Segmentation and Registration Toolkit
itkCorrelationImageToImageMetricv4.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 itkCorrelationImageToImageMetricv4_h
19 #define itkCorrelationImageToImageMetricv4_h
20 
22 
25 
26 namespace itk
27 {
28 
72 template <typename TFixedImage, typename TMovingImage, typename TVirtualImage = TFixedImage,
73  typename TInternalComputationValueType = double,
74  typename TMetricTraits = DefaultImageToImageMetricTraitsv4<TFixedImage,TMovingImage,TVirtualImage,TInternalComputationValueType>
75  >
77  public ImageToImageMetricv4<TFixedImage, TMovingImage, TVirtualImage, TInternalComputationValueType, TMetricTraits>
78 {
79 public:
82  typedef ImageToImageMetricv4<TFixedImage, TMovingImage, TVirtualImage,
83  TInternalComputationValueType,TMetricTraits> Superclass;
86 
88  itkNewMacro(Self);
89 
92 
94  typedef typename Superclass::MeasureType MeasureType;
96 
100 
104 
111 
112  /* Image dimension accessors */
113  itkStaticConstMacro(VirtualImageDimension, ImageDimensionType,
114  TVirtualImage::ImageDimension);
115  itkStaticConstMacro(FixedImageDimension, ImageDimensionType,
116  TFixedImage::ImageDimension);
117  itkStaticConstMacro(MovingImageDimension, ImageDimensionType,
118  TMovingImage::ImageDimension);
119 
120 protected:
123 
128  virtual void InitializeForIteration() const ITK_OVERRIDE;
129 
133  friend class ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, Self >;
134 
136  friend class CorrelationImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, Superclass, Self >;
137  typedef CorrelationImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< Superclass::VirtualImageDimension >, Superclass, Self >
139  typedef CorrelationImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, Superclass, Self >
141 
142  friend class CorrelationImageToImageMetricv4HelperThreader< ThreadedImageRegionPartitioner< Superclass::VirtualImageDimension >, Superclass, Self >;
143  friend class CorrelationImageToImageMetricv4HelperThreader< ThreadedIndexedContainerPartitioner, Superclass, Self >;
144 
145  typedef CorrelationImageToImageMetricv4HelperThreader< ThreadedImageRegionPartitioner< Superclass::VirtualImageDimension >, Superclass, Self >
147  typedef CorrelationImageToImageMetricv4HelperThreader< ThreadedIndexedContainerPartitioner, Superclass, Self >
149 
152 
153  /* These values are computed during InitializeForIteration(),
154  * using the helper class
155  * */
158 
159  void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE;
160 
161 private:
162  CorrelationImageToImageMetricv4(const Self &); //purposely not implemented
163  void operator = (const Self &); //purposely not implemented
164 };
165 
166 } // end namespace itk
167 
168 #ifndef ITK_MANUAL_INSTANTIATION
169 #include "itkCorrelationImageToImageMetricv4.hxx"
170 #endif
171 
172 #endif
Superclass::VirtualPointSetType VirtualPointSetType
Light weight base class for most itk classes.
virtual void InitializeForIteration() const override
Superclass::JacobianType JacobianType
Superclass::MeasureType MeasureType
Superclass::VirtualIndexType VirtualIndexType
Provides threading for ImageToImageMetricv4::GetValueAndDerivative.
Superclass::MovingTransformType MovingTransformType
Class for partitioning of an ImageRegion.
typedef(itk::Concept::IsFloatingPoint< FixedImagePixelValueType >) OnlyDefinedForFloatingPointTypes0
Superclass::DimensionType ImageDimensionType
Superclass::FixedImageGradientType FixedImageGradientType
MetricTraits::FixedImageGradientType FixedImageGradientType
void PrintSelf(std::ostream &os, Indent indent) const override
FixedImageType::PixelType FixedImagePixelType
Superclass::VirtualPointType VirtualPointType
Superclass::DerivativeType DerivativeType
ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TInternalComputationValueType, TMetricTraits > Superclass
Class implementing normalized cross correlation image metric.
MovingImageType::PixelType MovingImagePixelType
MovingImageType::PointType MovingImagePointType
CorrelationHelperDenseThreaderType::Pointer m_HelperDenseThreader
Provides threading for ImageToImageMetricv4::GetValueAndDerivative.
Superclass::MovingImageGradientType MovingImageGradientType
MetricTraits::MovingImageGradientType MovingImageGradientType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
CorrelationHelperSparseThreaderType::Pointer m_HelperSparseThreader
FixedImageType::PointType FixedImagePointType
Superclass::VirtualImageType VirtualImageType