ITK  4.6.0
Insight Segmentation and Registration Toolkit
itkDemonsImageToImageMetricv4.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 __itkDemonsImageToImageMetricv4_h
19 #define __itkDemonsImageToImageMetricv4_h
20 
22 
24 
25 namespace itk
26 {
27 
54 template <typename TFixedImage, typename TMovingImage, typename TVirtualImage = TFixedImage,
55  typename TInternalComputationValueType = double,
56  typename TMetricTraits = DefaultImageToImageMetricTraitsv4<TFixedImage,TMovingImage,TVirtualImage,TInternalComputationValueType>
57  >
59  public ImageToImageMetricv4<TFixedImage, TMovingImage, TVirtualImage, TInternalComputationValueType, TMetricTraits>
60 {
61 public:
64  typedef ImageToImageMetricv4<TFixedImage, TMovingImage, TVirtualImage,
65  TInternalComputationValueType,TMetricTraits> Superclass;
68 
70  itkNewMacro(Self);
71 
74 
76  typedef typename Superclass::MeasureType MeasureType;
78 
82 
86 
94 
96  typedef TInternalComputationValueType InternalComputationValueType;
97 
99 
100  /* Image dimension accessors */
101  itkStaticConstMacro(VirtualImageDimension, ImageDimensionType,
102  TVirtualImage::ImageDimension);
103  itkStaticConstMacro(FixedImageDimension, ImageDimensionType,
104  TFixedImage::ImageDimension);
105  itkStaticConstMacro(MovingImageDimension, ImageDimensionType,
106  TMovingImage::ImageDimension);
107 
108  virtual void Initialize(void) throw ( itk::ExceptionObject );
109 
112  itkGetConstMacro(IntensityDifferenceThreshold, TInternalComputationValueType);
113  itkSetMacro(IntensityDifferenceThreshold, TInternalComputationValueType);
115 
117  itkGetConstMacro(DenominatorThreshold, TInternalComputationValueType);
118 
119 protected:
120  itkGetConstMacro(Normalizer, TInternalComputationValueType);
121 
123  virtual ~DemonsImageToImageMetricv4();
124 
127  typedef DemonsImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< Superclass::VirtualImageDimension >, Superclass, Self >
129  typedef DemonsImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, Superclass, Self >
131 
132  void PrintSelf(std::ostream& os, Indent indent) const;
133 
134 private:
135 
138  TInternalComputationValueType m_DenominatorThreshold;
139 
141  TInternalComputationValueType m_IntensityDifferenceThreshold;
142 
143  /* Used to normalize derivative calculation. Automatically calculated */
144  TInternalComputationValueType m_Normalizer;
145 
146  DemonsImageToImageMetricv4(const Self &); //purposely not implemented
147  void operator = (const Self &); //purposely not implemented
148 };
149 
150 } // end namespace itk
151 
152 #ifndef ITK_MANUAL_INSTANTIATION
153 #include "itkDemonsImageToImageMetricv4.hxx"
154 #endif
155 
156 #endif
Superclass::VirtualPointSetType VirtualPointSetType
Light weight base class for most itk classes.
Processes points for DemonsImageToImageMetricv4 GetValueAndDerivative.
Superclass::FixedImagePixelType FixedImagePixelType
Superclass::JacobianType JacobianType
Superclass::MeasureType MeasureType
static const ImageDimensionType FixedImageDimension
Superclass::VirtualIndexType VirtualIndexType
Superclass::ImageDimensionType ImageDimensionType
Superclass::VirtualPointType VirtualPointType
TInternalComputationValueType InternalComputationValueType
Superclass::MovingTransformType MovingTransformType
Class for partitioning of an ImageRegion.
typedef(itk::Concept::IsFloatingPoint< FixedImagePixelValueType >) OnlyDefinedForFloatingPointTypes0
Superclass::DimensionType ImageDimensionType
Superclass::NumberOfParametersType NumberOfParametersType
MetricTraits::FixedImageGradientType FixedImageGradientType
Superclass::MovingImagePixelType MovingImagePixelType
static const ImageDimensionType VirtualImageDimension
static const ImageDimensionType MovingImageDimension
virtual void Initialize(void)
Superclass::VirtualImageType VirtualImageType
FixedImageType::PixelType FixedImagePixelType
Superclass::VirtualPointType VirtualPointType
Superclass::DerivativeType DerivativeType
Standard exception handling object.
Superclass::MovingImageGradientType MovingImageGradientType
Superclass::VirtualIndexType VirtualIndexType
void PrintSelf(std::ostream &os, Indent indent) const
MovingImageType::PixelType MovingImagePixelType
TInternalComputationValueType m_IntensityDifferenceThreshold
Superclass::FixedImageGradientType FixedImageGradientType
MovingImageType::PointType MovingImagePointType
TInternalComputationValueType m_DenominatorThreshold
Class implementing demons metric.
MetricTraits::MovingImageGradientType MovingImageGradientType
Superclass::NumberOfParametersType NumberOfParametersType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Superclass::MovingTransformType MovingTransformType
FixedImageType::PointType FixedImagePointType
ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TInternalComputationValueType, TMetricTraits > Superclass
Superclass::MovingImagePointType MovingImagePointType
Superclass::VirtualPointSetType VirtualSPointSetType
Superclass::FixedImagePointType FixedImagePointType
TInternalComputationValueType m_Normalizer
Superclass::VirtualImageType VirtualImageType