Loading [MathJax]/extensions/MathMenu.js
ImageDev

FloodFillThreshold3d

Transforms a grayscale three-dimensional image into a binary image by performing a region growing from a seed.

Access to parameter description

For an introduction: This algorithm performs a so-called region growing on a 3D image. Starting from a voxel seed, the algorithm selects the largest connected area that contains the voxel itself and all voxels with gray values lying inside an input range.
The input range is specified with the thresholdRange parameter.

This algorithm can be used to implement, for instance, an interactive magic wand tool.

See also

Function Syntax

This function returns the outputBinaryImage output parameter.
// Function prototype.
std::shared_ptr< iolink::ImageView >
floodFillThreshold3d( std::shared_ptr< iolink::ImageView > inputImage,
                      iolink::Vector3i32 seedPoint,
                      iolink::Vector2d thresholdRange,
                      std::shared_ptr< iolink::ImageView > outputBinaryImage = NULL );

Class Syntax

Parameters

Class Name FloodFillThreshold3d

Parameter Name Description Type Supported Values Default Value
input
inputImage
The input grayscale image. Image Binary, Label or Grayscale nullptr
input
seedPoint
The seed point coordinates. Vector3i32 >=0 {1, 1, 1}
input
thresholdRange
The low and high threshold levels defining the input range. Vector2d Any value {128.f, 255.f}
output
outputBinaryImage
The output binary image. Its dimensions are forced to the same values as the input image. Image nullptr

Object Examples

auto foam = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam.vip" );

FloodFillThreshold3d floodFillThreshold3dAlgo;
floodFillThreshold3dAlgo.setInputImage( foam );
floodFillThreshold3dAlgo.setSeedPoint( {1, 1, 1} );
floodFillThreshold3dAlgo.setThresholdRange( {128.0, 255.0} );
floodFillThreshold3dAlgo.execute();

std::cout << "outputBinaryImage:" << floodFillThreshold3dAlgo.outputBinaryImage()->toString();

Function Examples

auto foam = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam.vip" );

auto result = floodFillThreshold3d( foam, {1, 1, 1}, {128.0, 255.0} );

std::cout << "outputBinaryImage:" << result->toString();