SigmaFilter3d
Performs an adaptive smoothing of a three-dimensional image by excluding any aberrant voxels of a local averaging.
Access to parameter description
For an introduction to image filters: see Images Filtering.
This algorithm computes a local mean from each voxel neighborhood values. Voxel values far from the considered voxel intensity Ic are excluded using a user threshold σ.
Only voxels verifying the following formula are kept for computation:
I∈[Ic−2σ,Ic+2σ] A user-defined population threshold allows the algorithm to switch between the formula above and a classical neighbor mean formula. This parameter avoids considering low populated neighborhoods for computation.
See also
Access to parameter description
For an introduction to image filters: see Images Filtering.
This algorithm computes a local mean from each voxel neighborhood values. Voxel values far from the considered voxel intensity Ic are excluded using a user threshold σ.
Only voxels verifying the following formula are kept for computation:
I∈[Ic−2σ,Ic+2σ] A user-defined population threshold allows the algorithm to switch between the formula above and a classical neighbor mean formula. This parameter avoids considering low populated neighborhoods for computation.
See also
Function Syntax
This function returns outputImage.
// Function prototype
std::shared_ptr< iolink::ImageView > sigmaFilter3d( std::shared_ptr< iolink::ImageView > inputImage, int32_t kernelSizeX, int32_t kernelSizeY, int32_t kernelSizeZ, double standardDeviation, int32_t populationThreshold, std::shared_ptr< iolink::ImageView > outputImage = NULL );
Class Syntax
Parameters
Parameter Name | Description | Type | Supported Values | Default Value | |
---|---|---|---|---|---|
![]() |
inputImage |
The input image. | Image | Binary, Label, Grayscale or Multispectral | nullptr |
![]() |
kernelSizeX |
The horizontal kernel size in voxels (odd value). | Int32 | [3, 100] | 3 |
![]() |
kernelSizeY |
The vertical kernel size in voxels (odd value). | Int32 | [3, 100] | 3 |
![]() |
kernelSizeZ |
The depth kernel size in voxels (odd value). | Int32 | [3, 100] | 3 |
![]() |
standardDeviation |
The intensity interval for retaining a voxel of the neighborhood. | Float64 | >0 | 20 |
![]() |
populationThreshold |
The population threshold. If the number of voxels selected by the formula is lower than this threshold, all voxels of the neighborhood are used for computing the mean. | Int32 | >=0 | 8 |
![]() |
outputImage |
The output image. Its dimensions, type, and calibration are forced to the same values as the input. | Image | nullptr |
Object Examples
auto foam = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam.vip" ); SigmaFilter3d sigmaFilter3dAlgo; sigmaFilter3dAlgo.setInputImage( foam ); sigmaFilter3dAlgo.setKernelSizeX( 3 ); sigmaFilter3dAlgo.setKernelSizeY( 3 ); sigmaFilter3dAlgo.setKernelSizeZ( 3 ); sigmaFilter3dAlgo.setStandardDeviation( 20.0 ); sigmaFilter3dAlgo.setPopulationThreshold( 8 ); sigmaFilter3dAlgo.execute(); std::cout << "outputImage:" << sigmaFilter3dAlgo.outputImage()->toString();
Function Examples
auto foam = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam.vip" ); auto result = sigmaFilter3d( foam, 3, 3, 3, 20.0, 8 ); std::cout << "outputImage:" << result->toString();