X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=lib%2FcpPlugins%2FPlugins%2FBasicFilters%2FBinaryThresholdImageFilter.cxx;h=af2c26ae01d11f165081115cf1dfdc5b6b558d0d;hb=a89305e04527ebe2e81d0d1a62bbe34e0d35a141;hp=98926796d276469c85df76d22fa845d7a1a2d2f6;hpb=7e29f3aec097ba1bff1894fed6eb1094276c5b72;p=cpPlugins.git diff --git a/lib/cpPlugins/Plugins/BasicFilters/BinaryThresholdImageFilter.cxx b/lib/cpPlugins/Plugins/BasicFilters/BinaryThresholdImageFilter.cxx index 9892679..af2c26a 100644 --- a/lib/cpPlugins/Plugins/BasicFilters/BinaryThresholdImageFilter.cxx +++ b/lib/cpPlugins/Plugins/BasicFilters/BinaryThresholdImageFilter.cxx @@ -8,7 +8,7 @@ cpPlugins::BasicFilters::BinaryThresholdImageFilter:: BinaryThresholdImageFilter( ) : Superclass( ) { - this->_AddInput( "Input", true ); + this->_AddInput( "Input" ); this->_AddOutput< cpPlugins::Interface::Image >( "Output" ); this->m_Parameters->ConfigureAsReal( "LowerThresholdValue" ); @@ -33,9 +33,6 @@ std::string cpPlugins::BasicFilters::BinaryThresholdImageFilter:: _GenerateData( ) { auto image = this->GetInputData< cpPlugins::Interface::Image >( "Input" ); - if( image == NULL ) - return( "BinaryThresholdImageFilter: No input image." ); - itk::DataObject* itk_image = NULL; std::string r = ""; cpPlugins_Image_Demangle_AllScalarTypes( 2, image, itk_image, r, _GD0 ); @@ -85,13 +82,8 @@ _RealGD( itk::DataObject* image ) // Connect output auto out = this->GetOutputData< cpPlugins::Interface::Image >( "Output" ); - if( out != NULL ) - { - out->SetITK< O >( filter->GetOutput( ) ); - return( "" ); - } - else - return( "BinaryThresholdImageFilter: output not correctly created." ); + out->SetITK( filter->GetOutput( ) ); + return( "" ); } // eof - $RCSfile$