[View]  [Edit]  [Lock]  [References]  [Attachments]  [History]  [Home]  [Changes]  [Search]  [Help] 

[Axis] Technical sheet

Contents:

A technical detail on how to use Axis framework when building GUI tools.

Explanation of the schema

A tool capable of displaying detected spots in a GraphPane, can manage a number of overlays, that are shown while drawing graphPane contents and all user input on the graphPane are delegated to the current overlay if anyone is under the cursor.
Axis are implemented as overlays and both axes are a composite overlay (composed by the vertical and horizontal axis).

To inspect how it works, open the Spot detector evaluating the expression:
Show2DSpots open.

Select the menu options "Image/Inspect/GUI" and inspect the parts of the tool named:

Detail of main classes of the framework

Level
ClassName
Comments.
References.
Tool
ObjectDetectionGUIThe instance variables named "overlays" and "currentOverlay" are used to manage overlays (and axes).ObjectDetectionGUI>>#overlay... methods.
Show2DSpots>>#initializeOverlays
GUI
Display
GraphPaneA normal GraphPane is used for rendering and all GUI management.
Background image and detected spots are drawn using the GraphPane's pen.
If overlays are present in the tool, are drawn using the graphPane's pen.
ObjectDetectionGUI>>#imageDisplay
GUI
Overlay
ObjectDetectionGUIThe instance variables named "overlays" and "currentOverlay" are used to manage overlays (and axes).ObjectDetectionGUI>>#imageDisplay
ObjectDetectionGUI>>#doAction:withArguments:
Abstract
Overlays
ObjectDetectionOverlayAbstract class for overlay support. Concrete subclasses must implement defined responsibilities. (Transparent) Defaults has been defined when posible.
A Composite design has been built to support composed overlays (e.g. orthogonal axis).
Opaque overlays has been implemented as one or more opaque regions (hotSpots). The cursor sensing and actions implemented in opaque overlays consider the hotSpots as private overlay areas.
ObjectDetectionOverlay
CompositeDetectionOverlay
OpaqueObjectOverlay
Coordinates
BiDimensionalAxisThe axes implements funcitonality for edition and services for translating image coordinates to user coordinates.
Also prologue and epilogue descriptions are implemented to displaying cursor offsets in user coordinates and spot location in user coordinates.
The axes works coordinated with the tool for user GUI.
BiDimensionalAxis>>...#help, #enable, #displayAt:with:inUse:
Axis
ImageAxisAbstract implementation of an axis. At this level all display and event managemen for an axis is implemented. Coordinates transformations are also implemented.ImageAxis>>#valueForOffset:, #prologueFor:at:; #epilogueFor:at: