ITK  6.0.0
Insight Toolkit
itkImageToImageMetricv4GetValueAndDerivativeThreader.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 itkImageToImageMetricv4GetValueAndDerivativeThreader_h
19#define itkImageToImageMetricv4GetValueAndDerivativeThreader_h
20
22#include "itkNumericTraits.h"
25
26namespace itk
27{
28
43template <typename TDomainPartitioner, typename TImageToImageMetricv4>
45{};
46
51template <typename TImageToImageMetricv4>
53 ThreadedImageRegionPartitioner<TImageToImageMetricv4::VirtualImageDimension>,
54 TImageToImageMetricv4>
56 ThreadedImageRegionPartitioner<TImageToImageMetricv4::VirtualImageDimension>,
57 TImageToImageMetricv4>
58{
59public:
60 ITK_DISALLOW_COPY_AND_MOVE(ImageToImageMetricv4GetValueAndDerivativeThreader);
61
66 TImageToImageMetricv4>;
69
71
73 using typename Superclass::DomainType;
74 using typename Superclass::AssociateType;
75
77 using ImageToImageMetricv4Type = TImageToImageMetricv4;
78 using VirtualImageType = typename Superclass::VirtualImageType;
79 using typename Superclass::VirtualIndexType;
80 using typename Superclass::VirtualPointType;
81 using typename Superclass::FixedImagePointType;
82 using typename Superclass::FixedImagePixelType;
83 using typename Superclass::FixedImageGradientType;
84 using typename Superclass::MovingImagePointType;
85 using typename Superclass::MovingImagePixelType;
86 using typename Superclass::MovingImageGradientType;
87
88 using typename Superclass::FixedTransformType;
89 using typename Superclass::FixedOutputPointType;
90 using typename Superclass::MovingTransformType;
91 using typename Superclass::MovingOutputPointType;
92
93 using typename Superclass::MeasureType;
94 using typename Superclass::DerivativeType;
95 using typename Superclass::DerivativeValueType;
96 using typename Superclass::JacobianType;
97
98 using typename Superclass::InternalComputationValueType;
99 using typename Superclass::NumberOfParametersType;
100 using typename Superclass::ImageDimensionType;
101
102protected:
105
108 void
109 ThreadedExecution(const DomainType & imageSubRegion, const ThreadIdType threadId) override;
110
116 {
117 return this->m_CachedNumberOfParameters;
118 }
119 inline NumberOfParametersType
121 {
122 return this->m_CachedNumberOfLocalParameters;
123 }
124};
131template <typename TImageToImageMetricv4>
132class ITK_TEMPLATE_EXPORT
134 : public ImageToImageMetricv4GetValueAndDerivativeThreaderBase<ThreadedIndexedContainerPartitioner,
135 TImageToImageMetricv4>
136{
137public:
138 ITK_DISALLOW_COPY_AND_MOVE(ImageToImageMetricv4GetValueAndDerivativeThreader);
139
146
148
150 using typename Superclass::DomainType;
151 using typename Superclass::AssociateType;
152
154 using ImageToImageMetricv4Type = typename Superclass::ImageToImageMetricv4Type;
155 using VirtualImageType = typename Superclass::VirtualImageType;
156 using typename Superclass::VirtualIndexType;
157 using typename Superclass::VirtualPointType;
158 using typename Superclass::FixedImagePointType;
159 using typename Superclass::FixedImagePixelType;
160 using typename Superclass::FixedImageGradientType;
161 using typename Superclass::MovingImagePointType;
162 using typename Superclass::MovingImagePixelType;
163 using typename Superclass::MovingImageGradientType;
164
165 using typename Superclass::FixedTransformType;
166 using typename Superclass::FixedOutputPointType;
167 using typename Superclass::MovingTransformType;
168 using typename Superclass::MovingOutputPointType;
169
170 using typename Superclass::MeasureType;
171 using typename Superclass::DerivativeType;
172 using typename Superclass::DerivativeValueType;
173 using typename Superclass::JacobianType;
174
175 using typename Superclass::InternalComputationValueType;
176 using typename Superclass::NumberOfParametersType;
177
178protected:
181
184 void
185 ThreadedExecution(const DomainType & indexSubRange, const ThreadIdType threadId) override;
186
192 {
193 return this->m_CachedNumberOfParameters;
194 }
195 inline NumberOfParametersType
197 {
198 return this->m_CachedNumberOfLocalParameters;
199 }
200};
203} // end namespace itk
204
205#ifndef ITK_MANUAL_INSTANTIATION
206# include "itkImageToImageMetricv4GetValueAndDerivativeThreader.hxx"
207#endif
208
209#endif
void ThreadedExecution(const DomainType &indexSubRange, const ThreadIdType threadId) override
Provides threading for ImageToImageMetricv4::GetValueAndDerivative.
Light weight base class for most itk classes.
Class for partitioning of an ImageRegion.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned int ThreadIdType
Definition: itkIntTypes.h:102