Description

Custom tool to use the mouse to pick one or more spots of interest on an an image window.

Object Model


Remarks

This tool allows the user to identify spots of interest on the image window interactively by clicking the mouse on each point.

Each spot picked is marked by a circle or square region of a small, selectable size. When invoked on an McGraphOverlay that is being displayed in an IMcView, the tool shows a circle or square (depending on the mcpscfSpotIsCircle or mcpscfSpotIsSquare CommandFlags) that tracks cursor movement whenever the cursor passes into the viewed client window. When the left mouse button is pressed, then the spot is left at the point marked and another one is created to track the mouse. The backspace key erases the last spot marked, and holding down the ctrl key makes a circle spot into a square or a square spot into a circle.

The spot size is set via the mcpscfSetSpotSize COmmandFlags action flag or by user +/- keypresses. By default the spot size is 10 pixels. The user may increase the spot size by 25 by pressing the plus (+) key and decrease it by 25 by pressing the minus (-) key.

The region features resulting from the user's spot placements are placed into a “results McRegion” instance. If this McRegions has not been set via the mcpscfSetResultMcRegions CommandFlags action flag, then by default it is the ancestor McRegions, if any, of the McGraphOverlay on which the McPickSpotsTool has been invoked (via a call to McGraphOverlay.SelectTool). If there is no ancestor McRegions, then the Aoi of the ancestor image of the McGraphOverlay is used as the default.

The tool is shut down when the user types either the Escape or Enter keys or double-clicks the left mouse button. At the time that the ToolDeselected notify is sent, the mcpscfAbortPicking bit will be on in the CommandFlags property if the Escape key was pressed, otherwise the mcpscfEndPicking flag is set if the user ended picking with the Enter key or a double-click. If the tool is shut down because some other tool is invoked, then neither of these CommandFlags will be set.

Members

Properties
ActiveClassNameRead-write propertyproperty ActiveClassName
ActiveOverlayRead-write propertyproperty ActiveOverlay
ActiveTemplateIDRead-write propertyproperty ActiveTemplateID
CommandDataRead-write propertyproperty CommandData
CommandFlagsRead-write propertyproperty CommandFlags
ToolClassNameRead-only propertyproperty ToolClassName