poIImagePlane LocateBy3Points
Aligns a 3D image plane with a model.
Syntax
Imageplane_handle LocateBy3PointspointList
Application
HyperView Tcl Modify
Description
An image plane in 3D mode can be aligned with a model to check correlation between a video and a simulation. This command aligns the image plane by defining three points on the model and three corresponding points on the video or image. The image plane is then scaled and positioned appropriately to match the points specified.
Inputs
- pointList
- The alignment point list. The list consists of the X, Y, Z values for three points on the model, followed by three corresponding X, Y points on the image.
Example
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 LocateBy3Points "187 0.0 500.0 337.0 605.0 507.0 336.9 604.5 670.4 0 0 880 0 880 212"
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 CloseStack
Output:
*****
Alignment Mode = 3POINT
Alignment Data = 187.000000 0.000000 500.000000 337.000000 605.000000 507.000000 336.899994 604.500000 670.400024 0 0 880 0 880 212
*****
No errors.
Warnings:
Errors
Returns HW_InvalidHandle if the image plane handle is invalid, or HW_Error if the transform string is invalid.