X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=plugins%2FITKUnaryFunctorFilters%2FUnaryThresholdImageFilter.cxx;fp=plugins%2FITKUnaryFunctorFilters%2FUnaryThresholdImageFilter.cxx;h=0000000000000000000000000000000000000000;hb=2e142df11d6f312a2a2b5097b8da73571ed523e8;hp=d119094d826b845c2a5dd3aa4a289e368052896f;hpb=61b3659afe961ed248f30e26f9ca8f28fcfafddc;p=cpPlugins.git diff --git a/plugins/ITKUnaryFunctorFilters/UnaryThresholdImageFilter.cxx b/plugins/ITKUnaryFunctorFilters/UnaryThresholdImageFilter.cxx deleted file mode 100644 index d119094..0000000 --- a/plugins/ITKUnaryFunctorFilters/UnaryThresholdImageFilter.cxx +++ /dev/null @@ -1,57 +0,0 @@ -#include -#include - -#include - -// ------------------------------------------------------------------------- -cpPluginsITKUnaryFunctorFilters::UnaryThresholdImageFilter:: -UnaryThresholdImageFilter( ) - : Superclass( ) -{ - this->_ConfigureInput< cpInstances::DataObjects::Image >( "Input", true, false ); - this->_ConfigureOutput< cpInstances::DataObjects::Image >( "Output" ); - - this->m_Parameters.ConfigureAsReal( "Threshold", 0 ); - this->m_Parameters.ConfigureAsReal( "InsideValue", 1 ); - this->m_Parameters.ConfigureAsReal( "OutsideValue", 0 ); - this->m_Parameters.ConfigureAsBool( "Strict", false ); -} - -// ------------------------------------------------------------------------- -cpPluginsITKUnaryFunctorFilters::UnaryThresholdImageFilter:: -~UnaryThresholdImageFilter( ) -{ -} - -// ------------------------------------------------------------------------- -void cpPluginsITKUnaryFunctorFilters::UnaryThresholdImageFilter:: -_GenerateData( ) -{ - auto o = this->GetInputData( "Input" ); - cpPlugins_Demangle_Image_ScalarPixels_AllDims_1( o, _GD0 ) - this->_Error( "Invalid input image." ); -} - -// ------------------------------------------------------------------------- -template< class _TImage > -void cpPluginsITKUnaryFunctorFilters::UnaryThresholdImageFilter:: -_GD0( _TImage* image ) -{ - 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$