ITK  6.0.0
Insight Toolkit
itkPointSetToPointSetMetricv4.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 itkPointSetToPointSetMetricv4_h
19#define itkPointSetToPointSetMetricv4_h
20
22
23namespace itk
24{
65template <typename TFixedPointSet,
66 typename TMovingPointSet = TFixedPointSet,
67 class TInternalComputationValueType = double>
68class ITK_TEMPLATE_EXPORT PointSetToPointSetMetricv4
69 : public PointSetToPointSetMetricWithIndexv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
70{
71public:
72 ITK_DISALLOW_COPY_AND_MOVE(PointSetToPointSetMetricv4);
73
76 using Superclass =
80
82 itkOverrideGetNameOfClassMacro(PointSetToPointSetMetricv4);
83
85 using typename Superclass::MeasureType;
86
88 using typename Superclass::ParametersType;
89 using typename Superclass::ParametersValueType;
90 using typename Superclass::NumberOfParametersType;
91
93 using typename Superclass::DerivativeType;
94
96 using typename Superclass::FixedTransformType;
97 using typename Superclass::FixedTransformPointer;
98 using typename Superclass::FixedInputPointType;
99 using typename Superclass::FixedOutputPointType;
100 using typename Superclass::FixedTransformParametersType;
101
102 using typename Superclass::MovingTransformType;
103 using typename Superclass::MovingTransformPointer;
104 using typename Superclass::MovingInputPointType;
105 using typename Superclass::MovingOutputPointType;
106 using typename Superclass::MovingTransformParametersType;
107
108 using typename Superclass::JacobianType;
109 using typename Superclass::FixedTransformJacobianType;
110 using typename Superclass::MovingTransformJacobianType;
111
112 using DisplacementFieldTransformType = typename Superclass::MovingDisplacementFieldTransformType;
113
115 using typename Superclass::DimensionType;
116
118 using FixedPointSetType = TFixedPointSet;
120 using FixedPixelType = typename TFixedPointSet::PixelType;
121 using FixedPointsContainer = typename TFixedPointSet::PointsContainer;
122
123 static constexpr DimensionType FixedPointDimension = Superclass::FixedPointDimension;
124
126 using MovingPointSetType = TMovingPointSet;
128 using MovingPixelType = typename TMovingPointSet::PixelType;
129 using MovingPointsContainer = typename TMovingPointSet::PointsContainer;
130
131 static constexpr DimensionType MovingPointDimension = Superclass::MovingPointDimension;
132
139 static constexpr DimensionType PointDimension = Superclass::PointDimension;
140
141 using typename Superclass::PointType;
142 using typename Superclass::PixelType;
143 using CoordRepType = typename PointType::CoordRepType;
145 using PointsConstIterator = typename PointsContainer::ConstIterator;
146 using typename Superclass::PointIdentifier;
147
149 using typename Superclass::PointsLocatorType;
151
152 using typename Superclass::FixedTransformedPointSetType;
153 using typename Superclass::MovingTransformedPointSetType;
154
155 using typename Superclass::DerivativeValueType;
156 using typename Superclass::LocalDerivativeType;
157
159 using VirtualImageType = typename Superclass::VirtualImageType;
160 using typename Superclass::VirtualImagePointer;
161 using typename Superclass::VirtualPixelType;
162 using typename Superclass::VirtualRegionType;
163 using typename Superclass::VirtualSizeType;
164 using typename Superclass::VirtualSpacingType;
165 using VirtualOriginType = typename Superclass::VirtualPointType;
166 using typename Superclass::VirtualPointType;
167 using typename Superclass::VirtualDirectionType;
168 using VirtualRadiusType = typename Superclass::VirtualSizeType;
169 using typename Superclass::VirtualIndexType;
170 using typename Superclass::VirtualPointSetType;
171 using typename Superclass::VirtualPointSetPointer;
172
178 virtual MeasureType
179 GetLocalNeighborhoodValue(const PointType &, const PixelType & pixel) const = 0;
180
188 virtual LocalDerivativeType
190
195 virtual void
197 MeasureType &,
199 const PixelType & pixel) const = 0;
200
201
202protected:
204 ~PointSetToPointSetMetricv4() override = default;
205
206private:
209 const PointType & point,
210 const PixelType & pixel) const override
211 {
212 return this->GetLocalNeighborhoodValue(point, pixel);
213 }
214
215 LocalDerivativeType
217 const PointType & point,
218 const PixelType & pixel) const override
219 {
220 return this->GetLocalNeighborhoodDerivative(point, pixel);
221 }
222
223 void
225 const PointType & point,
226 MeasureType & measure,
227 LocalDerivativeType & derivative,
228 const PixelType & pixel) const override
229 {
230 this->GetLocalNeighborhoodValueAndDerivative(point, measure, derivative, pixel);
231 }
232};
233} // end namespace itk
234
235#ifndef ITK_MANUAL_INSTANTIATION
236# include "itkPointSetToPointSetMetricv4.hxx"
237#endif
238
239#endif
Simulate a standard C array with copy semantics.
Definition: itkFixedArray.h:54
Light weight base class for most itk classes.
Computes similarity between two point sets.
typename TMovingPointSet::PointType MovingPointType
typename PointsContainer::ConstIterator PointsConstIterator
virtual LocalDerivativeType GetLocalNeighborhoodDerivative(const PointType &, const PixelType &pixel) const
typename Superclass::VirtualSizeType VirtualRadiusType
typename PointsLocatorType::NeighborsIdentifierType NeighborsIdentifierType
typename TFixedPointSet::PointsContainer FixedPointsContainer
virtual void GetLocalNeighborhoodValueAndDerivative(const PointType &, MeasureType &, LocalDerivativeType &, const PixelType &pixel) const =0
typename TMovingPointSet::PixelType MovingPixelType
typename TMovingPointSet::PointsContainer MovingPointsContainer
MeasureType GetLocalNeighborhoodValueWithIndex(const PointIdentifier &, const PointType &point, const PixelType &pixel) const override
typename Superclass::VirtualImageType VirtualImageType
~PointSetToPointSetMetricv4() override=default
virtual MeasureType GetLocalNeighborhoodValue(const PointType &, const PixelType &pixel) const =0
typename Superclass::VirtualPointType VirtualOriginType
LocalDerivativeType GetLocalNeighborhoodDerivativeWithIndex(const PointIdentifier &, const PointType &point, const PixelType &pixel) const override
typename TFixedPointSet::PixelType FixedPixelType
typename PointType::CoordRepType CoordRepType
void GetLocalNeighborhoodValueAndDerivativeWithIndex(const PointIdentifier &, const PointType &point, MeasureType &measure, LocalDerivativeType &derivative, const PixelType &pixel) const override
typename TFixedPointSet::PointType FixedPointType
typename Superclass::MovingDisplacementFieldTransformType DisplacementFieldTransformType
typename TreeType::InstanceIdentifierVectorType NeighborsIdentifierType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
*par Constraints *The filter image with at least two dimensions and a vector *length of at least The theory supports extension to scalar but *the implementation of the itk vector classes do not **The template parameter TRealType must be floating point(float or double) or *a user-defined "real" numerical type with arithmetic operations defined *sufficient to compute derivatives. **\par Performance *This filter will automatically multithread if run with *SetUsePrincipleComponents