ImageDev

WriteVipImage

Saves any image that has been generated with ImageDev on disk.

Access to parameter description

For an introduction: section Image Access

This algorithm saves an ImageView into a disk file. This file is written in the VIP format, which is a raw format designed to support any image generated by ImageDev. VIP image files generally have the vip extension.

See also

Function Syntax

This function returns None.
// Function prototype
void writeVipImage( std::shared_ptr< iolink::ImageView > inputImage, std::string filePath, bool overwrite, bool autoDetermineBestVersion, uint32_t fileFormatVersion );
This function returns None.
// Function prototype.
write_vip_image( input_image,
                 file_path = "",
                 overwrite = False,
                 auto_determine_best_version = True,
                 file_format_version = 5 )
This function returns None.
// Function prototype.
public static void
WriteVipImage( IOLink.ImageView inputImage,
               String filePath = "",
               bool overwrite = false,
               bool autoDetermineBestVersion = true,
               UInt32 fileFormatVersion = 5 );

Class Syntax

Parameters

Class Name WriteVipImage

Parameter Name Description Type Supported Values Default Value
input
inputImage
The input image to save on disk. Image Binary, Label, Grayscale or Multispectral nullptr
input
filePath
The path of the image file to save. Its recommended extension is ".vip". String ""
input
overwrite
The decision to take if the file already exists. If true, an existing file is overwritten. If false, an exeption is thrown when the output file already exists. Bool false
input
autoDetermineBestVersion
The way to tag the VIP format version in the file. If true, the version is automatically identified. Bool true
input
fileFormatVersion
The VIP format version in the file to indicate in the file. This parameter is ignored if the autoDetermineBestVersion parameter is true. UInt32 <=5 5

Object Examples

std::shared_ptr< iolink::ImageView > polystyrene = ioformat::readImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "polystyrene.tif" );

WriteVipImage writeVipImageAlgo;
writeVipImageAlgo.setInputImage( polystyrene );
writeVipImageAlgo.setFilePath( "output_writeVipImage.vip" );
writeVipImageAlgo.setOverwrite( true );
writeVipImageAlgo.setAutoDetermineBestVersion( true );
writeVipImageAlgo.setFileFormatVersion( 2 );
writeVipImageAlgo.execute();
polystyrene = ioformat.read_image(imagedev_data.get_image_path("polystyrene.tif"))

write_vip_image_algo = imagedev.WriteVipImage()
write_vip_image_algo.input_image = polystyrene
write_vip_image_algo.file_path = "output_writeVipImage.vip"
write_vip_image_algo.overwrite = True
write_vip_image_algo.auto_determine_best_version = True
write_vip_image_algo.file_format_version = 2
write_vip_image_algo.execute()
ImageView polystyrene = ViewIO.ReadImage( @"Data/images/polystyrene.tif" );

WriteVipImage writeVipImageAlgo = new WriteVipImage
{
    inputImage = polystyrene,
    filePath = "output_writeVipImage.vip",
    overwrite = true,
    autoDetermineBestVersion = true,
    fileFormatVersion = 2
};
writeVipImageAlgo.Execute();

Function Examples

std::shared_ptr< iolink::ImageView > polystyrene = ioformat::readImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "polystyrene.tif" );

writeVipImage( polystyrene, "output_writeVipImage.vip", true, true, 2 );
polystyrene = ioformat.read_image(imagedev_data.get_image_path("polystyrene.tif"))

imagedev.write_vip_image( polystyrene, "output_writeVipImage.vip", True, True, 2 )
ImageView polystyrene = ViewIO.ReadImage( @"Data/images/polystyrene.tif" );

Data.WriteVipImage( polystyrene, "output_writeVipImage.vip", true, true, 2 );