#include #include #include // ------------------------------------------------------------------------- cpPluginsImageThresholdFilters::UnaryThresholdImageFilter:: UnaryThresholdImageFilter( ) : Superclass( ) { typedef cpPlugins::DataObjects::Image _TImage; this->_ConfigureInput< _TImage >( "Input", true, false ); this->_ConfigureOutput< _TImage >( "Output" ); this->m_Parameters.ConfigureAsReal( "Threshold" ); this->m_Parameters.ConfigureAsReal( "InsideValue" ); this->m_Parameters.ConfigureAsReal( "OutsideValue" ); this->m_Parameters.ConfigureAsBool( "Strict" ); this->m_Parameters.SetReal( "Threshold", 0 ); this->m_Parameters.SetReal( "InsideValue", 1 ); this->m_Parameters.SetReal( "OutsideValue", 0 ); this->m_Parameters.SetBool( "Strict", false ); } // ------------------------------------------------------------------------- cpPluginsImageThresholdFilters::UnaryThresholdImageFilter:: ~UnaryThresholdImageFilter( ) { } // ------------------------------------------------------------------------- void cpPluginsImageThresholdFilters::UnaryThresholdImageFilter:: _GenerateData( ) { /* TODO auto o = this->GetInputData( "Input" ); cpPlugins_Demangle_ImageScalars_Dims( o, _GD0 ); else this->_Error( "Invalid input image." ); */ } // ------------------------------------------------------------------------- template< class _TImage > void cpPluginsImageThresholdFilters::UnaryThresholdImageFilter:: _GD0( _TImage* image ) { /* TODO typedef cpExtensions::Algorithms::UnaryThresholdImageFilter< _TImage > _TFilter; // Configure filter _TFilter* filter = this->_CreateITK< _TFilter >( ); filter->SetInput( image ); filter->SetThreshold( this->m_Parameters.GetReal( "Threshold" ) ); filter->SetInsideValue( this->m_Parameters.GetReal( "InsideValue" ) ); filter->SetOutsideValue( this->m_Parameters.GetReal( "OutsideValue" ) ); filter->SetStrict( this->m_Parameters.GetBool( "Strict" ) ); filter->Update( ); // Connect output this->GetOutput( "Output" )->SetITK( filter->GetOutput( ) ); */ } // eof - $RCSfile$