BinarySmoothing3d
Transforms a binary three-dimensional image into another binary image with respect to the real local mean of each voxel neighborhood.
Access to parameter description
This algorithm computes a binary smoothing using a specified window size.
It consists of a two step procedure:
See also
Access to parameter description
This algorithm computes a binary smoothing using a specified window size.
It consists of a two step procedure:
- Computation of the local mean in the neighborhood, defined by the window size, considering foreground voxels with a value of 1 and background pixels with a value of 0.
- Thresholding of the result using the threshold parameter.
See also
Function Syntax
This function returns outputBinaryImage.
// Function prototype
std::shared_ptr< iolink::ImageView > binarySmoothing3d( std::shared_ptr< iolink::ImageView > inputBinaryImage, int32_t kernelRadiusX, int32_t kernelRadiusY, int32_t kernelRadiusZ, double threshold, std::shared_ptr< iolink::ImageView > outputBinaryImage = NULL );
Class Syntax
Parameters
Parameter Name | Description | Type | Supported Values | Default Value | |
---|---|---|---|---|---|
![]() |
inputBinaryImage |
The input binary image. | Image | Binary | nullptr |
![]() |
kernelRadiusX |
The kernel horizontal half length, in pixels. A value N produces a 2N+1 pixels length. | Int32 | >=1 | 3 |
![]() |
kernelRadiusY |
The kernel vertical half length, in pixels. A value N produces a 2N+1 pixels length. | Int32 | >=1 | 3 |
![]() |
kernelRadiusZ |
The kernel depth half length, in pixels. A value N produces a 2N+1 pixels length. | Int32 | >=1 | 3 |
![]() |
threshold |
The threshold value applied to the local mean (the minimum volume fraction in the window to set a pixel to 1). | Float64 | ]0, 1] | 0.5 |
![]() |
outputBinaryImage |
The output binary image. Its dimensions are forced to the same values as the input. | Image | nullptr |
Object Examples
auto foam_sep = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam_sep.vip" ); BinarySmoothing3d binarySmoothing3dAlgo; binarySmoothing3dAlgo.setInputBinaryImage( foam_sep ); binarySmoothing3dAlgo.setKernelRadiusX( 3 ); binarySmoothing3dAlgo.setKernelRadiusY( 3 ); binarySmoothing3dAlgo.setKernelRadiusZ( 3 ); binarySmoothing3dAlgo.setThreshold( 0.5 ); binarySmoothing3dAlgo.execute(); std::cout << "outputBinaryImage:" << binarySmoothing3dAlgo.outputBinaryImage()->toString();
Function Examples
auto foam_sep = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam_sep.vip" ); auto result = binarySmoothing3d( foam_sep, 3, 3, 3, 0.5 ); std::cout << "outputBinaryImage:" << result->toString();