Marker_Select - Define and allow Pick Selection of Markers
Name
Marker_Select - Define and allow Pick Selection of Markers
Type
Mapper, Image viewer upstream control module
Language: K&R C
Author
Ian Curington, AVS/UNIRAS Ltd. UK
Description
Allow marker pick identification and display
from an input marker list and the image viewer
system. Takes as input an AVS field with
a list of coordinates for markers, displays them
over an image (map) in the image viewer, and
reacts to mouse picks on these markers, sending
the pick selection to the output port.
Markers are defined by geometric polyline vector lists,
not ROI pixel masks.
The input marker field is allowed to be either fully
specified, or abreviated, with only X, Y, and PID.
If a full marker field is specified, then you can
externally control position, shape, size, etc.
Any marker field sent out on the output port can
be read back in to the input field port. This way
state save and restore are possible. New marker
lists can be made using the "marker_pick" module.
This module does not allow edition of position or shape,
just allows query picking of pre-defined markers.
Two integer output ports provide information on the picked
marker, the index number and the type or PID tag
associated with that marker. These ports only change when
a valid pick is made, otherwise they have values of
-1, and -1, indicating no valid pick selection has been made.
Inputs
Input Image: Reference image, same as that sent for
display in the image viewer, used
for feedback path.
Mouse Info: Part of upstream pick feedback communication
with the image viewer
IV Struct: Part of upstream communications with the image viewer.
Poly_Marker: Input field,
for marker pick list definition.
This field is 1D uniform integer N-vector.
If N-vector is 3, then each marker is assumed to be
at an X, Y position, in pixels, relative to the top
left corner of the image. The third value is an
arbitrary PID tag value, that is simply displayed
and passed out on an integer output port when
a marker is picked with the mouse.
If the field N-vector size is greater than 3, then
it is assumed to be a full marker spec as defined
in "marker.h", usually 7. This can fully specifiy
variable marker shape, size, position, and hidden
stroke vector used in the shape creation.
Outputs
Poly_Marker_Output:
This contains a full marker list, as a mirror to
to the input list. It is always full 7-vector,
even if the input port is the 3-vector format.
This list can contain one additional marker not
specified on the input list - to show an "X" over
the top of the picked marker for display feedback
for a successful pick operation.
This port can be saved to a file with the
"write field" module, and later restored with
"read_field" on the input port during a later session.
IV Draw Struct:
Part of the image viewer upstream communication
system.
Pick-Index: Integer output port with the index value of the
picked marker. If no pick is valid, this port = -1.
Pick-PID: Integer output port with any PID tag value associated
at the input port for the picked marker. This
can be used by other modules in the network to
provide additional query or more detailed information
or dynamic behavior resulting from the pick operation.
Parameters
Set Pick Mode: A one-shot button that registers the pick operation
mode with the image viewer, in the case that multiple
modules are also requesting pick communication with the
image viewer.
Pick Status Text Block:
This is a square read-only text block used to
show annotation about the picked marker.
Marker Size:
An integer slider from 1 to 10 (default=2) that
controls the relative size of the markers
when the input port is in the short X, Y, PID mode.
When the full marker list is presented at the input
port, the size is specified per marker, so this
slider has no effect.