ITK  4.6.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, class TInternalComputationValueType = double>
72  public PointSetToPointSetMetricv4<TPointSet, TPointSet, TInternalComputationValueType>
73 {
74 public:
77  typedef PointSetToPointSetMetricv4<TPointSet, TPointSet,
78  TInternalComputationValueType> Superclass;
81 
83  itkSimpleNewMacro( Self );
84 
87 
88  typedef TPointSet PointSetType;
89  typedef typename PointSetType::PointsContainer PointsContainer;
90  typedef typename PointsContainer::ConstIterator PointsContainerConstIterator;
91 
92  itkStaticConstMacro( PointDimension, unsigned int, TPointSet::PointDimension );
93 
99  typedef typename Superclass::PointType PointType;
105 
109 
111 
119 
122  virtual void Initialize( void ) throw ( ExceptionObject );
123 
133  itkSetClampMacro( Alpha, RealType, 1.0, 2.0 );
134 
138  itkGetConstMacro( Alpha, RealType );
139 
145  itkSetMacro( PointSetSigma, RealType );
146 
148  itkGetConstMacro( PointSetSigma, RealType );
149 
154  itkSetMacro( EvaluationKNeighborhood, unsigned int );
155 
160  itkGetConstMacro( EvaluationKNeighborhood, unsigned int );
161 
166  itkSetMacro( UseAnisotropicCovariances, bool );
167 
172  itkGetConstMacro( UseAnisotropicCovariances, bool );
173 
178  itkBooleanMacro( UseAnisotropicCovariances );
179 
185  itkSetMacro( CovarianceKNeighborhood, unsigned int );
186 
192  itkGetConstMacro( CovarianceKNeighborhood, unsigned int );
193 
201  itkSetMacro( KernelSigma, RealType );
202 
204  itkGetConstMacro( KernelSigma, RealType );
205 
206  virtual MeasureType GetLocalNeighborhoodValue( const PointType & point,
207  const PixelType & pixel = 0 ) const;
208 
210  LocalDerivativeType &, const PixelType & pixel = 0 ) const;
211 
214  virtual typename LightObject::Pointer InternalClone() const;
215 
216 protected:
218  ~JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4();
219 
220  void ComputeValueAndDerivative( const PointType & samplePoint, MeasureType & value,
221  LocalDerivativeType &derivativeReturn, bool calcValue, bool calcDerivative ) const;
222 
223  void PrintSelf( std::ostream& os, Indent indent ) const;
224 
225 private:
226  //purposely not implemented
227  JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4( const Self& );
228  void operator=( const Self& );
229 
232 
234 
235  RealType m_PointSetSigma;
236  RealType m_KernelSigma;
239 
240  RealType m_Alpha;
241 
243  mutable RealType m_TotalNumberOfPoints;
244  mutable RealType m_Prefactor0;
245  mutable RealType m_Prefactor1;
246 };
247 
248 
249 } // end namespace itk
250 
251 #ifndef ITK_MANUAL_INSTANTIATION
252 #include "itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.hxx"
253 #endif
254 
255 #endif
ManifoldParzenWindowsPointSetFunction< PointSetType, RealType > DensityFunctionType
virtual MeasureType GetLocalNeighborhoodValue(const PointType &point, const PixelType &pixel=0) const
Light weight base class for most itk classes.
virtual LightObject::Pointer InternalClone() const
Computes similarity between two point sets.
Point set function based on n-dimensional parzen windowing.
virtual void GetLocalNeighborhoodValueAndDerivative(const PointType &, MeasureType &, LocalDerivativeType &, const PixelType &pixel=0) const
FixedArray< DerivativeValueType, itkGetStaticConstMacro(PointDimension)> LocalDerivativeType
GaussianMembershipFunction models class membership through a multivariate Gaussian function...
PointSetToPointSetMetricv4< TPointSet, TPointSet, TInternalComputationValueType > Superclass
void ComputeValueAndDerivative(const PointType &samplePoint, MeasureType &value, LocalDerivativeType &derivativeReturn, bool calcValue, bool calcDerivative) const
Standard exception handling object.
void PrintSelf(std::ostream &os, Indent indent) const
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Implementation of the Jensen Havrda Charvat Tsallis Point Set metric.