[PREVIEW] [Medical] Text node to display DICOM information on sceen. More...
#include <Medical/nodes/DicomInfo.h>
Public Member Functions | |
virtual SoType | getTypeId () const |
int | displayDicomInfo (SbString title, unsigned short group, unsigned short element) |
int | displayDicomInfo (SbString title, SbString infoString) |
SbString | getDicomInfo (unsigned short group, unsigned short element) |
DicomInfo () | |
Static Public Member Functions | |
static SoType | getClassTypeId () |
static void | initClass () |
static void | exitClass () |
Public Attributes | |
SoSFFilePathString | fileName |
This node is a convenience class derived from TextBox for displaying DICOM annotation text on screen.
This node displays a text box at a fixed location in the viewer window. The position is specified in normalized device coordinates -1 to 1. The DICOM file is specified using the 'fileName' field.
Alignment options allow the box to be positioned, for example, in a corner of the window. For example position -0.98, -0.98, 0 with default alignment is the upper left corner of the window. The text box automatically expands or shrinks when lines of text are added to or deleted from the box. Positioning a text box in the lower left corner creates a sort of 'console' output overlaying the scene. Note that the alignment options control the positioning of the text box. The text inside the box is currently always left justified.
In order to have convenient default values for font size, the font settings are not inherited from the scene graph. By default the text is rendered using an SoText2 node with font name 'Arial', font size 16 and line spacing 1.1. The application can modify these values using the getFontNode() and getTextNode() methods. Lighting and picking are disabled. Text will be rendered on top of whatever is rendered in the main scene graph. The application can modify the text strings directly, but this class also provides some convenience methods that are very useful. For example, the addLine() method appends a new string to the end of the list.
fileName | "" |
position | 0 0 0 |
alignmentH | LEFT |
alignmentV | TOP |
textAlignH | LEFT |
fontName | Arial:Bold |
fontSize | 15 |
border | FALSE |
borderColor | 1 1 1 |
InventorMedical, TextBox, Gnomon, Magnifier, Ruler
DicomInfo::DicomInfo | ( | ) |
Constructor.
Add a line to the DICOM annotation
Returns : index of the next insertion
int DicomInfo::displayDicomInfo | ( | SbString | title, | |
unsigned short | group, | |||
unsigned short | element | |||
) |
Add a line to the DICOM annotation.
Returns : index of the next insertion
static void DicomInfo::exitClass | ( | ) | [static] |
Finish using the class.
Reimplemented from TextBox.
static SoType DicomInfo::getClassTypeId | ( | ) | [static] |
Returns the type identifier for this class.
Reimplemented from TextBox.
SbString DicomInfo::getDicomInfo | ( | unsigned short | group, | |
unsigned short | element | |||
) |
Returns the string representing the specified DICOM tag (empty if not present).
virtual SoType DicomInfo::getTypeId | ( | ) | const [virtual] |
Returns the type identifier for this specific instance.
Reimplemented from TextBox.
static void DicomInfo::initClass | ( | ) | [static] |
Initialize the class.
Reimplemented from TextBox.
Path to the DICOM file used to extract DICOM info.
Default is empty.