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
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.
- Setting the padding value to 258 on an 8-bit unsigned integer image reset it to 2.
- Setting any other value than 0 on a binary image reset it to 1.
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 = nullptr );
This function returns outputImage.
// Function prototype. reset_image(input_image: idt.ImageType, padding_value: float = 0, output_image: idt.ImageType = None) -> idt.ImageType
This function returns outputImage.
// Function prototype. public static IOLink.ImageView ResetImage( IOLink.ImageView inputImage, double paddingValue = 0, 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 | |
paddingValue |
The reset intensity value. | Float64 | Any value | 0 | |
outputImage |
The output image. | Image | nullptr |
Parameter Name | Description | Type | Supported Values | Default Value | |
---|---|---|---|---|---|
input_image |
The input image. | image | Binary, Label, Grayscale or Multispectral | None | |
padding_value |
The reset intensity value. | float64 | Any value | 0 | |
output_image |
The output image. | image | None |
Parameter Name | Description | Type | Supported Values | Default Value | |
---|---|---|---|---|---|
inputImage |
The input image. | Image | Binary, Label, Grayscale or Multispectral | null | |
paddingValue |
The reset intensity value. | Float64 | Any value | 0 | |
outputImage |
The output image. | Image | null |
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() );