poIImagePlane GetAlignmentMode

Gets the mode used to align a 3D image plane with a model.

Syntax

Imageplane_handle GetAlignmentMode

Application

HyperView Tcl Query

Description

An image plane in 3D mode can be aligned with a model to check correlation between a video and the simulation. The alignment can be performed using three points on the video and on the model, or using two points and a principal plane. This command returns the mode that was used to align the image plane. The mode determines what data will get returned when calling the GetAlignmentData command.

This command returns “2POINT” for 2 point alignment, and “3POINT” for 3 point alignment.

Example

To create a 3D image plane, perform a 2 point alignment, and then query the image plane for alignment parameters:
Note: This example assumes that LS-Dyna Bumper demo model has been loaded.
hwi OpenStack
if {[catch {
    ::post::GetPostHandle 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 3D
    imageplane_handle SetCrop 0 0 0.9995 0.995
    imageplane_handle LocateBy2Points "-1.0 0.0 0.0 118.0 676.0 485.7 118.2 0.0 485.7 0 0 880 0"
    imageplane_handle SetFilterType ColorAlpha;
    imageplane_handle SetFilterMode equal;
    imageplane_handle SetColorAlphaTarget "255 255 255"
    imageplane_handle SetColorAlphaTolerance 18
    imageplane_handle SetMipMapMode Linear1
    puts "*****"
    puts "Alignment Mode = [imageplane_handle GetAlignmentMode]";
    puts "Alignment Data = [imageplane_handle GetAlignmentData]";
    puts "*****"
    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 CloseStac

Output

*****
Alignment Mode = 2POINT
Alignment Data = -1.000000 0.000000 0.000000 118.000000 676.000000 485.700012 118.199997 0.000000 485.700012 0 0 880 0 
*****
No errors.
Warnings: 

Errors

Returns HW_InvalidHandle if the image plane handle is invalid.