ImageDev

EnergyFilter3d

Computes, for each voxel of a three-dimensional image, the energy value of its neighborhood.

Access to parameter description

For an introduction: This algorithm replaces each voxel of the output image by the energy value of its neighborhood in the input image. The energy operator is given by: $$ energy=\sum_{n}p(n)^2 $$ The shape of the neighborhood can be: See also

Function Syntax

This function returns outputImage.
// Function prototype
std::shared_ptr< iolink::ImageView > energyFilter3d( std::shared_ptr< iolink::ImageView > inputImage, EnergyFilter3d::KernelShape kernelShape, uint32_t kernelRadius, std::shared_ptr< iolink::ImageView > outputImage = NULL );
This function returns outputImage.
// Function prototype.
energy_filter_3d( input_image,
                  kernel_shape = EnergyFilter3d.KernelShape.BALL,
                  kernel_radius = 3,
                  output_image = None )
This function returns outputImage.
// Function prototype.
public static IOLink.ImageView
EnergyFilter3d( IOLink.ImageView inputImage,
                EnergyFilter3d.KernelShape kernelShape = ImageDev.EnergyFilter3d.KernelShape.BALL,
                UInt32 kernelRadius = 3,
                IOLink.ImageView outputImage = null );

Class Syntax

Parameters

Class Name EnergyFilter3d

Parameter Name Description Type Supported Values Default Value
input
inputImage
The input image. Image Binary, Label, Grayscale or Multispectral nullptr
input
kernelRadius
The kernel half side length or radius, in voxels. In case of a cube, a value N produces a cube window of 2N+1 voxels side length. In case of a ball, a value N produces a ball with a 2N+1 voxels diameter. UInt32 >=1 3
input
kernelShape
The shape of the window defining the neighborhood.
CUBE The sliding window is a cube.
BALL The sliding window is a ball.
Enumeration BALL
output
outputImage
The output image. Its dimensions are forced to the same values as the input. Its data type is forced to floating point. Image nullptr

Object Examples

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

EnergyFilter3d energyFilter3dAlgo;
energyFilter3dAlgo.setInputImage( foam_sep );
energyFilter3dAlgo.setKernelShape( EnergyFilter3d::KernelShape::CUBE );
energyFilter3dAlgo.setKernelRadius( 3 );
energyFilter3dAlgo.execute();

std::cout << "outputImage:" << energyFilter3dAlgo.outputImage()->toString();
foam_sep = imagedev.read_vip_image(imagedev_data.get_image_path("foam_sep.vip"))

energy_filter_3d_algo = imagedev.EnergyFilter3d()
energy_filter_3d_algo.input_image = foam_sep
energy_filter_3d_algo.kernel_shape = imagedev.EnergyFilter3d.CUBE
energy_filter_3d_algo.kernel_radius = 3
energy_filter_3d_algo.execute()

print( "output_image:", str( energy_filter_3d_algo.output_image ) )
ImageView foam_sep = Data.ReadVipImage( @"Data/images/foam_sep.vip" );

EnergyFilter3d energyFilter3dAlgo = new EnergyFilter3d
{
    inputImage = foam_sep,
    kernelShape = EnergyFilter3d.KernelShape.CUBE,
    kernelRadius = 3
};
energyFilter3dAlgo.Execute();

Console.WriteLine( "outputImage:" + energyFilter3dAlgo.outputImage.ToString() );

Function Examples

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

auto result = energyFilter3d( foam_sep, EnergyFilter3d::KernelShape::CUBE, 3 );

std::cout << "outputImage:" << result->toString();
foam_sep = imagedev.read_vip_image(imagedev_data.get_image_path("foam_sep.vip"))

result = imagedev.energy_filter_3d( foam_sep, imagedev.EnergyFilter3d.CUBE, 3 )

print( "output_image:", str( result ) )
ImageView foam_sep = Data.ReadVipImage( @"Data/images/foam_sep.vip" );

IOLink.ImageView result = Processing.EnergyFilter3d( foam_sep, EnergyFilter3d.KernelShape.CUBE, 3 );

Console.WriteLine( "outputImage:" + result.ToString() );