ImageDev

CopyImage

Generates a copy of an image (a new image with same size, type and contents).

Access to parameter description

CopyImage copies an image into another image. If the output image does not exist, it is created. If the output image already exists, it is replaced by the copy and the previous image of that name is lost.

See also

Function Syntax

This function returns the outputImage output parameter.
// Function prototype.
std::shared_ptr< iolink::ImageView >
copyImage( std::shared_ptr< iolink::ImageView > inputImage, std::shared_ptr< iolink::ImageView > outputImage = NULL );
This function returns the outputImage output parameter.
// Function prototype.
copy_image( input_image, output_image = None )
This function returns the outputImage output parameter.
// Function prototype.
public static IOLink.ImageView
CopyImage( IOLink.ImageView inputImage, IOLink.ImageView outputImage = null );

Class Syntax

Parameters

Class Name CopyImage

Parameter Name Description Type Supported Values Default Value
input
inputImage
The input image. Image Binary, Label, Grayscale or Multispectral nullptr
output
outputImage
The output image. The output image size and type are forced to the same values as the input. Image nullptr

Object Examples

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

CopyImage copyImageAlgo;
copyImageAlgo.setInputImage( foam );
copyImageAlgo.execute();

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

copy_image_algo = imagedev.CopyImage()
copy_image_algo.input_image = foam
copy_image_algo.execute()

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

CopyImage copyImageAlgo = new CopyImage
{
    inputImage = foam
};
copyImageAlgo.Execute();

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

Function Examples

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

auto result = copyImage( foam );

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

result = imagedev.copy_image( foam )

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

IOLink.ImageView result = Processing.CopyImage( foam );

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