1 #include <GenericFilters/JoinBoundingBoxes.h>
2 #include <cpPlugins/BaseObjects/DataObject.h>
3 #include <cpPlugins/DataObjects/BoundingBox.h>
5 // -------------------------------------------------------------------------
6 cpPluginsGenericFilters::JoinBoundingBoxes::
10 this->_ConfigureInput( "Inputs", true, true );
11 this->_ConfigureOutput< cpPlugins::DataObjects::BoundingBox >( "Output" );
14 // -------------------------------------------------------------------------
15 cpPluginsGenericFilters::JoinBoundingBoxes::
20 // -------------------------------------------------------------------------
21 void cpPluginsGenericFilters::JoinBoundingBoxes::
24 typedef cpPlugins::BaseObjects::DataObject _TDO;
25 typedef cpPlugins::DataObjects::BoundingBox _TBB;
27 auto out = dynamic_cast< _TBB* >( this->GetOutput( "Output" ) );
28 unsigned int nInputs = this->GetInputSize( "Inputs" );
29 for( unsigned int i = 0; i < nInputs; ++i )
31 auto in = dynamic_cast< _TDO* >( this->GetInput( "Inputs", i ) );
34 _TBB::Pointer bb = _TBB::New( );
35 bb->SetDataObject( in );
39 out->SetDataObject( in );