ITK  4.4.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<class TFixedPointSet, class TMovingPointSet = TFixedPointSet>
45  public PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
46 {
47 public:
48 
54 
56  itkSimpleNewMacro( Self );
57 
60 
62  typedef typename Superclass::MeasureType MeasureType;
63  typedef typename Superclass::DerivativeType DerivativeType;
64  typedef typename Superclass::LocalDerivativeType LocalDerivativeType;
65  typedef typename Superclass::PointType PointType;
66  typedef typename Superclass::PixelType PixelType;
68  typedef typename Superclass::PointIdentifier PointIdentifier;
69  typedef typename Superclass::NeighborsIdentifierType NeighborsIdentifierType;
70 
74  virtual MeasureType GetLocalNeighborhoodValue( const PointType &, const PixelType & pixel = 0 ) const;
75 
79  virtual void GetLocalNeighborhoodValueAndDerivative( const PointType &,
80  MeasureType &, LocalDerivativeType &, const PixelType & pixel = 0 ) const;
81 
87  itkSetMacro( PointSetSigma, CoordRepType );
88 
90  itkGetConstMacro( PointSetSigma, CoordRepType );
91 
96  itkSetMacro( EvaluationKNeighborhood, unsigned int );
97 
102  itkGetConstMacro( EvaluationKNeighborhood, unsigned int );
103 
104  void Initialize( void ) throw ( ExceptionObject );
105 
108  virtual ::itk::LightObject::Pointer Clone( void ) const;
109 
110 protected:
112  virtual ~ExpectationBasedPointSetToPointSetMetricv4();
113 
115  void PrintSelf( std::ostream & os, Indent indent ) const;
116 
117 private:
118  ExpectationBasedPointSetToPointSetMetricv4( const Self & ); //purposely not implemented
119  void operator=( const Self & ); //purposely not implemented
120 
121  typedef typename PointType::VectorType VectorType;
122  typedef typename NeighborsIdentifierType::const_iterator NeighborsIterator;
123 
124  CoordRepType m_PointSetSigma;
125  MeasureType m_PreFactor;
126  MeasureType m_Denominator;
127  unsigned int m_EvaluationKNeighborhood;
128 
129 };
130 } // end namespace itk
131 
132 #ifndef ITK_MANUAL_INSTANTIATION
133 #include "itkExpectationBasedPointSetToPointSetMetricv4.hxx"
134 #endif
135 
136 #endif
137