Class DicomInfo

  • All Implemented Interfaces:

    public class DicomInfo
    extends TextBox
    (Preview Feature) Text node to display DICOM information on screen.

    Preview Feature means this class is fully supported and can be used in Open Inventor applications. Being tagged as a Preview Feature just means that the implementation is still subject to API changes and adjustments based on feedback from early adopters. Please be also aware that source compatibility might be broken regardless of the Open Inventor compatibility changes policy due to our commitment to bring needed changes to be sure the specifications of this Preview Feature match the expectations of our customers.

    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.

    File format/default:

    DicomInfo {

      fileName ""
      position 0 0 0
      alignmentH LEFT
      alignmentV TOP
      textAlignH LEFT
      fontName Arial:Bold
      fontSize 15
      border FALSE
      borderColor 1 1 1
    See Also:
    TextBox, Gnomon, Magnifier, Ruler
    • Field Detail

      • fileName

        public SoSFFilePathString fileName
        Path to the DICOM file used to extract DICOM info. Default is empty.
    • Constructor Detail

      • DicomInfo

        public DicomInfo()
    • Method Detail

      • displayDicomInfo

        public int displayDicomInfo​(java.lang.String title,
                                    short group,
                                    short element)
        Add a line to the DICOM annotation.
        title - A string to prefix the DICOM info
        group - Group tag of requested DICOM info
        element - Element tag of requested DICOM info
        Index of the next insertion