ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkObjectToObjectMultiMetricv4.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
19#ifndef itkObjectToObjectMultiMetricv4_h
20#define itkObjectToObjectMultiMetricv4_h
21
23#include "itkArray.h"
24#include <deque>
25
26namespace itk
27{
92template <unsigned int TFixedDimension,
93 unsigned int TMovingDimension,
94 typename TVirtualImage = Image<double, TFixedDimension>,
95 class TInternalComputationValueType = double>
96class ITK_TEMPLATE_EXPORT ObjectToObjectMultiMetricv4
97 : public ObjectToObjectMetric<TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType>
98{
99public:
100 ITK_DISALLOW_COPY_AND_MOVE(ObjectToObjectMultiMetricv4);
101
108
110 itkOverrideGetNameOfClassMacro(ObjectToObjectMultiMetricv4);
111
113 itkNewMacro(Self);
114
116 using typename Superclass::MeasureType;
117 using typename Superclass::DerivativeType;
118 using typename Superclass::DerivativeValueType;
119 using typename Superclass::ParametersType;
120 using typename Superclass::ParametersValueType;
123 using typename Superclass::MovingTransformType;
124 using typename Superclass::FixedTransformType;
125
130 using MetricQueueType = std::deque<MetricBasePointer>;
131
133
137
138 itkSetMacro(MetricWeights, WeightsArrayType);
139 itkGetMacro(MetricWeights, WeightsArrayType);
140
142 void
144
146 void
148
152
153 void
154 Initialize() override;
155
157 void
158 SetFixedObject(const ObjectType * itkNotUsed(object)) override
159 {
160 itkExceptionMacro("A single object should not be specified for the multi metric.");
161 }
162
164 void
165 SetMovingObject(const ObjectType * itkNotUsed(object)) override
166 {
167 itkExceptionMacro("A single object should not be specified for the multi metric.");
168 }
169
171 void
173
175 void
177
183 GetValue() const override;
184
185 void
186 GetDerivative(DerivativeType &) const override;
187
194 void
195 GetValueAndDerivative(MeasureType & firstValue, DerivativeType & derivativeResult) const override;
196
201
206
208 const MetricQueueType &
210
211 bool
213
214 using typename Superclass::MetricCategoryType;
215
218 GetMetricCategory() const override
219 {
220 return MetricCategoryType::MULTI_METRIC;
221 }
222
223protected:
225 ~ObjectToObjectMultiMetricv4() override = default;
226 void
227 PrintSelf(std::ostream & os, Indent indent) const override;
228
229private:
233};
234
235} // end namespace itk
236
237#ifndef ITK_MANUAL_INSTANTIATION
238# include "itkObjectToObjectMultiMetricv4.hxx"
239#endif
240
241#endif
Array class with size defined at construction time.
Definition itkArray.h:48
Templated n-dimensional image class.
Definition itkImage.h:89
Control indentation during Print() invocation.
Definition itkIndent.h:50
typename DerivativeType::ValueType DerivativeValueType
TParametersValueType CoordinateRepresentationType
Transform< TParametersValueType, TVirtualImage::ImageDimension, TMovingDimension > MovingTransformType
typename Superclass::MetricCategoryEnum MetricCategoryType
Transform< TParametersValueType, TVirtualImage::ImageDimension, TFixedDimension > FixedTransformType
void PrintSelf(std::ostream &os, Indent indent) const override
ObjectToObjectMetric< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType > Superclass
void SetFixedObject(const ObjectType *object) override
~ObjectToObjectMultiMetricv4() override=default
MetricValueArrayType GetValueArray() const
const MetricQueueType & GetMetricQueue() const
void GetDerivative(DerivativeType &) const override
void GetValueAndDerivative(MeasureType &firstValue, DerivativeType &derivativeResult) const override
MeasureType GetWeightedValue() const
void AddMetric(MetricType *metric)
SizeValueType GetNumberOfMetrics() const
typename MetricType::ConstPointer MetricBaseConstPointer
typename DerivativeType::ValueType WeightValueType
std::deque< MetricBasePointer > MetricQueueType
void SetMovingTransform(MovingTransformType *) override
MetricCategoryType GetMetricCategory() const override
bool SupportsArbitraryVirtualDomainSamples() const override
MeasureType GetValue() const override
void SetMovingObject(const ObjectType *object) override
void SetFixedTransform(FixedTransformType *) override
OptimizerParameters< double > ParametersType
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType
Definition itkIntTypes.h:86