X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPlugins%2FPlugins%2FBasicFilters%2FBinaryThresholdImageFilter.cxx;h=5f159ce6410de2384beb69fd40b0a54e926be5be;hb=f69098bd941d8753926760dead2792584eb95f53;hp=5dc60cba906aabf2a6f0a21845275b37b9a22633;hpb=2eaf38cfdcbd2cfb0cc323dad6ded6bbeb436edf;p=cpPlugins.git diff --git a/lib/cpPlugins/Plugins/BasicFilters/BinaryThresholdImageFilter.cxx b/lib/cpPlugins/Plugins/BasicFilters/BinaryThresholdImageFilter.cxx index 5dc60cb..5f159ce 100644 --- a/lib/cpPlugins/Plugins/BasicFilters/BinaryThresholdImageFilter.cxx +++ b/lib/cpPlugins/Plugins/BasicFilters/BinaryThresholdImageFilter.cxx @@ -9,12 +9,17 @@ BinaryThresholdImageFilter( ) : Superclass( ) { this->_AddInput( "Input" ); - this->_MakeOutput< cpPlugins::Interface::Image >( "Output" ); + this->_AddOutput< cpPlugins::Interface::Image >( "Output" ); - this->m_Parameters->ConfigureAsReal( "LowerThresholdValue", 0 ); - this->m_Parameters->ConfigureAsReal( "UpperThresholdValue", 10000 ); - this->m_Parameters->ConfigureAsUint( "InsideValue", 1 ); - this->m_Parameters->ConfigureAsUint( "OutsideValue", 0 ); + this->m_Parameters->ConfigureAsReal( "LowerThresholdValue" ); + this->m_Parameters->ConfigureAsReal( "UpperThresholdValue" ); + this->m_Parameters->ConfigureAsUint( "InsideValue" ); + this->m_Parameters->ConfigureAsUint( "OutsideValue" ); + + this->m_Parameters->SetReal( "LowerThresholdValue", 0 ); + this->m_Parameters->SetReal( "UpperThresholdValue", 10000 ); + this->m_Parameters->SetUint( "InsideValue", 1 ); + this->m_Parameters->SetUint( "OutsideValue", 0 ); } // ------------------------------------------------------------------------- @@ -27,8 +32,7 @@ cpPlugins::BasicFilters::BinaryThresholdImageFilter:: std::string cpPlugins::BasicFilters::BinaryThresholdImageFilter:: _GenerateData( ) { - cpPlugins::Interface::Image* image = - this->GetInput< cpPlugins::Interface::Image >( "Input" ); + auto image = this->GetInputData< cpPlugins::Interface::Image >( "Input" ); if( image == NULL ) return( "BinaryThresholdImageFilter: No input image." ); @@ -80,8 +84,7 @@ _RealGD( itk::DataObject* image ) filter->Update( ); // Connect output - cpPlugins::Interface::Image* out = - this->GetOutput< cpPlugins::Interface::Image >( "Output" ); + auto out = this->GetOutputData< cpPlugins::Interface::Image >( "Output" ); if( out != NULL ) { out->SetITK< O >( filter->GetOutput( ) );