ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkDemonsImageToImageMetricv4.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
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 * https://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
25namespace itk
26{
27
54template <typename TFixedImage,
55 typename TMovingImage,
56 typename TVirtualImage = TFixedImage,
57 typename TInternalComputationValueType = double,
58 typename TMetricTraits =
60class ITK_TEMPLATE_EXPORT DemonsImageToImageMetricv4
61 : public ImageToImageMetricv4<TFixedImage, TMovingImage, TVirtualImage, TInternalComputationValueType, TMetricTraits>
62{
63public:
64 ITK_DISALLOW_COPY_AND_MOVE(DemonsImageToImageMetricv4);
65
68 using Superclass =
72
74 itkNewMacro(Self);
75
77 itkOverrideGetNameOfClassMacro(DemonsImageToImageMetricv4);
78
80 using typename Superclass::MeasureType;
81 using typename Superclass::DerivativeType;
82
86
90
92 using typename Superclass::JacobianType;
94 using typename Superclass::VirtualIndexType;
95 using typename Superclass::VirtualPointType;
98
100 using InternalComputationValueType = TInternalComputationValueType;
101
102 using typename Superclass::ImageDimensionType;
103
104 /* Image dimension accessors */
105 static constexpr ImageDimensionType VirtualImageDimension = TVirtualImage::ImageDimension;
106 static constexpr ImageDimensionType FixedImageDimension = TFixedImage::ImageDimension;
107 static constexpr ImageDimensionType MovingImageDimension = TMovingImage::ImageDimension;
108
109 void
110 Initialize() override;
111
114 itkGetConstMacro(IntensityDifferenceThreshold, TInternalComputationValueType);
115 itkSetMacro(IntensityDifferenceThreshold, TInternalComputationValueType);
117
119 itkGetConstMacro(DenominatorThreshold, TInternalComputationValueType);
120
121protected:
122 itkGetConstMacro(Normalizer, TInternalComputationValueType);
123
125 ~DemonsImageToImageMetricv4() override = default;
126
130 Self>;
131 friend class DemonsImageToImageMetricv4GetValueAndDerivativeThreader<ThreadedIndexedContainerPartitioner,
132 Superclass,
133 Self>;
135 ThreadedImageRegionPartitioner<Superclass::VirtualImageDimension>,
136 Superclass,
137 Self>;
139 DemonsImageToImageMetricv4GetValueAndDerivativeThreader<ThreadedIndexedContainerPartitioner, Superclass, Self>;
140
141 void
142 PrintSelf(std::ostream & os, Indent indent) const override;
143
144private:
147 TInternalComputationValueType m_DenominatorThreshold{};
148
150 TInternalComputationValueType m_IntensityDifferenceThreshold{};
151
152 /* Used to normalize derivative calculation. Automatically calculated */
153 TInternalComputationValueType m_Normalizer{};
154};
155
156} // end namespace itk
157
158#ifndef ITK_MANUAL_INSTANTIATION
159# include "itkDemonsImageToImageMetricv4.hxx"
160#endif
161
162#endif
A simple structure holding type information for ImageToImageMetricv4 classes.
static constexpr ImageDimensionType MovingImageDimension
DemonsImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, Superclass, Self > DemonsSparseGetValueAndDerivativeThreaderType
TInternalComputationValueType InternalComputationValueType
ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TInternalComputationValueType, TMetricTraits > Superclass
TInternalComputationValueType m_IntensityDifferenceThreshold
typename Superclass::VirtualPointSetType VirtualSPointSetType
TInternalComputationValueType m_DenominatorThreshold
typename Superclass::VirtualImageType VirtualImageType
DemonsImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< Superclass::VirtualImageDimension >, Superclass, Self > DemonsDenseGetValueAndDerivativeThreaderType
void PrintSelf(std::ostream &os, Indent indent) const override
static constexpr ImageDimensionType VirtualImageDimension
typename Superclass::DimensionType ImageDimensionType
static constexpr ImageDimensionType FixedImageDimension
Transform< TInternalComputationValueType, TVirtualImage::ImageDimension, TMovingDimension > MovingTransformType
Array< TInternalComputationValueType > DerivativeType
Implements transparent reference counting.
Class for partitioning of an ImageRegion.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....