RotateImage3d
Applies a rotation of a given angle on a three-dimensional image.
Access to parameter description
This algorithm rotates a 3D image of a user-defined angle (θx,θy,θz) in Euler angles notation.
The new coordinates (x′,y′,z′) can be expressed as a function of the old coordinates (x,y,z): [x′y′z′]=Rx(θx)⋅Ry(θy)⋅Rz(θz)⋅[xyz] where: Rx(θ)=[1000cosθ−sinθ0sinθcosθ] Ry(θ)=[cosθ0sinθ010sinθ0cosθ] Rz(θ)=[cosθ−sinθ0sinθcosθ0001] See also
Access to parameter description
This algorithm rotates a 3D image of a user-defined angle (θx,θy,θz) in Euler angles notation.
The new coordinates (x′,y′,z′) can be expressed as a function of the old coordinates (x,y,z): [x′y′z′]=Rx(θx)⋅Ry(θy)⋅Rz(θz)⋅[xyz] where: Rx(θ)=[1000cosθ−sinθ0sinθcosθ] Ry(θ)=[cosθ0sinθ010sinθ0cosθ] Rz(θ)=[cosθ−sinθ0sinθcosθ0001] See also
Function Syntax
This function returns outputImage.
// Function prototype
std::shared_ptr< iolink::ImageView > rotateImage3d( std::shared_ptr< iolink::ImageView > inputImage, double rotationAngleX, double rotationAngleY, double rotationAngleZ, RotateImage3d::InterpolationType interpolationType, std::shared_ptr< iolink::ImageView > outputImage = NULL );
Class Syntax
Parameters
Parameter Name | Description | Type | Supported Values | Default Value | |||||
---|---|---|---|---|---|---|---|---|---|
![]() |
inputImage |
The input grayscale image. | Image | Binary, Label, Grayscale or Multispectral | nullptr | ||||
![]() |
rotationAngleX |
The angle of rotation in degrees for the OX axis. | Float64 | Any value | 90 | ||||
![]() |
rotationAngleY |
The angle of rotation in degrees for the OY axis. | Float64 | Any value | 0 | ||||
![]() |
rotationAngleZ |
The angle of rotation in degrees for the OZ axis. | Float64 | Any value | 0 | ||||
![]() |
interpolationType |
The interpolation mode. Method used to calculate the intensity of each pixel in the result image.
|
Enumeration | NEAREST_NEIGHBOR | |||||
![]() |
outputImage |
The output image. Its dimensions 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" ); RotateImage3d rotateImage3dAlgo; rotateImage3dAlgo.setInputImage( foam ); rotateImage3dAlgo.setRotationAngleX( 90.0 ); rotateImage3dAlgo.setRotationAngleY( 0.0 ); rotateImage3dAlgo.setRotationAngleZ( 0.0 ); rotateImage3dAlgo.setInterpolationType( RotateImage3d::InterpolationType::NEAREST_NEIGHBOR ); rotateImage3dAlgo.execute(); std::cout << "outputImage:" << rotateImage3dAlgo.outputImage()->toString();
Function Examples
auto foam = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam.vip" ); auto result = rotateImage3d( foam, 90.0, 0.0, 0.0, RotateImage3d::InterpolationType::NEAREST_NEIGHBOR ); std::cout << "outputImage:" << result->toString();