[PREVIEW] [Medical] Interactive distance measuring tool for SoOrthoSlice. More...
#include <Medical/nodes/Ruler.h>
Public Member Functions | |
virtual SoType | getTypeId () const |
bool | manageMouseMove (bool firstClick, const SoOrthoSliceDetail *detail) |
SoFont * | getFontNode () const |
Ruler () | |
Static Public Member Functions | |
static SoType | getClassTypeId () |
static void | initClass () |
static void | exitClass () |
Public Attributes | |
SoSFFloat | globalFactor |
SoSFString | label |
This node displays an interactive distance measuring tool on top of an SoOrthoSlice. The user can click and drag to display a line and the physical distance between the clicked point and the current cursor position.
This node is only intended to be used in a "2D" viewing environment using an SoOrthographicCamera, for example viewing a single slice of a medical volume.
This node requires that the application handle mouse press, release and move events. Mouse move events must be forwarded to the node using the manageMouseMove method. See example examples/source/Medical/Analysis/medicalRuler.
globalFactor | 1 |
label | mm |
InventorMedical, DicomInfo, Gnomon, Magnifier
Ruler::Ruler | ( | ) |
Constructor.
static void Ruler::exitClass | ( | ) | [static] |
Finish using class (called automatically by InventorMedical::finish()).
Reimplemented from SoSeparator.
static SoType Ruler::getClassTypeId | ( | ) | [static] |
Returns the type identifier for this class.
Reimplemented from SoSeparator.
SoFont* Ruler::getFontNode | ( | ) | const |
Returns the internal font node.
The application can use this to modify the appearance of the text.
virtual SoType Ruler::getTypeId | ( | ) | const [virtual] |
Returns the type identifier for this specific instance.
Reimplemented from SoSeparator.
static void Ruler::initClass | ( | ) | [static] |
Initialize class (called automatically by InventorMedical::init()).
Reimplemented from SoSeparator.
bool Ruler::manageMouseMove | ( | bool | firstClick, | |
const SoOrthoSliceDetail * | detail | |||
) |
The application should call this method with 'true' on the mouse down event that begins a measure operation, then call this method with 'false' on each mouse move event during the measure operation.
See the medicalRuler example program for more details.
Specifies a scale factor applied to the size of the arrowheads on the line.
Default is 1.
Specifies an (optional) label appended to measure value.
Default is "mm".