BinaryThresholdImageFilter( )
: Superclass( )
{
- this->SetNumberOfInputs( 1 );
- this->SetNumberOfOutputs( 1 );
- this->_MakeOutput< cpPlugins::Interface::Image >( 0 );
+ this->_AddInput( "Input" );
+ this->_MakeOutput< cpPlugins::Interface::Image >( "Output" );
this->m_Parameters->ConfigureAsReal( "LowerThresholdValue", 0 );
- this->m_Parameters->ConfigureAsReal( "UpperThresholdValue", 0 );
- this->m_Parameters->ConfigureAsUint( "InsideValue", 255 );
- this->m_Parameters->ConfigureAsUint( "OutsideValue", 1 );
+ this->m_Parameters->ConfigureAsReal( "UpperThresholdValue", 10000 );
+ this->m_Parameters->ConfigureAsUint( "InsideValue", 1 );
+ this->m_Parameters->ConfigureAsUint( "OutsideValue", 0 );
}
// -------------------------------------------------------------------------
_GenerateData( )
{
cpPlugins::Interface::Image* image =
- this->GetInput< cpPlugins::Interface::Image >( 0 );
+ this->GetInput< cpPlugins::Interface::Image >( "Input" );
if( image == NULL )
return( "BinaryThresholdImageFilter: No input image." );
// Get parameters
//unsigned int bins =
// this->m_Parameters.GetValueAsUint( "NumberOfHistogramBins" );
- _IP lower_val = _IP( this->m_Parameters->GetReal( "LowerValue" ) );
- _IP upper_val = _IP( this->m_Parameters->GetReal( "UpperValue" ) );
+ _IP lower_val = _IP( this->m_Parameters->GetReal( "LowerThresholdValue" ) );
+ _IP upper_val = _IP( this->m_Parameters->GetReal( "UpperThresholdValue" ) );
_OP in_val = _OP( this->m_Parameters->GetUint( "InsideValue" ) );
_OP out_val = _OP( this->m_Parameters->GetUint( "OutsideValue" ) );
// Connect output
cpPlugins::Interface::Image* out =
- this->GetOutput< cpPlugins::Interface::Image >( 0 );
+ this->GetOutput< cpPlugins::Interface::Image >( "Output" );
if( out != NULL )
{
out->SetITK< O >( filter->GetOutput( ) );