Annotation Documentation

From NAMIC Wiki
Jump to: navigation, search
Home < Annotation Documentation

Return to miAnnotation


miAnnotation

miAnnotation (Medical Image Annotation)

GUI

General Information

Module Type & Category

Type: Interactive

Category: Base

Authors, Collaborators & Contact

  • Kilian Pohl: pohl@csail.mit.edu
  • Yong Zhang: yzhang@bwh.harvard.edu

Module Description

The miAnnotation Module is designed for users to annotate medical images to capture information latent in the scans.

Usage

Eight (8) different types of annotations can be created in the following ways:

  • Region Of Interest (ROI): Click on the ROI Icon MiAnnotation-ROI.jpg on the middle panel of the miAnnotation main panel, a new ROI annotation will then be created on the right-hand-side 3D view. There are seven (7) control points on the ROI annotation for the user to interact with. The six (6) control points located on the six surface of the ROI box can be dragged using mouse left-button to enlarge or shrink the box. The one (1) control point located in the center of the box can be dragged using mouse left-button to relocate the box in the 3D view. A new ROI entry will also be created in the annotation table. The properties of the ROI annotation can be edited by clicking the edit icon MiAnnotation-EditROI.jpg in the annotation table.
  • Text: Click on the text Icon MiAnnotation-text.jpg on the middle panel of the miAnnotation main panel, a new text annotation will then be created on the right-hand-side 3D view. The default location of the new text annotation is on the bottom left corner of the viewer. The user can move the text annotation to any other locations by clicking and dragging the text annotation using the mouse middle-button. A new text entry will also be created in the annotation table. The content of the text annotation can be edited from the entry in the annotation table. The properties of the text annotation can be edited by clicking the edit icon MiAnnotation-EditText.jpg in the annotation table.
  • Ruler: Click on the ruler Icon MiAnnotation-ruler.jpg on the middle panel of the miAnnotation main panel, a new ruler annotation will then be created on the right-hand-side 3D view. The default location of the new ruler annotation is in the middle of the viewer spanned from left to right. The user can click and drag any one of the two control points of the ruler annotation to interact with it. A new ruler entry will also be created in the annotation table. The value of the ruler measurement can be automatically updated when the user interact with the ruler. The properties of the ruler annotation can be edited by clicking the edit icon MiAnnotation-EditRuler.jpg in the annotation table.
  • Angle: Click on the angle Icon MiAnnotation-angle.jpg on the middle panel of the miAnnotation main panel, a new angle annotation will then be initialized on the right-hand-side 3D view. The users are required to manually click three (3) times in the 3D viewer using mouse left-button to create the real angle annotation. After creating the angle annotation, the user can click and drag any one of the three control points of the angle annotation to interact with it. A new angle entry will also be created in the annotation table. The value of the angle measurement can be automatically updated when the user interact with the angle. The properties of the annotation can be edited by clicking the edit icon MiAnnotation-EditAngle.jpg in the annotation table.
  • Fiducial: Click on the fiducial Icon MiAnnotation-point.jpg on the middle panel of the miAnnotation main panel, then the users are required to manually click in any of the 2D viewers using mouse left-button to create a new fiducial annotation. The new annotation will also be displayed in the 3D viewer. After creating the annotation, the user can click and drag it to interact with it. A new fiducial entry will also be created in the annotation table. The properties of the annotation can be edited by clicking the edit icon MiAnnotation-EditPoint.jpg in the annotation table.
  • Bidimensional Lines: Click on the bidimensional lines Icon MiAnnotation-Polyline.jpg on the middle panel of the miAnnotation main panel, then the users are required to manually click in the 3D viewers using mouse left-button to create two lines. These two lines are automatically orthogonal. After creating the annotation, the user can click and drag any of the four control points to interact with it. A new bidimensional line entry will also be created in the annotation table. The properties of the annotation can be edited by clicking the edit icon MiAnnotation-EditPolyline.jpg in the annotation table.
  • Spline: Click on the spline Icon MiAnnotation-Spline.jpg on the middle panel of the miAnnotation main panel, then a new spline annotation point is created right in the center of the 3d viewer. The users are able to manually click and drag the spline point using mouse left-button to other locations in the 3D viewer. Up to five (5) points can be clicked and dragged from the initial location of the spline annotation. After creating the annotation, the user can click and drag any of the five control points to form different splines to fit their needs. Or the user can click and drag the entire spline annotation to move it as a whole. A new spline entry will also be created in the annotation table. The properties of the annotation can be edited by clicking the edit icon MiAnnotation-EditSpline.jpg in the annotation table.
  • Sticky Note: Click on the stick note Icon MiAnnotation-Note.jpg on the middle panel of the miAnnotation main panel, then a new stick note is created. There are no displays of the note in any of the 2D or 3D viewers. After creating the annotation, a new sticky note entry will be created in the annotation table. The properties of the annotation can be edited by clicking the edit icon MiAnnotation-EditNote.jpg in the annotation table.

Use Cases, Examples

This module is especially appropriate for these use cases:

  • Use Case 1: This module is useful for basic measurements of volume, area, length, angle.
  • Use Case 2: Use eight different annotations to annotate medical images.

Tutorials

Links to tutorials explaining how to use this module:

  • Tutorial (coming soon)
  • Data Set (coming soon)

Quick Tour of Features and Use

Annotated GUI layout: (see below for a detailed description of each element, listed by panel.)

  • Ruler Widget panel:
    • Modify All Ruler Nodes panel
      • Select the visibility of all ruler nodes. Set all rulers invisible or set all rulers visible.
      • Delete all ruler nodes from the scene.
      • Generate Report: saves basic information about all rulers in the scene to a file on disk (distance, position, annotation). If a CSV (comma separated value) format is chosen, the information is separated by commas, if .txt is chosen, the information is separated by tabs.
    • Modify Selected Ruler Node panel
      • Ruler Node Select: create a new ruler node, show the parameters of a previously created ruler node, delete or rename a ruler node
      • Distance: the distance between the end points of the current ruler, updated as the end points move.
      • The next two rows of icons correspond to the two end points:
        • End Point Color: set the color used to show the ruler end point
        • Constraint: constrain the motion of the ruler end point to be on the surface of the selected model or volume slice plane. In order to get the end points of the ruler to move along a selected model surface, you currently need to rotate the view so that the handle is rendered on top of the model, the next click will snap it to the model surface. If you move the model or slice plane, the measurement point won't move with it, the constraint only works when moving the end point handle. If you make the model or slice invisible, the end point cannot be moved, as the constraint will always be false.
        • Position: ruler end point positions, updates when the ruler handles are moved in 3D or 2D, and can be used to update the end points by typing in a value.
      • Display Options
        • Visibility: if the eye is open, this ruler is visible, if it is closed, this ruler is invisible. Click on it to toggle the state.
        • Line Color: set the color used to show the ruler line
        • Annotation Color: set the color used to show the distance annotation text
        • Distance Annotation Visibility: if the eye is open, show the distance in mm between the end points along the line, if the eye is closed, hide the distance annotation text. Click on the icon to toggle the state.
        • Standard Annotation Formats: a drop down menu allowing you to choose standard formatting strings for the annotation text. It will over ride any current entries in the Distance Annotation Format box.
          • 1 decimal
          • 0 decimals
          • 2 decimals
          • Scientific Notation
        • Distance Annotation Format: how to display the distance annotation, use string formatting strings, %g for an auto formatted floating point, %.2f to show two decimal places. Any text is allowed, defaults to mm (millimeters). Please see the following link for more info about formatting options.
        • Distance Annotation Scale: how large to render the distance annotation text
  • Angle Widget panel:
    • Modify All Angle Nodes panel:
      • Select the visibility of all angle nodes. Set all angles invisible or set all angles visible.
      • Delete all angle nodes.
    • Modify Selected Angle Node panel:
      • Angle Node Select: create a new angle node, show the parameters of a previously created angle node, delete or rename an angle
      • Angle: the angle between the rays of the current ruler, updated as the end points move. In degrees.
      • The next three rows of widgets refer to the three end points that make up the angle, first, center, second:
        • Set End Point Color: set the colour used to show the angle end point
        • Constraint: constrain the motion of the angle end points to be on the surface of the selected model or volume slice plane. In order to get the end points of the angle to move along a selected model surface, you currently need to rotate the view so that the handle is rendered on top of the model, the next click will snap it to the model surface. If you move the model or slice plane, the measurement point won't move with it, the constraint only works when moving the end point handle. If you make the model or slice invisible, the end point cannot be moved, as the constraint will always be false.
        • Position: angle point positions, updates when the angle handles are moved in 3D, and can be used to update the points by typing in a value.
      • Display Options:
        • Visibility: if the eye is open, this angle is visible, if it is closed, this angle is invisible. Click on it to toggle the state.
        • Line Color: set the color used to show the angle lines
        • Text Color: set the color used to show the angle annotation text
        • Ray visibility: toggle visibility for the two rays that make up the angle. If the eye is open, this ray is visible, if it is closed, this ray is invisible. Click on it to toggle the state. The first ray is from the first point to the center point, the second ray is from the second point to the center point.
        • Arc Visibility: If the eye is open, show the arc between the two angle arms. If it is close, the arc is invisible. Click on it to toggle the state.
        • Arc Color: set the color used to show the arc between the rays.
        • Standard Annotation Formats: a drop down menu allowing you to choose standard formatting strings for the annotation text. It will over ride any current entries in the Distance Annotation Format box.
          • 0 decimals
          • 1 decimal
          • 2 decimals
        • Angle Annotation Format: how to display the angle annotation, use string formatting strings, %g for an auto formatted floating point, %.2f to show two decimal places. Any text is allowed after the numerical specification. The angle is in degrees. Please see the following link for more info about formatting options.
        • Angle Annotation Scale: how large to render the angle annotation text

Loading and Saving Lists

Fiducial lists can be written out to disk using the File menu, Save option. The files can be loaded into Slicer via the File menu, Add Data interface.

Fiducial list files are plain text, with the extension fcvs.

An example file:

# Fiducial List file /home/username/L.fcsv
# name = L
# numPoints = 5
# symbolScale = 5.5
# symbolType = 11
# visibility = 1
# textScale = 12.5
# color = 0.4,1,1
# selectedColor = 0.807843,0.560784,1
# opacity = 1
# ambient = 0
# diffuse = 1
# specular = 0
# power = 1
# locked = 0
# columns = label,x,y,z,sel,vis
L-P,-58.0508,64.4069,0,1,1
L-P1,31.7797,-1.69492,0,1,1
L-P2,-2.11864,-49.1527,0,0,1
L-P3,-72.4576,-54.2374,0,1,0
L-P4,-63.1356,3.38984,0,1,1

Lines are commented out by placing a hash mark (#) at the beginning of the line. There is an optional header section that lists display options. If no display options are included, the defaults are used when the list is read into Slicer. The header line formats follow the description of the point format.

The points are listed one per line in the following format:

 pointName,X,Y,Z,selected,visibility
pointName a text string that is displayed at the location of the fiducial.
X,Y,Z 3 floating points that represent the 3D RAS location of the fiducial, in mm.
selected an integer value, either 0 or 1, denoting if the fiducial is selected or not.
visibility an integer value, either 0 or 1, denoting if the fiducial is visible or not.

The header section of the fiducial list file consists of lines starting with a hash mark and a space (# ). A keyword = value pair follows the space. The keyword is parsed and compared against the list of known keywords:

Fiducial List file header
Fiducial List file Path to the fiducial list file when it was last saved from Slicer.
name A name for the list, new points will be named according to this string and the point number
numPoints The number of points in the list, skipped for now, as the list is built up by adding a point for each line in the points section of the file
symbolScale Floating point, used to scale the glyphs for all the fiducial points.
symbolType Integer selected from the range representing glyph types, default is 11 for a star burst.
0    Vertex2D
1    Dash2D
2    Cross2D
3    ThickCross2D
4    Triangle2D
5    Square2D
6    Circle2D
7    Diamond2D
8    Arrow2D
9    ThickArrow2D
10   HookedArrow2D
11   StarBurst2D
12   Sphere3D
13   Diamond3D
visibility Integer, 0 means the list as a whole is invisible, 1 means that any visible fiducial points are visible.
textScale Floating point number that is used to scale the label text for all the fiducial points
color Three comma separated floating point numbers that give the red, green, blue values to be used for the glyph and text when the fiducial is not selected.
selectedColor Three comma separated floating point numbers that give the red, green, blue values to be used for the glyph and text when the fiducial is selected.
opacity Floating point number 0.0-1.0, material property on the glyph
ambient Floating point number 0.0-1.0, material property on the glyph
diffuse Floating point number 0.0-1.0, material property on the glyph
specular Floating point number 0.0-1.0, material property on the glyph
power Floating point number 0.0-1.0, material property on the glyph
locked Integer, 1 means the list as a whole is locked (points can't be moved in the 2d or 3d windows), 0 means the list as a whole is unlocked.
columns This entry gives you the flexibility to reorder your data for each point, the default is
label,x,y,z,sel,vis
. It's a comma separated list of keywords giving the format of the following lines for each point.

Importing Lists into a Spreadsheet

To import a fiducial list into OpenOffice.org's Calc, version 3.1.1:

  1. In Slicer3, open the File, Save dialog and select the fiducial list to save.
  2. Set the file name, ending with .fcsv, and the directory in which to save it
  3. Open OpenOffice.org's Calc
  4. Click on File, Open
  5. Expand the File type menu
  6. Select Text CSV as the file type
  7. Make sure All Files is selected for the directory listing filter
  8. Browse to the directory in which you saved your .fcsv file and select it, then click Open
  9. The Text Import window will pop up
  10. In the Separator options, set it so that only comma is selected (the color and selectedColor comment lines will get separated into columns, but so will the column s comment to give headers for the rows of points)
  11. Click Open and the import will finish, with the fiducial points starting on row 18

To open a list in Excel 2007:

  1. In Slicer3, open the File, Save dialog and select the fiducial list to save.
  2. Set the file name, ending with .fcsv, and the directory in which to save it
  3. Click on the symbol in the top left to open the menu, select Open (if Import is an option, use it instead)
  4. Set the filter to All Files (*.*)
  5. Browse to the directory in which you saved your .fcsv file and select it, then click Open
  6. Text Import Wizard will open
  7. In Original Data Type, select Delimited
  8. Click Next
  9. In Delimiters, select Comma only
  10. Click Next
  11. The Column data format should be fine as General
  12. Click Finish

Development

Notes from the Developer(s)

From Slicer3.5 to Slicer3.6, the underlying implementation of the fiducials in the 3D scene has been changed to use vtkSeedWidgets.

Dependencies

No other modules or packages are required for this module's use.

Tests

On the Dashboard, these tests verify that the module is working on various platforms:

Known bugs

Follow this link to the Slicer3 bug tracker.


Usability issues

Follow this link to the Slicer3 bug tracker. Please select the usability issue category when browsing or contributing.

Source code & documentation

Source Code:

Links to documentation generated by doxygen:

More Information

Acknowledgment

This work is part of the National Alliance for Medical Image Computing (NAMIC), funded by the National Institutes of Health through the NIH Roadmap for Medical Research, Grant U54 EB005149.

References