poIImagePlane GetUserTransformList

Gets the 2D or 3D user transform for the image plane.

Syntax

Imageplane_handle GetUserTransformList

Application

HyperView Tcl Query

Description

The image plane maintains a separate user transform to track the position, rotation, and scaling applied to the image plane. This command returns the current transform. The returned data is different, depending on whether the image plane is in 3D mode or in foreground/background mode. In 3D mode, the transform string consists of twelve floats, representing the rotation about X, Y, and Z, and the translation in X, Y, and Z. For foreground/background modes, the transform string consists of four floats, representing the X and Y scaling factor followed by the X and Y translation for the image.

This command does not return any data regarding alignment of a 3D image plane to a model. See GetAlignmentData for this information.

Example

To create two image planes and then position them in 2D and 3D space:
hwi OpenStack
if {[catch {
    hwi GetActiveClientHandle client_handle
    hwi GetSessionHandle session_handle
    client_handle GetImagePlaneCtrlHandle ipc_handle
    set ipid1 [ipc_handle AddImagePlane Logo1]
    ipc_handle GetImagePlaneHandle imageplane_handle $ipid1
    imageplane_handle SetFileName g:/samples2/VideoOverlay/Altair_logo.jpg
    imageplane_handle SetMode background
    imageplane_handle SetCrop 0 0 0.9995 0.995
    imageplane_handle SetFilterType ColorAlpha;
    imageplane_handle SetFilterMode Equal
    imageplane_handle SetColorAlphaTarget "255 255 255"
    imageplane_handle SetColorAlphaTolerance 18
    imageplane_handle SetMipMapMode Linear1
    imageplane_handle SetMode 3D
    imageplane_handle SetUserTransform "1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0 0.0 43.82 43.38"
    set xform1 [imageplane_handle GetUserTransformList];
    imageplane_handle ReleaseHandle;

    set ipid2 [ipc_handle AddImagePlane Background]
    ipc_handle GetImagePlaneHandle imageplane_handle $ipid2
    imageplane_handle SetFileName g:/samples2/VideoOverlay/Ts_Tall_rock_and_clouds_1600x1200.jpg
    imageplane_handle SetMode background
    imageplane_handle SetUserTransform "0.997 0.649 0.0 -0.17"
    imageplane_handle SetMaintainAspectRatio false
    set xform2 [imageplane_handle GetUserTransformList];
    imageplane_handle ReleaseHandle

    puts " ImagePlane 1 Xform = $xform1";
    puts " ImagePlane 1 Xform = $xform2";
    client_handle Draw
} result]} {
    global errorInfo;
    puts stderr $result;
    puts "[session_handle GetError]";
    puts stderr "*** Tcl TRACE ***";
    puts stderr $errorInfo;
} else {
    puts "No errors.";
    puts "Warnings: ";
    puts "    [session_handle GetError]";
}   
    
hwi CloseStack

Output:

ImagePlane 1 Xform = 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 43.820000 43.380001
 ImagePlane 1 Xform = 0.997000 0.649000 0.000000 -0.170000
No errors.
Warnings:

Errors

Returns HW_InvalidHandle if the image plane handle is invalid.