ITK  4.13.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 
52  typedef PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet,
53  TInternalComputationValueType> Superclass;
56 
58  itkSimpleNewMacro( Self );
59 
62 
64  typedef typename Superclass::MeasureType MeasureType;
65  typedef typename Superclass::DerivativeType DerivativeType;
66  typedef typename Superclass::LocalDerivativeType LocalDerivativeType;
67  typedef typename Superclass::PointType PointType;
68  typedef typename Superclass::PixelType PixelType;
70  typedef typename Superclass::PointIdentifier PointIdentifier;
71  typedef typename Superclass::NeighborsIdentifierType NeighborsIdentifierType;
72 
76  virtual MeasureType GetLocalNeighborhoodValue( const PointType &, const PixelType & pixel = 0 ) const ITK_OVERRIDE;
77 
81  virtual void GetLocalNeighborhoodValueAndDerivative( const PointType &,
82  MeasureType &, LocalDerivativeType &, const PixelType & pixel = 0 ) const ITK_OVERRIDE;
83 
89  itkSetMacro( PointSetSigma, CoordRepType );
90 
92  itkGetConstMacro( PointSetSigma, CoordRepType );
93 
98  itkSetMacro( EvaluationKNeighborhood, unsigned int );
99 
104  itkGetConstMacro( EvaluationKNeighborhood, unsigned int );
105 
106  void Initialize( void ) ITK_OVERRIDE;
107 
110  virtual typename LightObject::Pointer InternalClone() const ITK_OVERRIDE;
111 
112 protected:
114  virtual ~ExpectationBasedPointSetToPointSetMetricv4() ITK_OVERRIDE;
115 
117  void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE;
118 
119 private:
120  ITK_DISALLOW_COPY_AND_ASSIGN(ExpectationBasedPointSetToPointSetMetricv4);
121 
122  typedef typename PointType::VectorType VectorType;
123  typedef typename NeighborsIdentifierType::const_iterator NeighborsIterator;
124 
125  CoordRepType m_PointSetSigma;
126  MeasureType m_PreFactor;
127  MeasureType m_Denominator;
128  unsigned int m_EvaluationKNeighborhood;
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.
Computes similarity between two point sets.
Computes an expectation-based metric between two point sets.
PointSetToPointSetMetricv4< TFixedPointSet, TMovingPointSet, TInternalComputationValueType > Superclass
Control indentation during Print() invocation.
Definition: itkIndent.h:49