1 #include <plugins/GenericFilters/JoinBoundingBoxes.h>
2 #include <cpPlugins/BaseObjects/DataObject.h>
3 #include <cpPlugins/DataObjects/BoundingBox.h>
5 // -------------------------------------------------------------------------
6 cpPluginsGenericFilters::JoinBoundingBoxes::
10 this->_ConfigureInput( "Input0", true, false );
11 this->_ConfigureInput( "Input1", false, false );
12 this->_ConfigureInput( "Input2", false, false );
13 this->_ConfigureInput( "Input3", false, false );
14 this->_ConfigureInput( "Input4", false, false );
15 this->_ConfigureInput( "Input5", false, false );
16 this->_ConfigureOutput< cpPlugins::DataObjects::BoundingBox >( "Output" );
19 // -------------------------------------------------------------------------
20 cpPluginsGenericFilters::JoinBoundingBoxes::
25 // -------------------------------------------------------------------------
26 void cpPluginsGenericFilters::JoinBoundingBoxes::
29 typedef cpPlugins::BaseObjects::DataObject _TDO;
30 typedef cpPlugins::DataObjects::BoundingBox _TBB;
33 auto do0 = dynamic_cast< _TDO* >( this->GetInput( "Input0" ) );
34 dobjs[ 0 ] = dynamic_cast< _TDO* >( this->GetInput( "Input1" ) );
35 dobjs[ 1 ] = dynamic_cast< _TDO* >( this->GetInput( "Input2" ) );
36 dobjs[ 2 ] = dynamic_cast< _TDO* >( this->GetInput( "Input3" ) );
37 dobjs[ 3 ] = dynamic_cast< _TDO* >( this->GetInput( "Input4" ) );
38 dobjs[ 4 ] = dynamic_cast< _TDO* >( this->GetInput( "Input5" ) );
39 auto out = dynamic_cast< _TBB* >( this->GetOutput( "Output" ) );
41 out->SetDataObject( do0 );
42 for( unsigned int d = 0; d < 5; ++d )
44 if( dobjs[ d ] != NULL )
46 _TBB::Pointer bb = _TBB::New( );
47 bb->SetDataObject( dobjs[ d ] );