ImageDev

ResetImage

Sets all intensity values of the input image to a same constant value.

Access to parameter description

The output image is initialized with the same size, data type, and interpretation as the input image. It is filled with a user-defined padding value. No exception is thrown if this value is not compatible with the image type. The overflows are not managed, the padding value is masked by the input image data type.
See also
See related example

Function Syntax

This function returns outputImage.
// Function prototype
std::shared_ptr< iolink::ImageView > resetImage( std::shared_ptr< iolink::ImageView > inputImage, double paddingValue, std::shared_ptr< iolink::ImageView > outputImage = NULL );
This function returns outputImage.
// Function prototype.
reset_image( input_image, padding_value = 0, output_image = None )
This function returns outputImage.
// Function prototype.
public static IOLink.ImageView
ResetImage( IOLink.ImageView inputImage,
            double paddingValue = 0,
            IOLink.ImageView outputImage = null );

Class Syntax

Parameters

Class Name ResetImage

Parameter Name Description Type Supported Values Default Value
input
inputImage
The input image. Image Binary, Label, Grayscale or Multispectral nullptr
input
paddingValue
The reset intensity value. Float64 Any value 0
output
outputImage
The output image. Image nullptr

Object Examples

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

ResetImage resetImageAlgo;
resetImageAlgo.setInputImage( foam );
resetImageAlgo.setPaddingValue( 0.0 );
resetImageAlgo.execute();

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

reset_image_algo = imagedev.ResetImage()
reset_image_algo.input_image = foam
reset_image_algo.padding_value = 0.0
reset_image_algo.execute()

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

ResetImage resetImageAlgo = new ResetImage
{
    inputImage = foam,
    paddingValue = 0.0
};
resetImageAlgo.Execute();

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

Function Examples

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

auto result = resetImage( foam, 0.0 );

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

result = imagedev.reset_image( foam, 0.0 )

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

IOLink.ImageView result = Processing.ResetImage( foam, 0.0 );

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