#include <ImageThresholdFilters/ImageToBoundingBoxFromThreshold.h>
-#include <cpPlugins/DataObjects/Image.h>
-#include <cpPlugins/DataObjects/Image_Demanglers.h>
-#include <cpPlugins/DataObjects/BoundingBox.h>
+#include <cpInstances/Image.h>
+#include <cpInstances/BoundingBox.h>
#include <itkImage.h>
#include <cpExtensions/Algorithms/ImageToBoundingBoxFromThreshold.h>
ImageToBoundingBoxFromThreshold( )
: Superclass( )
{
- typedef cpPlugins::DataObjects::Image _TImage;
- typedef cpPlugins::DataObjects::BoundingBox _TBBox;
+ typedef cpInstances::Image _TImage;
+ typedef cpInstances::BoundingBox _TBBox;
this->_ConfigureInput< _TImage >( "Input", true, false );
this->_ConfigureOutput< _TBBox >( "Output" );
+ this->m_Parameters.ConfigureAsUint( "PAD", 0 );
this->m_Parameters.ConfigureAsReal( "LowerThreshold", 0 );
this->m_Parameters.ConfigureAsReal( "UpperThreshold", 0 );
}
// Configure filter
_TFilter* filter = this->_CreateITK< _TFilter >( );
filter->SetImage( image );
+ filter->SetPAD( this->m_Parameters.GetUint( "PAD" ) );
filter->SetLowerThreshold( this->m_Parameters.GetReal( "LowerThreshold" ) );
filter->SetUpperThreshold( this->m_Parameters.GetReal( "UpperThreshold" ) );
filter->Compute( );
// Create output
auto reg = filter->GetRegion( );
- auto bb = this->GetOutput< cpPlugins::DataObjects::BoundingBox >( "Output" );
+ auto bb = this->GetOutput< cpInstances::BoundingBox >( "Output" );
typename _TImage::PointType p0, p1;
image->TransformIndexToPhysicalPoint( reg.GetIndex( ), p0 );
image->TransformIndexToPhysicalPoint( reg.GetIndex( ) + reg.GetSize( ), p1 );