ITK  4.5.0
Insight Segmentation and Registration Toolkit
itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.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 __itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4_h
19 #define __itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4_h
20 
22 
24 
25 namespace itk {
26 
70 template<typename TPointSet>
72  public PointSetToPointSetMetricv4<TPointSet, TPointSet>
73 {
74 public:
80 
82  itkSimpleNewMacro( Self );
83 
86 
87  typedef TPointSet PointSetType;
88  typedef typename PointSetType::PointsContainer PointsContainer;
89  typedef typename PointsContainer::ConstIterator PointsContainerConstIterator;
90 
91  itkStaticConstMacro( PointDimension, unsigned int, TPointSet::PointDimension );
92 
98  typedef typename Superclass::PointType PointType;
99  typedef typename Superclass::PixelType PixelType;
104 
108 
110 
118 
121  virtual void Initialize( void ) throw ( ExceptionObject );
122 
132  itkSetClampMacro( Alpha, RealType, 1.0, 2.0 );
133 
137  itkGetConstMacro( Alpha, RealType );
138 
144  itkSetMacro( PointSetSigma, RealType );
145 
147  itkGetConstMacro( PointSetSigma, RealType );
148 
153  itkSetMacro( EvaluationKNeighborhood, unsigned int );
154 
159  itkGetConstMacro( EvaluationKNeighborhood, unsigned int );
160 
165  itkSetMacro( UseAnisotropicCovariances, bool );
166 
171  itkGetConstMacro( UseAnisotropicCovariances, bool );
172 
177  itkBooleanMacro( UseAnisotropicCovariances );
178 
184  itkSetMacro( CovarianceKNeighborhood, unsigned int );
185 
191  itkGetConstMacro( CovarianceKNeighborhood, unsigned int );
192 
200  itkSetMacro( KernelSigma, RealType );
201 
203  itkGetConstMacro( KernelSigma, RealType );
204 
205  virtual MeasureType GetLocalNeighborhoodValue( const PointType & point, const PixelType & pixel = 0 ) const;
206 
207  virtual void GetLocalNeighborhoodValueAndDerivative( const PointType &, MeasureType &, LocalDerivativeType &, const PixelType & pixel = 0 ) const;
208 
211  virtual ::itk::LightObject::Pointer Clone( void ) const;
212 
213 protected:
215  ~JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4();
216 
217  virtual void InitializeForIteration( void ) const;
218 
219  void ComputeValueAndDerivative( const PointType & samplePoint, MeasureType &value, LocalDerivativeType &derivativeReturn, bool calcValue, bool calcDerivative ) const;
220 
221  void PrintSelf( std::ostream& os, Indent indent ) const;
222 
223 private:
224  //purposely not implemented
225  JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4( const Self& );
226  void operator=( const Self& );
227 
230 
232 
233  RealType m_PointSetSigma;
234  RealType m_KernelSigma;
237 
238  RealType m_Alpha;
239 
241  mutable RealType m_TotalNumberOfPoints;
242  mutable RealType m_Prefactor0;
243  mutable RealType m_Prefactor1;
244 };
245 
246 
247 } // end namespace itk
248 
249 #ifndef ITK_MANUAL_INSTANTIATION
250 #include "itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.hxx"
251 #endif
252 
253 #endif
Light weight base class for most itk classes.
virtual void GetLocalNeighborhoodValueAndDerivative(const PointType &, MeasureType &, LocalDerivativeType &, const PixelType &pixel=0) const
Computes similarity between two point sets.
Point set function based on n-dimensional parzen windowing.
void PrintSelf(std::ostream &os, Indent indent) const
GaussianMembershipFunction models class membership through a multivariate Gaussian function...
PointsLocatorType::NeighborsIdentifierType NeighborsIdentifierType
void ComputeValueAndDerivative(const PointType &samplePoint, MeasureType &value, LocalDerivativeType &derivativeReturn, bool calcValue, bool calcDerivative) const
ManifoldParzenWindowsPointSetFunction< PointSetType, RealType > DensityFunctionType
Standard exception handling object.
virtual ::itk::LightObject::Pointer Clone(void) const
FixedArray< DerivativeValueType, itkGetStaticConstMacro(PointDimension)> LocalDerivativeType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
virtual MeasureType GetLocalNeighborhoodValue(const PointType &point, const PixelType &pixel=0) const
Implementation of the Jensen Havrda Charvat Tsallis Point Set metric.