X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=plugins%2FImageThresholdFilters%2FImageToBoundingBoxFromThreshold.cxx;h=f472c47001b16843c12132479bf3ea8e7ed774b8;hb=8d542556415c0f37a325b1641bb51b2bc284a115;hp=4b86d54fc8a80dcdcc67c9c9523e1adc8a4614d8;hpb=9b11582dc5062474361432e46838c4e790c21f10;p=cpPlugins.git diff --git a/plugins/ImageThresholdFilters/ImageToBoundingBoxFromThreshold.cxx b/plugins/ImageThresholdFilters/ImageToBoundingBoxFromThreshold.cxx index 4b86d54..f472c47 100644 --- a/plugins/ImageThresholdFilters/ImageToBoundingBoxFromThreshold.cxx +++ b/plugins/ImageThresholdFilters/ImageToBoundingBoxFromThreshold.cxx @@ -1,7 +1,6 @@ #include -#include -#include -#include +#include +#include #include #include @@ -11,12 +10,13 @@ cpPluginsImageThresholdFilters::ImageToBoundingBoxFromThreshold:: 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 ); } @@ -48,13 +48,14 @@ _GD0( _TImage* image ) // 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 );