ImageDev

TransposeImage3d

Swaps coordinates of a three-dimensional image.

Access to parameter description

This algorithm performs a transposition of the image grid along the X, Y, or Z axis.

See also

Function Syntax

This function returns outputImage.
// Function prototype
std::shared_ptr< iolink::ImageView > transposeImage3d( std::shared_ptr< iolink::ImageView > inputImage, TransposeImage3d::TranspositionMode transpositionMode, std::shared_ptr< iolink::ImageView > outputImage = NULL );

Class Syntax

Parameters

Class Name TransposeImage3d

Parameter Name Description Type Supported Values Default Value
input
inputImage
The input image. Image Binary, Label, Grayscale or Multispectral nullptr
input
transpositionMode
The transposition mode.
XYZ_TO_YXZ Use the transform O(i,j,k) = I(j,i,k)
XYZ_TO_XZY Use the transform O(i,j,k) = I(i,k,j)
XYZ_TO_YZX Use the transform O(i,j,k) = I(j,k,i)
XYZ_TO_ZXY Use the transform O(i,j,k) = I(k,i,j)
XYZ_TO_ZYX Use the transform O(i,j,k) = I(k,j,i)
Enumeration XYZ_TO_YXZ
output
outputImage
The output image. Its type is forced to the same value as the input. Its X, Y, and Z dimensions are switched in accordance with the transposition mode. Image nullptr

Object Examples

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

TransposeImage3d transposeImage3dAlgo;
transposeImage3dAlgo.setInputImage( foam );
transposeImage3dAlgo.setTranspositionMode( TransposeImage3d::TranspositionMode::XYZ_TO_YXZ );
transposeImage3dAlgo.execute();

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

Function Examples

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

auto result = transposeImage3d( foam, TransposeImage3d::TranspositionMode::XYZ_TO_YXZ );

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