ITK  4.11.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 
61  typedef PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet,
62  TInternalComputationValueType> Superclass;
65 
67  itkNewMacro( Self );
68 
71 
72  typedef TFixedPointSet FixedPointSetType;
73  typedef typename FixedPointSetType::Pointer FixedPointSetPointer;
74  typedef TMovingPointSet MovingPointSetType;
75  typedef typename MovingPointSetType::Pointer MovingPointSetPointer;
76 
78  typedef typename Superclass::MeasureType MeasureType;
79  typedef typename Superclass::DerivativeType DerivativeType;
80  typedef typename Superclass::LocalDerivativeType LocalDerivativeType;
81  typedef typename Superclass::PointType PointType;
82  typedef typename Superclass::PointIdentifier PointIdentifier;
83 
84  typedef typename Superclass::PixelType LabelType;
85  typedef std::vector<LabelType> LabelSetType;
86 
89 
94  virtual void Initialize( void ) throw ( ExceptionObject ) ITK_OVERRIDE;
95 
100  virtual MeasureType GetLocalNeighborhoodValue( const PointType &, const LabelType & ) const ITK_OVERRIDE;
101 
106  virtual void GetLocalNeighborhoodValueAndDerivative( const PointType &,
107  MeasureType &, LocalDerivativeType &, const LabelType & ) const ITK_OVERRIDE;
108 
113  itkSetObjectMacro( PointSetMetric, PointSetMetricType );
114  itkGetModifiableObjectMacro(PointSetMetric, PointSetMetricType );
116 
120  itkConceptMacro( LabelTypeIsInteger, ( Concept::IsInteger<LabelType> ) );
121 
122 protected:
124  virtual ~LabeledPointSetToPointSetMetricv4();
125 
127  void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE;
128 
129 private:
130  ITK_DISALLOW_COPY_AND_ASSIGN(LabeledPointSetToPointSetMetricv4);
131 
136  void DetermineCommonPointSetLabels();
137 
142  FixedPointSetPointer GetLabeledFixedPointSet( const LabelType ) const;
143 
148  MovingPointSetPointer GetLabeledMovingPointSet( const LabelType ) const;
149 
150  PointSetMetricPointer m_PointSetMetric;
151  std::vector<PointSetMetricPointer> m_PointSetMetricClones;
152 
153  LabelSetType m_FixedPointSetLabels;
154  LabelSetType m_MovingPointSetLabels;
155  LabelSetType m_CommonPointSetLabels;
156 
157 };
158 } // end namespace itk
159 
160 #ifndef ITK_MANUAL_INSTANTIATION
161 #include "itkLabeledPointSetToPointSetMetricv4.hxx"
162 #endif
163 
164 #endif
Light weight base class for most itk classes.
Computes similarity between two point sets.
Standard exception handling object.
Computes the distance metric and gradient between two labeled point sets.
PointSetToPointSetMetricv4< TFixedPointSet, TMovingPointSet, TInternalComputationValueType > Superclass
Control indentation during Print() invocation.
Definition: itkIndent.h:49
#define itkConceptMacro(name, concept)