#include <string>
#include <tclap/CmdLine.h>
+#include <itkBinaryThresholdImageFilter.h>
#include <itkImage.h>
#include <fpa/Filters/Image/RandomWalker.h>
#include <fpa/Functors/Dijkstra/Image/Gaussian.h>
double t = CTBronchi::MeasureTime( filter );
std::cout << "FastRandomWalk executed in " << t << " s" << std::endl;
+ // Extract label
+ typedef itk::BinaryThresholdImageFilter< TLabels, TLabels > _TExtract;
+ typename _TExtract::Pointer extract = _TExtract::New( );
+ extract->SetInput( filter->GetOutputLabels( ) );
+ extract->SetInsideValue( 1 );
+ extract->SetOutsideValue( 0 );
+ extract->SetLowerThreshold( 1 );
+ extract->SetUpperThreshold( 1 );
+ t = CTBronchi::MeasureTime( extract );
+ std::cout << "Extract labels executed in " << t << " s" << std::endl;
+
// Write result
- CTBronchi::WriteImage( filter->GetOutputLabels( ), out.getValue( ) );
+ CTBronchi::WriteImage( extract->GetOutput( ), out.getValue( ) );
}
catch( std::exception& err )
{