1 #include <cpPluginsGenericFilters/JoinBoundingBoxes.h>
2 #include <cpPlugins/DataObject.h>
3 #include <cpPlugins/BoundingBox.h>
5 // -------------------------------------------------------------------------
6 cpPluginsGenericFilters::JoinBoundingBoxes::
10 this->_AddInput( "Input0" );
11 this->_AddInput( "Input1", false );
12 this->_AddInput( "Input2", false );
13 this->_AddInput( "Input3", false );
14 this->_AddInput( "Input4", false );
15 this->_AddInput( "Input5", false );
16 this->_AddOutput< cpPlugins::BoundingBox >( "Output" );
19 // -------------------------------------------------------------------------
20 cpPluginsGenericFilters::JoinBoundingBoxes::
25 // -------------------------------------------------------------------------
26 void cpPluginsGenericFilters::JoinBoundingBoxes::
29 typedef cpPlugins::DataObject _TDO;
30 typedef cpPlugins::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 ] );