- // Connect output (and correct its type)
- auto name = this->GetOutput< _TDataObject >( "Output" )->GetName( );
- this->_MakeOutput< _TImage >( "Output" );
- _TImage* out = this->GetOutput< _TImage >( "Output" );
- if( out != NULL )
+ // Get output names
+ auto pos_name = this->GetOutput< _TObj >( "PositiveOutput" )->GetName( );
+ auto neg_name = this->GetOutput< _TObj >( "NegativeOutput" )->GetName( );
+
+ // Connect outputs (and correct their types and names)
+ _TImage* pos_out = this->GetOutput< _TImage >( "PositiveOutput" );
+ if( pos_out == NULL )
+ {
+ this->_MakeOutput< _TImage >( "PositiveOutput" );
+ pos_out = this->GetOutput< _TImage >( "PositiveOutput" );
+ pos_out->SetName( pos_name );
+
+ } // fi
+ _TImage* neg_out = this->GetOutput< _TImage >( "NegativeOutput" );
+ if( neg_out == NULL )