ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkLabeledPointSetToPointSetMetricv4.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 itkLabeledPointSetToPointSetMetricv4_h
19 #define itkLabeledPointSetToPointSetMetricv4_h
20 
22 
23 #include <vector>
24 
25 namespace itk
26 {
52 template<typename TFixedPointSet, typename TMovingPointSet = TFixedPointSet,
53  class TInternalComputationValueType = double>
54 class ITK_TEMPLATE_EXPORT LabeledPointSetToPointSetMetricv4:
55  public PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
56 {
57 public:
58  ITK_DISALLOW_COPY_AND_ASSIGN(LabeledPointSetToPointSetMetricv4);
59 
62  using Superclass = PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet,
63  TInternalComputationValueType>;
66 
68  itkNewMacro( Self );
69 
72 
73  using FixedPointSetType = TFixedPointSet;
74  using FixedPointSetPointer = typename FixedPointSetType::Pointer;
75  using MovingPointSetType = TMovingPointSet;
76  using MovingPointSetPointer = typename MovingPointSetType::Pointer;
77 
79  using MeasureType = typename Superclass::MeasureType;
80  using DerivativeType = typename Superclass::DerivativeType;
81  using LocalDerivativeType = typename Superclass::LocalDerivativeType;
82  using PointType = typename Superclass::PointType;
83  using PointIdentifier = typename Superclass::PointIdentifier;
84 
85  using LabelType = typename Superclass::PixelType;
86  using LabelSetType = std::vector<LabelType>;
87 
90 
95  void Initialize() override;
96 
101  MeasureType GetLocalNeighborhoodValue( const PointType &, const LabelType & ) const override;
102 
107  void GetLocalNeighborhoodValueAndDerivative( const PointType &,
108  MeasureType &, LocalDerivativeType &, const LabelType & ) const override;
109 
114  itkSetObjectMacro( PointSetMetric, PointSetMetricType );
115  itkGetModifiableObjectMacro(PointSetMetric, PointSetMetricType );
117 
121  itkConceptMacro( LabelTypeIsInteger, ( Concept::IsInteger<LabelType> ) );
122 
123 protected:
125  ~LabeledPointSetToPointSetMetricv4() override = default;
126 
128  void PrintSelf( std::ostream & os, Indent indent ) const override;
129 
130 private:
135  void DetermineCommonPointSetLabels();
136 
141  FixedPointSetPointer GetLabeledFixedPointSet( const LabelType ) const;
142 
147  MovingPointSetPointer GetLabeledMovingPointSet( const LabelType ) const;
148 
150  std::vector<PointSetMetricPointer> m_PointSetMetricClones;
151 
155 
156 };
157 } // end namespace itk
158 
159 #ifndef ITK_MANUAL_INSTANTIATION
160 #include "itkLabeledPointSetToPointSetMetricv4.hxx"
161 #endif
162 
163 #endif
Light weight base class for most itk classes.
typename PointSetMetricType::Pointer PointSetMetricPointer
typename Superclass::LocalDerivativeType LocalDerivativeType
std::vector< PointSetMetricPointer > m_PointSetMetricClones
Computes similarity between two point sets.
typename Superclass::PointIdentifier PointIdentifier
typename Superclass::MeasureType MeasureType
typename MovingPointSetType::Pointer MovingPointSetPointer
Computes the distance metric and gradient between two labeled point sets.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
typename Superclass::DerivativeType DerivativeType
#define itkConceptMacro(name, concept)
typename FixedPointSetType::Pointer FixedPointSetPointer