Loading [MathJax]/jax/output/CommonHTML/jax.js
ImageDev

PasteImage3d

Pastes a three-dimensional image into another at a given location.

Access to parameter description

PasteImage3d pastes an area contained in an input image I at a user-defined location of an output image O.
If the input image does not entirely fit into the output image at the given location, only the intersecting area is pasted, and no exception occurs.

See also

Function Syntax

This function returns outputImage.
// Function prototype
std::shared_ptr< iolink::ImageView > pasteImage3d( std::shared_ptr< iolink::ImageView > inputSource, std::shared_ptr< iolink::ImageView > inputDestination, iolink::Vector3i32 originSource, iolink::Vector3i32 originDestination, iolink::Vector3u32 areaSize, std::shared_ptr< iolink::ImageView > outputImage = NULL );

Class Syntax

Parameters

Parameter Name Description Type Supported Values Default Value
input
inputSource
The input source image to be pasted in the destination image. Image Binary, Label, Grayscale or Multispectral nullptr
input
inputDestination
The input destination image. Image Binary, Label, Grayscale or Multispectral nullptr
input
originSource
The origin of the region to select in the source image, expressed in voxel coordinates. If the value is set outside the image, nothing is done. Vector3i32 Any value {0, 0, 0}
input
originDestination
The origin of the region to paste in the destination image, expressed in voxel coordinates. If the value is set outside the image, nothing is done. Vector3i32 Any value {0, 0, 0}
input
areaSize
The size of the region to select, in voxels.
If this value is set to (0, 0, 0), the full size of the source image is used. Only source voxels lying in the overlap between both input images (after translation of the source) are pasted in the destination.
Vector3u32 Any value {0, 0, 0}
output
outputImage
The output image where the input image is pasted. Its dimensions and type are forced to the same values as the destination input image. Image nullptr

Object Examples

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

PasteImage3d pasteImage3dAlgo;
pasteImage3dAlgo.setInputSource( foam );
pasteImage3dAlgo.setInputDestination( foam );
pasteImage3dAlgo.setOriginSource( {0, 0, 0} );
pasteImage3dAlgo.setOriginDestination( {10, 10, 10} );
pasteImage3dAlgo.setAreaSize( {100, 100, 100} );
pasteImage3dAlgo.execute();

std::cout << "outputImage:" << pasteImage3dAlgo.outputImage()->toString();

Function Examples

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

auto result = pasteImage3d( foam, foam, {0, 0, 0}, {10, 10, 10}, {100, 100, 100} );

std::cout << "outputImage:" << result->toString();