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.
// Command constructor.SetSliceToVolume3d();/// Gets the inputDestinationImage parameter./// The input 3D image (the volume where the slice is inserted).
std::shared_ptr< iolink::ImageView> inputDestinationImage()const;/// Sets the inputDestinationImage parameter./// The input 3D image (the volume where the slice is inserted).void setInputDestinationImage( std::shared_ptr< iolink::ImageView> inputDestinationImage );/// Gets the inputSourceImage parameter./// The input 2D image (the slice to insert).
std::shared_ptr< iolink::ImageView> inputSourceImage()const;/// Sets the inputSourceImage parameter./// The input 2D image (the slice to insert).void setInputSourceImage( std::shared_ptr< iolink::ImageView> inputSourceImage );/// Gets the axis parameter./// The axis orthogonal to the plane to set.SetSliceToVolume3d::Axis axis()const;/// Sets the axis parameter./// The axis orthogonal to the plane to set.void setAxis(constSetSliceToVolume3d::Axis& axis );/// Gets the sliceIndex parameter./// The axis index where to insert the slice.int32_t sliceIndex()const;/// Sets the sliceIndex parameter./// The axis index where to insert the slice.void setSliceIndex(constint32_t& sliceIndex );/// Gets the outputImage parameter./// The output image.
std::shared_ptr< iolink::ImageView> outputImage()const;/// Sets the outputImage parameter./// The output image.void setOutputImage( std::shared_ptr< iolink::ImageView> outputImage );// Method to launch the command.void execute();
# Property of the inputDestinationImage parameter.SetSliceToVolume3d.input_destination_image
# Property of the inputSourceImage parameter.SetSliceToVolume3d.input_source_image
# Property of the axis parameter.SetSliceToVolume3d.axis
# Property of the sliceIndex parameter.SetSliceToVolume3d.slice_index
# Property of the outputImage parameter.SetSliceToVolume3d.output_image
// Method to launch the command.
execute()
// Command constructor.SetSliceToVolume3d()// Property of the inputDestinationImage parameter.SetSliceToVolume3d.inputDestinationImage
// Property of the inputSourceImage parameter.SetSliceToVolume3d.inputSourceImage
// Property of the axis parameter.SetSliceToVolume3d.axis
// Property of the sliceIndex parameter.SetSliceToVolume3d.sliceIndex
// Property of the outputImage parameter.SetSliceToVolume3d.outputImage
// Method to launch the command.Execute()
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.
X_AXIS
This mode sets the input plane orthogonal to X axis.
Y_AXIS
This mode sets the input plane orthogonal to Y axis.
Z_AXIS
This mode sets the input plane orthogonal to Z axis.
Enumeration
Z_AXIS
sliceIndex
The axis index where to insert the slice.
Int32
>=0
1
outputImage
The output image.
Image
nullptr
Parameter Name
Description
Type
Supported Values
Default Value
input_destination_image
The input 3D image (the volume where the slice is inserted).
image
Binary, Label, Grayscale or Multispectral
None
input_source_image
The input 2D image (the slice to insert).
image
Binary, Label, Grayscale or Multispectral
None
axis
The axis orthogonal to the plane to set.
X_AXIS
This mode sets the input plane orthogonal to X axis.
Y_AXIS
This mode sets the input plane orthogonal to Y axis.
Z_AXIS
This mode sets the input plane orthogonal to Z axis.
enumeration
Z_AXIS
slice_index
The axis index where to insert the slice.
int32
>=0
1
output_image
The output image.
image
None
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
null
inputSourceImage
The input 2D image (the slice to insert).
Image
Binary, Label, Grayscale or Multispectral
null
axis
The axis orthogonal to the plane to set.
X_AXIS
This mode sets the input plane orthogonal to X axis.
Y_AXIS
This mode sets the input plane orthogonal to Y axis.
Z_AXIS
This mode sets the input plane orthogonal to Z axis.