ITK  4.13.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  >
58 class ITK_TEMPLATE_EXPORT DemonsImageToImageMetricv4 :
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;
77  typedef typename Superclass::DerivativeType DerivativeType;
78 
79  typedef typename Superclass::FixedImagePointType FixedImagePointType;
80  typedef typename Superclass::FixedImagePixelType FixedImagePixelType;
81  typedef typename Superclass::FixedImageGradientType FixedImageGradientType;
82 
83  typedef typename Superclass::MovingImagePointType MovingImagePointType;
84  typedef typename Superclass::MovingImagePixelType MovingImagePixelType;
85  typedef typename Superclass::MovingImageGradientType MovingImageGradientType;
86 
87  typedef typename Superclass::MovingTransformType MovingTransformType;
88  typedef typename Superclass::JacobianType JacobianType;
89  typedef typename Superclass::VirtualImageType VirtualImageType;
90  typedef typename Superclass::VirtualIndexType VirtualIndexType;
91  typedef typename Superclass::VirtualPointType VirtualPointType;
92  typedef typename Superclass::VirtualPointSetType VirtualSPointSetType;
93  typedef typename Superclass::NumberOfParametersType NumberOfParametersType;
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) ITK_OVERRIDE;
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() ITK_OVERRIDE;
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 ITK_OVERRIDE;
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  ITK_DISALLOW_COPY_AND_ASSIGN(DemonsImageToImageMetricv4);
147 };
148 
149 } // end namespace itk
150 
151 #ifndef ITK_MANUAL_INSTANTIATION
152 #include "itkDemonsImageToImageMetricv4.hxx"
153 #endif
154 
155 #endif
Light weight base class for most itk classes.
Processes points for DemonsImageToImageMetricv4 GetValueAndDerivative.
Superclass::FixedImagePixelType FixedImagePixelType
Superclass::ImageDimensionType ImageDimensionType
Superclass::VirtualPointType VirtualPointType
TInternalComputationValueType InternalComputationValueType
Class for partitioning of an ImageRegion.
Superclass::DimensionType ImageDimensionType
Superclass::MovingImagePixelType MovingImagePixelType
Superclass::VirtualImageType VirtualImageType
Superclass::MovingImageGradientType MovingImageGradientType
Superclass::VirtualIndexType VirtualIndexType
Superclass::FixedImageGradientType FixedImageGradientType
Class implementing demons metric.
Superclass::NumberOfParametersType NumberOfParametersType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Superclass::MovingTransformType MovingTransformType
ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TInternalComputationValueType, TMetricTraits > Superclass
Superclass::MovingImagePointType MovingImagePointType
Superclass::VirtualPointSetType VirtualSPointSetType
Superclass::FixedImagePointType FixedImagePointType