#ifndef __FPA__IMAGE__FUNCTORS__GAUSSIANMODELESTIMATORFUNCTION__H__ #define __FPA__IMAGE__FUNCTORS__GAUSSIANMODELESTIMATORFUNCTION__H__ #include #include #include namespace fpa { namespace Image { namespace Functors { /** */ template< class I, class S > class GaussianModelEstimatorFunction : public itk::FunctionBase< typename I::PixelType, bool > { public: // Type-related and pointers typedef GaussianModelEstimatorFunction Self; typedef itk::FunctionBase< typename I::PixelType, bool > Superclass; typedef itk::SmartPointer< Self > Pointer; typedef itk::SmartPointer< const Self > ConstPointer; // Superclass' types typedef cpPlugins::Extensions::Algorithms::IterativeGaussianModelEstimator< S, 3 > TEstimator; typedef cpPlugins::Extensions::Algorithms::RGBToYPbPrFunction< S > TYPbPrFunction; public: itkNewMacro( Self ); itkTypeMacro( GaussianModelEstimatorFunction, itkFunctionBase ); itkGetConstMacro( ModelSupport, unsigned long ); public: bool SaveModelToFile( const std::string& filename ) const; bool LoadModelFromFile( const std::string& filename ); virtual void SetModelSupport( const unsigned long& s ); virtual bool Evaluate( const typename I::PixelType& rgb ) const; protected: GaussianModelEstimatorFunction( ); virtual ~GaussianModelEstimatorFunction( ); private: // Purposely not implemented GaussianModelEstimatorFunction( const Self& ); void operator=( const Self& ); protected: typename TEstimator::Pointer m_Estimator; TYPbPrFunction m_YPbPrFunction; unsigned long m_ModelSupport; unsigned long m_RealModelSupport; mutable bool m_Estimating; }; } // ecapseman } // ecapseman } // ecapseman #ifndef ITK_MANUAL_INSTANTIATION #include #endif // ITK_MANUAL_INSTANTIATION #endif // __FPA__IMAGE__FUNCTORS__GAUSSIANMODELESTIMATORFUNCTION__H__ // eof - $RCSfile$