Available in LEADTOOLS Medical Imaging toolkits. |
L_DispContainerAddAction
#include "ltivw.h"
L_LTIVW_API L_INT L_DispContainerAddAction(hCon, nAction, uFlags)
HDISPCONTAINER hCon; |
/* handle to the container */ |
L_INT nAction; |
/* action to be added */ |
L_UINT uFlags; |
/* reserved for future use */ |
Adds a new action to the container.
Parameter |
Description |
|
hCon |
Handle to the container. |
|
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_NONE |
[0] No action. Also referred to as select mode." In this mode no action is applied when the mouse is dragged. You can still select, adjust and move the annotation objects. |
|
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 starting point and color. The region will grow outwards from the selected point to the boundaries of that color. Dragging will increase the threshold of variation allowed from the selected color. |
|
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. |
|
CONTAINER_ACTION_REGION_NUDGETOOL |
[22] Nudge tool. Clicking and dragging will add a region to the existing region (if exists). Pressing Shift while pressing the mouse will inverse this effect, making it act like the shrink tool. This action can be used as a nudge tool to nudge the edge of the existing region, or it can be used as a region painter. You can change the shape and size of the brush using the properties of the corresponding structure and then send it through the function L_DispContainerSetActionProperites. For more information, see DISPNUDGETOOLACTIONPROPS. |
|
CONTAINER_ACTION_REGION_SHRINKTOOL |
[23] Shrink tool. Clicking and dragging will remove parts of the region from the existing region (if exists). Pressing Shift while pressing the mouse will inverse this effect, making it act like the nudge tool. This action can be used to reduce or trim the existing region. You can change the shape and size of the brush using the properties of the corresponding structure, and then send it through the function L_DispContainerSetActionProperites. For more information, see DISPNUDGETOOLACTIONPROPS. |
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 L_DispContainerSetActionProperties, or L_DispContainerGetActionProperties.
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 L_DispContainerSetAction. To associate an action with a keystroke combination, call L_DispContainerSetKeyboardAction.
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
Example
For an example, refer to L_DispContainerCreate.