SetSliceToVolume3d
Pastes a 2D image into a plane orthogonal to an axis of a 3D volume.
Access to parameter description
The SetSliceToVolume3d algorithm pastes a plane into a 3D image.
The 2D image must have dimensions consistent with the volume dimensions and the selected axis:
Selected AxisPlanegxsgysXYZgyvgzvYXZgxvgzvZXYgxvgyv Where (gxv,gyv,gzv) is the input volume size in voxels for the X, Y, and Z directions and (gxs,gys) is the input slice size in pixels for the X and Y directions.
An exception is thrown if the input slice dimensions are not in compliance with this rule.
See also
Access to parameter description
The SetSliceToVolume3d algorithm pastes a plane into a 3D image.
The 2D image must have dimensions consistent with the volume dimensions and the selected axis:
Selected AxisPlanegxsgysXYZgyvgzvYXZgxvgzvZXYgxvgyv Where (gxv,gyv,gzv) is the input volume size in voxels for the X, Y, and Z directions and (gxs,gys) is the input slice size in pixels for the X and Y directions.
An exception is thrown if the input slice dimensions are not in compliance with this rule.
See also
Function Syntax
This function returns outputImage.
// Function prototype
std::shared_ptr< iolink::ImageView > setSliceToVolume3d( std::shared_ptr< iolink::ImageView > inputDestinationImage, std::shared_ptr< iolink::ImageView > inputSourceImage, SetSliceToVolume3d::Axis axis, int32_t sliceIndex, std::shared_ptr< iolink::ImageView > outputImage = NULL );
Class Syntax
Parameters
Parameter Name | Description | Type | Supported Values | Default Value | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
inputDestinationImage |
The input 3D image (the volume where the slice is inserted). | Image | Binary, Label, Grayscale or Multispectral | nullptr | ||||||
![]() |
inputSourceImage |
The input 2D image (the slice to insert). | Image | Binary, Label, Grayscale or Multispectral | nullptr | ||||||
![]() |
axis |
The axis orthogonal to the plane to set.
|
Enumeration | Z_AXIS | |||||||
![]() |
sliceIndex |
The axis index where to insert the slice. | Int32 | >=0 | 1 | ||||||
![]() |
outputImage |
The output image. | Image | nullptr |
Object Examples
auto foam = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam.vip" ); auto foam_2d = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam_2d.vip" ); SetSliceToVolume3d setSliceToVolume3dAlgo; setSliceToVolume3dAlgo.setInputDestinationImage( foam ); setSliceToVolume3dAlgo.setInputSourceImage( foam_2d ); setSliceToVolume3dAlgo.setAxis( SetSliceToVolume3d::Axis::Z_AXIS ); setSliceToVolume3dAlgo.setSliceIndex( 1 ); setSliceToVolume3dAlgo.execute(); std::cout << "outputImage:" << setSliceToVolume3dAlgo.outputImage()->toString();
Function Examples
auto foam = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam.vip" ); auto foam_2d = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam_2d.vip" ); auto result = setSliceToVolume3d( foam, foam_2d, SetSliceToVolume3d::Axis::Z_AXIS, 1 ); std::cout << "outputImage:" << result->toString();