ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkExpectationBasedPointSetToPointSetMetricv4.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 itkExpectationBasedPointSetToPointSetMetricv4_h
19 #define itkExpectationBasedPointSetToPointSetMetricv4_h
20 
22 #include "itkPointSet.h"
23 #include "itkImage.h"
24 
25 namespace itk
26 {
43 template<typename TFixedPointSet, typename TMovingPointSet = TFixedPointSet,
44  class TInternalComputationValueType = double>
46  public PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
47 {
48 public:
49  ITK_DISALLOW_COPY_AND_ASSIGN(ExpectationBasedPointSetToPointSetMetricv4);
51 
54  using Superclass = PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet,
55  TInternalComputationValueType>;
58 
60  itkSimpleNewMacro( Self );
61 
64 
67  using DerivativeType = typename Superclass::DerivativeType;
68  using LocalDerivativeType = typename Superclass::LocalDerivativeType;
69  using PointType = typename Superclass::PointType;
70  using PixelType = typename Superclass::PixelType;
72  using PointIdentifier = typename Superclass::PointIdentifier;
73  using NeighborsIdentifierType = typename Superclass::NeighborsIdentifierType;
74 
78  MeasureType GetLocalNeighborhoodValue( const PointType &, const PixelType & pixel = 0 ) const override;
79 
83  void GetLocalNeighborhoodValueAndDerivative( const PointType &,
84  MeasureType &, LocalDerivativeType &, const PixelType & pixel = 0 ) const override;
85 
91  itkSetMacro( PointSetSigma, CoordRepType );
92 
94  itkGetConstMacro( PointSetSigma, CoordRepType );
95 
100  itkSetMacro( EvaluationKNeighborhood, unsigned int );
101 
106  itkGetConstMacro( EvaluationKNeighborhood, unsigned int );
107 
108  void Initialize() override;
109 
112  typename LightObject::Pointer InternalClone() const override;
113 
114 protected:
116  ~ExpectationBasedPointSetToPointSetMetricv4() override = default;
117 
119  void PrintSelf( std::ostream & os, Indent indent ) const override;
120 
121 private:
123  using NeighborsIterator = typename NeighborsIdentifierType::const_iterator;
124 
128  unsigned int m_EvaluationKNeighborhood{ 50 };
129 
130 };
131 } // end namespace itk
132 
133 #ifndef ITK_MANUAL_INSTANTIATION
134 #include "itkExpectationBasedPointSetToPointSetMetricv4.hxx"
135 #endif
136 
137 #endif
Light weight base class for most itk classes.
typename NeighborsIdentifierType::const_iterator NeighborsIterator
Computes similarity between two point sets.
typename PointType::CoordRepType CoordRepType
typename Superclass::MeasureType MeasureType
Computes an expectation-based metric between two point sets.
typename Superclass::MeasureType MeasureType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
typename Superclass::DerivativeType DerivativeType