This algorithm implements the Symmetric Nearest Neighbor filter (SNN), which is an average filter weighted
by the structural symmetry of a rectangular neighborhood window. It computes a local mean around a central
voxel x, considering for each neighbor voxel y, having a gray level I(y), the value given by:
I′(y)={I(y)if |I(x)−I(y)|<|I(x)−I(ys)|I(ys)if |I(x)−I(y)|>|I(x)−I(ys)|I(x)otherwise
Where ys is the neighbor voxel symmetric to y with respect to x.
The output value of the voxel x is then given by:
O(x)=μ[I′(y)]
Where μ is the mean value of the local window.
// Command constructor.SnnFilter3d();/// Gets the inputImage parameter./// The input image.
std::shared_ptr< iolink::ImageView> inputImage()const;/// Sets the inputImage parameter./// The input image.void setInputImage( std::shared_ptr< iolink::ImageView> inputImage );/// Gets the kernelSizeX parameter./// The horizontal kernel size in voxels (odd value).int32_t kernelSizeX()const;/// Sets the kernelSizeX parameter./// The horizontal kernel size in voxels (odd value).void setKernelSizeX(constint32_t& kernelSizeX );/// Gets the kernelSizeY parameter./// The vertical kernel size in voxels (odd value).int32_t kernelSizeY()const;/// Sets the kernelSizeY parameter./// The vertical kernel size in voxels (odd value).void setKernelSizeY(constint32_t& kernelSizeY );/// Gets the kernelSizeZ parameter./// The depth kernel size in voxels (odd value).int32_t kernelSizeZ()const;/// Sets the kernelSizeZ parameter./// The depth kernel size in voxels (odd value).void setKernelSizeZ(constint32_t& kernelSizeZ );/// Gets the outputImage parameter./// The output image. Its dimensions, type, and calibration are forced to the same values as the input.
std::shared_ptr< iolink::ImageView> outputImage()const;/// Sets the outputImage parameter./// The output image. Its dimensions, type, and calibration are forced to the same values as the input.void setOutputImage( std::shared_ptr< iolink::ImageView> outputImage );// Method to launch the command.void execute();
# Property of the inputImage parameter.SnnFilter3d.input_image
# Property of the kernelSizeX parameter.SnnFilter3d.kernel_size_x
# Property of the kernelSizeY parameter.SnnFilter3d.kernel_size_y
# Property of the kernelSizeZ parameter.SnnFilter3d.kernel_size_z
# Property of the outputImage parameter.SnnFilter3d.output_image
// Method to launch the command.
execute()
// Command constructor.SnnFilter3d()// Property of the inputImage parameter.SnnFilter3d.inputImage
// Property of the kernelSizeX parameter.SnnFilter3d.kernelSizeX
// Property of the kernelSizeY parameter.SnnFilter3d.kernelSizeY
// Property of the kernelSizeZ parameter.SnnFilter3d.kernelSizeZ
// Property of the outputImage parameter.SnnFilter3d.outputImage
// Method to launch the command.Execute()
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
outputImage
The output image. Its dimensions, type, and calibration are forced to the same values as the input.
Image
nullptr
Parameter Name
Description
Type
Supported Values
Default Value
input_image
The input image.
image
Binary, Label, Grayscale or Multispectral
None
kernel_size_x
The horizontal kernel size in voxels (odd value).
int32
[3, 100]
3
kernel_size_y
The vertical kernel size in voxels (odd value).
int32
[3, 100]
3
kernel_size_z
The depth kernel size in voxels (odd value).
int32
[3, 100]
3
output_image
The output image. Its dimensions, type, and calibration are forced to the same values as the input.
image
None
Parameter Name
Description
Type
Supported Values
Default Value
inputImage
The input image.
Image
Binary, Label, Grayscale or Multispectral
null
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
outputImage
The output image. Its dimensions, type, and calibration are forced to the same values as the input.