18 #ifndef __itkPSMParticleEntropyFunction_h 19 #define __itkPSMParticleEntropyFunction_h 21 #include "itkPSMCostFunction.h" 22 #include "itkPSMContainerArrayAttribute.h" 23 #include "itkPSMImageDomainWithGradients.h" 83 template <
class TGradientNumericType,
unsigned int VDimension>
89 typedef SmartPointer<Self> Pointer;
90 typedef SmartPointer<const Self> ConstPointer;
106 typedef vnl_vector_fixed<TGradientNumericType, VDimension> GradientVectorType;
118 virtual VectorType
Evaluate(
unsigned int,
unsigned int,
const ParticleSystemType *,
121 virtual VectorType
Evaluate(
unsigned int,
unsigned int,
const ParticleSystemType *,
122 double &,
double &)
const 124 itkExceptionMacro(
"This method not implemented");
127 virtual double Energy(
unsigned int,
unsigned int,
const ParticleSystemType *)
const 129 itkExceptionMacro(
"This method not implemented");
135 m_SpatialSigmaCache->ZeroAllValues();
141 virtual double EstimateSigma(
unsigned int,
const typename ParticleSystemType::PointVectorType &,
142 const std::vector<double> &,
143 const PointType &,
double,
double,
int &err)
const;
149 const GradientVectorType&)
const;
161 { m_MinimumNeighborhoodRadius = s; }
162 double GetMinimumNeighborhoodRadius()
const 163 {
return m_MinimumNeighborhoodRadius; }
174 { m_MaximumNeighborhoodRadius = s; }
175 double GetMaximumNeighborhoodRadius()
const 176 {
return m_MaximumNeighborhoodRadius; }
190 { m_FlatCutoff = s; }
191 double GetFlatCutoff()
const 192 {
return m_FlatCutoff; }
204 { m_NeighborhoodToSigmaRatio = s; }
205 double GetNeighborhoodToSigmaRatio()
const 206 {
return m_NeighborhoodToSigmaRatio; }
212 { m_SpatialSigmaCache = s; }
213 SigmaCacheType *GetSpatialSigmaCache()
214 {
return m_SpatialSigmaCache.GetPointer(); }
215 const SigmaCacheType *GetSpatialSigmaCache()
const 216 {
return m_SpatialSigmaCache.GetPointer(); }
222 const typename ParticleSystemType::PointVectorType &,
224 std::vector<double> &)
const;
228 m_MaximumNeighborhoodRadius(1024.0), m_FlatCutoff(0.3),
229 m_NeighborhoodToSigmaRatio(3.0) {}
235 double m_MinimumNeighborhoodRadius;
236 double m_MaximumNeighborhoodRadius;
238 double m_NeighborhoodToSigmaRatio;
239 typename SigmaCacheType::Pointer m_SpatialSigmaCache;
245 #ifndef ITK_MANUAL_INSTANTIATION 246 #include "itkPSMParticleEntropyFunction.hxx" PSMContainerArrayAttribute< double, VDimension > SigmaCacheType
virtual VectorType Evaluate(unsigned int, unsigned int, const ParticleSystemType *, double &) const
itkStaticConstMacro(Dimension, unsigned int, VDimension)
void ComputeAngularWeights(const PointType &, const typename ParticleSystemType::PointVectorType &, const PSMImageDomainWithGradients< TGradientNumericType, VDimension > *, std::vector< double > &) const
void SetSpatialSigmaCache(SigmaCacheType *s)
void SetMinimumNeighborhoodRadius(double s)
void SetNeighborhoodToSigmaRatio(double s)
virtual void ResetBuffers()
Superclass::VectorType VectorType
void SetMaximumNeighborhoodRadius(double s)
void SetFlatCutoff(double s)
TGradientNumericType GradientNumericType
TGradientNumericType AngleCoefficient(const GradientVectorType &, const GradientVectorType &) const
virtual double EstimateSigma(unsigned int, const typename ParticleSystemType::PointVectorType &, const std::vector< double > &, const PointType &, double, double, int &err) const
Superclass::ParticleSystemType ParticleSystemType
vnl_vector_fixed< double, VDimension > VectorType
This function returns an estimate of the gradient of the entropy of a particle distribution with resp...
PSMParticleSystem< VDimension > ParticleSystemType
PSMParticleEntropyFunction Self