#include #include #include // ------------------------------------------------------------------------- cpPluginsGenericFilters::JoinBoundingBoxes:: JoinBoundingBoxes( ) : Superclass( ) { this->_ConfigureInput( "Input0", true, false ); this->_ConfigureInput( "Input1", false, false ); this->_ConfigureInput( "Input2", false, false ); this->_ConfigureInput( "Input3", false, false ); this->_ConfigureInput( "Input4", false, false ); this->_ConfigureInput( "Input5", false, false ); this->_ConfigureOutput< cpPlugins::DataObjects::BoundingBox >( "Output" ); } // ------------------------------------------------------------------------- cpPluginsGenericFilters::JoinBoundingBoxes:: ~JoinBoundingBoxes( ) { } // ------------------------------------------------------------------------- void cpPluginsGenericFilters::JoinBoundingBoxes:: _GenerateData( ) { typedef cpPlugins::BaseObjects::DataObject _TDO; typedef cpPlugins::DataObjects::BoundingBox _TBB; _TDO* dobjs[ 5 ]; auto do0 = dynamic_cast< _TDO* >( this->GetInput( "Input0" ) ); dobjs[ 0 ] = dynamic_cast< _TDO* >( this->GetInput( "Input1" ) ); dobjs[ 1 ] = dynamic_cast< _TDO* >( this->GetInput( "Input2" ) ); dobjs[ 2 ] = dynamic_cast< _TDO* >( this->GetInput( "Input3" ) ); dobjs[ 3 ] = dynamic_cast< _TDO* >( this->GetInput( "Input4" ) ); dobjs[ 4 ] = dynamic_cast< _TDO* >( this->GetInput( "Input5" ) ); auto out = dynamic_cast< _TBB* >( this->GetOutput( "Output" ) ); out->SetDataObject( do0 ); for( unsigned int d = 0; d < 5; ++d ) { if( dobjs[ d ] != NULL ) { _TBB::Pointer bb = _TBB::New( ); bb->SetDataObject( dobjs[ d ] ); out->Blend( bb ); } // fi } // rof } // eof - $RCSfile$