LImageViewer::AddAction

#include "ltwrappr.h"

L_INT LImageViewer::AddAction (nAction, uFlags);

L_INT nAction;

/* action to be added */

L_UINT uFlags;

/* reserved for future use */

Adds a new action to the container. This function is available only in the Medical Imaging Suite toolkits.

Parameter

Description

nAction

Value that indicates the action to be added. If nAction is equal to or greater than 100, it is a user-defined action. Otherwise, it can be one of the following predefined actions:

 

Value

Meaning

 

CONTAINER_ACTION_WINDOWLEVEL

[1] Window leveling. Moving the mouse horizontally controls the window center parameter of the window level. Moving the mouse vertically controls the window width parameter of the window level.

 

CONTAINER_ACTION_SCALE

[2] Scaling. Moving the mouse vertically controls the scale factor of the image.

 

CONTAINER_ACTION_OFFSET

[3] Offset. Moving the mouse to any direction causes the image to move towards that direction.

 

CONTAINER_ACTION_STACK

[4] Stacking. Moving the mouse vertically scrolls through the frames.

 

CONTAINER_ACTION_MAG

[5] Magnifying glass. Moving the mouse causes the magnify glass object to move

 

CONTAINER_ACTION_ALPHA

[6] Alpha. Moving the mouse horizontally changes the alpha factor of the LUT curve.

 

CONTAINER_ACTION_ANNOTATION_RULER

[7]  Ruler annotation. Clicking and dragging creates a ruler object.

 

CONTAINER_ACTION_ANNOTATION_ANGLE

[8] Angle annotation. Clicking and dragging creates an angle object.

 

CONTAINER_ACTION_ANNOTATION_TEXT

[9] Text annotation. Clicking and dragging creates a text object.

 

CONTAINER_ACTION_ANNOTATION_ARROW

[10] Arrow annotation. Clicking and dragging creates an arrow object.

 

CONTAINER_ACTION_ANNOTATION_RECTANGLE

[11] Rectangle annotation. Clicking and dragging creates a rectangle object.

 

CONTAINER_ACTION_ANNOTATION_ELLIPSE

[12] Ellipse annotation. Clicking and dragging creates an ellipse object.

 

CONTAINER_ACTION_ANNOTATION_HILITE

[13] Highlight annotation. Clicking and dragging creates a Highlight object.

 

CONTAINER_ACTION_REGION_RECTANGLE

[14] Rectangular region. Clicking and dragging creates a rectangular region.

 

CONTAINER_ACTION_REGION_ELLIPSE

[15] Elliptical region. Clicking and dragging creates an elliptical region.

 

CONTAINER_ACTION_REGION_FREEHAND

[16] Free hand region. Clicking and dragging creates a free hand region.

 

CONTAINER_ACTION_REGION_POLYGON

[17] Polygon region. Clicking defines the point of the polygon. Double clicking closes the polygon region.

 

CONTAINER_ACTION_REGION_MAGICWAND

[18] Magic wand region. Clicking defines the start point of the magic wand. Dragging will increase the magic wand threshold.

 

CONTAINER_ACTION_REGION_COLORRANGE

[19] Color range region. Moving the mouse horizontally controls the lower tolerance. Moving the mouse vertically controls the upper tolerance.

 

CONTAINER_ACTION_REGION_CIRCLE

[20] Circular region. Clicking and dragging creates a circular region.

 

CONTAINER_ACTION_REGION_SQUARE

[21] Square region. Clicking and dragging creates a square region.

uFlags

Reserved for future use. Pass 0.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

The same action cannot be added to a container twice.

To set or get the properties of a specific action, use LImageViewer::SetActionProperties and LImageViewer::GetActionProperties.

Once an action has been added to the container, it can be associated with a particular mouse movement, a keystroke combination, or both. To associate an action with the mouse, call LImageViewer::SetAction. To associate an action with a keystroke combination, call LImageViewer::SetKeyboardAction.

Required DLLs and Libraries

LTIVW

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LImageViewer::SetAction, LImageViewer::SetActionProperties, LImageViewer::GetActionProperties, LImageViewer::RemoveAction, LImageViewer::GetActionCount, LImageViewer::SetKeyboardAction, LImageViewer::GetKeyboardAction, LImageViewer::IsActionActive, LImageViewer::EnableActionCallBack, Class Members

Topics:

Applying Actions

 

Window Control/Image Viewer Functions: Applying Actions

Example

For an example, refer to LImageViewer::Create.