Difference between revisions of "Annotation Documentation"

From NAMIC Wiki
Jump to: navigation, search
m (Text replacement - "http://www.slicer.org/slicerWiki/index.php/" to "https://www.slicer.org/wiki/")
 
(39 intermediate revisions by 5 users not shown)
Line 1: Line 1:
[http://wiki.na-mic.org/Wiki/index.php/Projects:ARRA:SlicerAM Return to miAnnotation]
+
[http://wiki.na-mic.org/Wiki/index.php/Projects:ARRA:SlicerAM Return to ARRA Page]
  
  
Line 11: Line 11:
  
 
== General Information ==
 
== General Information ==
 +
This module is a work in progress targeted for release with [http://wiki.slicer.org/slicerWiki/index.php/Slicer4 3D Slicer version 4]
 
===Module Type & Category===
 
===Module Type & Category===
  
Line 19: Line 20:
 
===Authors, Collaborators & Contact===
 
===Authors, Collaborators & Contact===
 
* Kilian Pohl: pohl@csail.mit.edu
 
* Kilian Pohl: pohl@csail.mit.edu
* Yong Zhang: yzhang@bwh.harvard.edu
+
* Daniel Haehn: haehn@bwh.harvard.edu
 +
* Past Contributors:
 +
** Yong Zhang: yzhang@bwh.harvard.edu
  
 
===Module Description===
 
===Module Description===
Line 25: Line 28:
  
 
== Usage ==
 
== Usage ==
Eight (8) different types of annotations can be created in the following ways:
+
Eight (8) different types of annotations can be created in the following ways:  
  
*Region Of Interests (ROI): Click on the [[File:miAnnotation-ROI.jpg]]tool bar icon of an arrow pointing to a starburst fiducial to enter the 'place a new object mode', then use the mouse to left click on 3D models or on 2D slices to show where you wish to place your fiducials.  
+
*Region Of Interest (ROI): Click on the ROI Icon [[File: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 [[File:miAnnotation-EditROI.jpg]] in the annotation table.
  
*You can also place fiducials while in 'tranform view' mode by positioning the mouse over a 2D slice plane in the Slice view windows (it must be the active window) and pressing the 'p' key.
+
*Text: Click on the text Icon [[File: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 [[File:miAnnotation-EditText.jpg]] in the annotation table.
  
*You can also add a new fiducial from the Fiducials module GUI, using the add button: [[Image:SlicerFiducialsAddNew-3.4.jpg]]. This places a new fiducial at the origin, (0,0,0).  
+
*Ruler: Click on the ruler Icon [[File: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 [[File:miAnnotation-EditRuler.jpg]] in the annotation table.
  
Interaction tips:
+
*Angle: Click on the angle Icon [[File: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 [[File:miAnnotation-EditAngle.jpg]] in the annotation table.
  
*You can right click on a fiducial in the Fiducials GUI and that will jump all the slices to that location.
+
*Fiducial: Click on the fiducial Icon [[File: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 [[File:miAnnotation-EditPoint.jpg]] in the annotation table.
  
*You can right click and drag a fiducial in the 2D slice windows using the mouse in 'transform view' mode. 3D interactions are possible by clicking and dragging the fiducial glyph in the 3D window.
+
*Bidimensional Lines: Click on the bidimensional lines Icon [[File: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 [[File:miAnnotation-EditPolyline.jpg]] in the annotation table.
  
[[Modules:EventBindings-3.6#Fiducials | Hot Key bindings for this module]]
+
*Spline: Click on the spline Icon [[File: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 [[File:miAnnotation-EditSpline.jpg]] in the annotation table.
 +
 
 +
*Sticky Note: Click on the stick note Icon [[File: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 [[File:miAnnotation-EditNote.jpg]] in the annotation table.
  
 
===Use Cases, Examples===
 
===Use Cases, Examples===
Line 45: Line 50:
 
This module is especially appropriate for these use cases:
 
This module is especially appropriate for these use cases:
  
* Use Case 1: This module is useful for setting up lists of points to pass to Registration modules.
+
* Use Case 1: This module is useful for basic measurements of volume, area, length, angle.
* Use Case 2: Use fiducials to annotate scenes.
+
* Use Case 2: Use eight different annotations to annotate medical images.
 
 
Examples of the module in use:
 
 
 
* Example 1: Set down fiducials along the midline of a brain and the ACPC line and pass them into the ACPC transform module to calculate a transform from the two lists of fiducials.
 
* Example 2: Put down a fiducial and use it with the Fiducial Seeding tractography module to generate fibre tracts that go through the point defined by the fiducial.
 
  
 
===Tutorials===
 
===Tutorials===
Line 57: Line 57:
 
Links to tutorials explaining how to use this module:
 
Links to tutorials explaining how to use this module:
  
* Tutorial 1
+
* Tutorial (coming soon)
** Data Set 1
+
* Data Set (coming soon)
  
 
===Quick Tour of Features and Use===
 
===Quick Tour of Features and Use===
 +
* '''miAnnotation Main Panel''':
 +
{|
 +
|
 +
* '''Upper Panel:'''
 +
**8 different annotation types
 +
**controls for mouse modes
  
Annotated GUI layout: (see below for a detailed description of each element, listed by panel.)
 
  
[[Image:UIDesignSlicer3.4FiducialsGUIDraft5Anno.png]]
 
  
* '''Modify All Fiducial Lists & Their Fiducial Points panel:'''
 
{| border="1"
 
|-
 
| rowspan="5"| [[Image:SlicerFiducialsModifyAllPanel-3.4.png]]
 
|-
 
| colspan="3" | '''Global Control of Fiducial Lists''' icons.
 
|- valign="top"
 
| [[Image:SlicerFiducialListsSelectAll-3.4.png]] Select all fiducial points from all lists.
 
| [[Image:SlicerFiducialListsSelectNone-3.4.png]] Deselect all fiducial points from all lists.
 
| [[image:SlicerFiducialListsDeleteAll-3.4.png]] Delete all fiducials lists and the fiducials they contain.
 
|-
 
| [[Image:SlicerHideExposeAllFiducialLists-3.4.png]] Hide or expose all fiducial lists (preserve fiducial visibility settings).
 
| [[Image:SlicerLockOrUnlock.png]] Lock or unlock all fidicuial lists so that they cannot or can be moved in 3D.
 
| [[Image:SlicerVisibleOrInvisible.png]] Set visibility on all fiducials in all fiducial lists (preserve hide/expose settings).
 
|}
 
* '''Modify a Selected Fiducial List & Its Fiducials panel:'''
 
{| border="1"
 
|-
 
| rowspan="5" | [[Image:SlicerFiducialListDisplayPanelCollapsed-3.4.png]]
 
|-
 
| colspan="5" | '''Control a Selected List''' icons
 
|- valign="top"
 
| [[Image:SlicerHideFiducialList.png]] [[Image:SlicerExposeFiducialList.png]] Hide or expose the selected fiducial list (preserves fiducial visibility settings)
 
| [[Image:SlicerFiducialListLock-3.4.png]] [[Image:SlicerFiducialListUnlock-3.4.png]] Lock or unlock the selected fiducial list.
 
| [[Image:SlicerVisibleOrInvisible.png]] Set visibility on all fiducials in the selected list
 
| [[Image:SlicerDeleteFiducialList-3.4.png]] Delete all fiducial points in the selected list and then delete the list.
 
|}
 
* '''Add and Modify Individual Fiducials panel:'''
 
You can reset the positions of the fiducials in the table that appears in the Add, Configure and Delete section of the Fiducials GUI.
 
{| border="1"
 
|-
 
| rowspan="5"| [[Image:SlicerFiducialsAddModifyIndividualFiducials-3.4.jpg]]
 
|-
 
| colspan="5" | '''Add & Modify Individual Fiducials''' icons.
 
|- valign="top"
 
| [[image:SlicerFiducialsSelectAllInList-3.4.png]] Select all fiducial points from this fiducial list.
 
| [[image:SlicerFiducialsSelectNoneInList-3.4.png]] Deselect all fiducial points from this fiducial list.
 
| [[Image:SlicerFiducialsAddNew-3.4.jpg]] Add a fiducial point to the current fiducial list, at (0,0,0).
 
| [[Image:SlicerFiducialsUp.png]] Move last clicked fiducial up one in the list.
 
| [[Image:SlicerFiducialsDown.png]] Move last clicked fiducial down one in the list.
 
|-
 
| [[image:SlicerFiducialsDeleteLastClicked-3.4.png]] Delete the last fiducial that was clicked on in the table.
 
| [[image:SlicerFiducialsDeleteAll-3.4.png]] Delete all fiducial points from this fiducial list.
 
|}
 
{| border="1"
 
|-
 
| rowspan="8"| [[Image:SlicerFiducialsListBox-3.4.jpg]]
 
|-
 
| '''Selected''': flag set to checked if this fiducial is selected
 
|-
 
| '''Visible''' : icon set to an open eye if this fiducial is visible, close if invisible.
 
|-
 
| '''Name''': text to be displayed at this fiducial location
 
|-
 
| '''X''' : X axis location of this fiducial, corresponding to R in RAS
 
|-
 
| '''Y''' : Y axis location of this fiducial, corresponding to A in RAS
 
|-
 
| '''Z''' : Z axis location of this fiducial, corresponding to S in RAS
 
|-
 
| '''Locked''' : icon set to a closed lock if this fiducial is locked
 
|}
 
{| border="1"
 
|-
 
| rowspan="5"| [[Image:SlicerFiducialsDistance-3.6.jpg]]
 
|-
 
| '''Distance''': distance between first two selected fiducials, updated as selection changes and fiducials are moved.
 
|-
 
| '''List Distance''': distance between all selected fiducials in list, updated as selection changes and fiducials are moved.
 
|-
 
| '''Renumber Fiducials''': Renumber the fiducials in this list. Removes any numbers from the ends of the labels and then appends a number denoting the current place in the list, starting from entered value, 0 if none. Note: does not affect the auto name generation for the next added fiducial.
 
| '''Rename Fiducials''': Rename the fiducials in this list. Preserves any numbers at the end of the labels. Note: does not affect the auto name generation for the next added fiducial - change the list name from the node selector.
 
|-
 
| '''Numbering Scheme''': Set the numbering scheme used to assign integers to the next added fiducial in the list. UseID uses the point ID, UseIndex uses the list index of the point, UsePrevious increments the number at the end of the previous point.
 
  
|}
 
  
Click on a value and hit the 'Enter' key (or double click) on one of the X, Y, or Z position values to edit it manually. You can do the same on the fiducial name to change it. The default name is generated from the name of the list, which can be changed in the Data Module.
 
  
The distance between the first two selected fiducials in the list will be computed automatically and appear in a label below the list of fiducials. This distance is in milimetres.
+
* '''Middle Panel:'''
 +
**A table contains all annotations
 +
**Edit annotation properties
 +
**Edit annotation table
  
To align slices with fiducials, move the fiducial while holding down the Control key. You can use the '`' (backtick) key to jump to the next fiducial, Control-` to jump backwards through the list.
 
  
Use the backspace or delete key to delete a fiducial over which you are hovering in 2D.
 
  
Argument Lists: Fiducials can be passed as a list of points to a command line module, for example to do ACPC registration. Only the points that are selected in the list are passed to the command line module, so you can adjust which points are used for calculating the output.
 
  
* '''Other List Display Properties panel:'''
 
  
{| border="1"
+
* '''Lower Panel:'''
|-
+
**Save as text format
| rowspan="11"| [[Image:SlicerFiducialListDisplayPanelExpanded-3.4.png]]
+
**Save screen shot
|-
+
**Save entire MRML structure
| '''Glyph Type''': Select the glyph used to represent this point in 3D. There is a long list of glyph types available, each list can have a different glyph type, as well as colour and size properties. The default is the 2D starburst, but 3D glyphs are also available.
+
**Save report as HTML format
  
[[Image:FiducialsGlyphTypes.jpg]]
+
|[[Image:miAnnotation-MainPanel.jpg|thumb|560px|Main Panel]]
|-
 
| '''Selected Color''': Select the color used to represent the fiducials when they are selected.
 
|-
 
| '''Unselected Color''': Select the color used to represent the fiducials when they are not selected.
 
|-
 
| '''Glyph Scale''': Select the scale of the glyph. For the 3d glyphs (Sphere and Diamond3D), 1 corresponds to 1mm in diameter.
 
|-
 
| '''Text Scale''': Select the scale of the fiducial label text.
 
|-
 
| '''Opacity''': Select the opacity of the fiducial glyph and text. 0 = invisible.
 
|-
 
| '''Ambient''': Set the ambient material property for the fiducial glyph.
 
|-
 
| '''Diffuse''': Set the diffuse material property for the fiducial glyph.
 
|-
 
| '''Specular''': Set the specular material property for the fiducial glyph.
 
|-
 
| '''Power''': Set the power material property for the fiducial glyph.
 
 
|}
 
|}
  
The following image shows what these types of glyphs look like in 3D:
+
* '''Edit annotation table''':
[[image:SlicerFiducialsGlyphs3D-3.4.jpg]]
+
** Click hide/unhide icon [[File:miAnnotation-Visibility.jpg]] to hide and unhide a single annotation in the viewers
 +
** Click lock/unlock icon [[File:miAnnotation-Lock.jpg]] to lock and unlock a single annotation in the viewers to enable and disable the user interaction
  
and in 2D (the 3D glyphs default to a star burst in 2D):
+
* '''Save Annotations''':
[[Image:SlicerFiducialsGlyphs2D-3.4.jpg]]
+
{|
 +
|
 +
*Save screen shot
  
===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:
 
  
<pre>
 
# 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
 
</pre>
 
  
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
+
*Save entire MRML structure
  
{|border="1"
 
|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:
 
  
{|border="1"
 
|+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. <pre>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</pre>
 
|-
 
|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 <pre>label,x,y,z,sel,vis</pre>. 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:
 
  
#In Slicer3, open the File, Save dialog and select the fiducial list to save.
 
#Set the file name, ending with .fcsv, and the directory in which to save it
 
#Open OpenOffice.org's Calc
 
#Click on ''File, Open''
 
#Expand the File type menu
 
#Select '''Text CSV''' as the file type
 
#Make sure '''All Files''' is selected for the directory listing filter
 
#Browse to the directory in which you saved your .fcsv file and select it, then click ''Open''
 
#The Text Import window will pop up
 
#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)
 
#Click ''Open'' and the import will finish, with the fiducial points starting on row 18
 
  
To open a list in Excel 2007:
 
  
#In Slicer3, open the ''File, Save'' dialog and select the fiducial list to save.
+
*Save HTML
#Set the file name, ending with .fcsv, and the directory in which to save it
+
|[[Image:miAnnotation-Screenshot.jpg|thumb|280px|Save Screen Shot]]
#Click on the symbol in the top left to open the menu, select ''Open'' (if ''Import'' is an option, use it instead)
+
[[Image:miAnnotation-MRML.jpg|thumb|280px|Save MRML Structure]]
#Set the filter to '''All Files (*.*)'''
+
[[Image:miAnnotation-HTML.jpg|thumb|280px|Save HTML Format]]
#Browse to the directory in which you saved your .fcsv file and select it, then click ''Open''
+
|}
#Text Import Wizard will open
 
#In Original Data Type, select '''Delimited'''
 
#Click ''Next''
 
#In Delimiters, select '''Comma''' only
 
#Click ''Next''
 
#The Column data format should be fine as '''General'''
 
#Click ''Finish''
 
  
 
== Development ==
 
== Development ==
Line 341: Line 126:
 
===Notes from the Developer(s)===
 
===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.
+
miAnnotation is not part of Slicer3.6. To use the module, you have to use the trunk version of the Slicer3.  See [https://www.slicer.org/wiki/Slicer4:Build_Instructions the build instructions].
  
 
===Dependencies===
 
===Dependencies===
  
No other modules or packages are required for this module's use.
+
Fiducials and Measurements Modules are currently needed.  Later these will be integrated into a unified Annotations module.
  
 
===Tests===
 
===Tests===
Line 351: Line 136:
 
On the [http://www.cdash.org/CDash/index.php?project=Slicer3 Dashboard], these tests verify that the module is working on various platforms:
 
On the [http://www.cdash.org/CDash/index.php?project=Slicer3 Dashboard], these tests verify that the module is working on various platforms:
  
* vtkMRMLFiducialListNodeTest1 [http://viewvc.slicer.org/viewcvs.cgi/trunk/Libs/MRML/Testing/vtkMRMLFiducialListNodeTest1.cxx Libs/MRML/Testing/vtkMRMLFiducialListNodeTest1.cxx]
+
* vtkSlicermiAnnotationModuleLogicTest1.cxx
* vtkMRMLFiducialListStorageNodeTest1 [http://viewvc.slicer.org/viewcvs.cgi/trunk/Libs/MRML/Testing/vtkMRMLFiducialListStorageNodeTest1.cxx Libs/MRML/Testing/vtkMRMLFiducialListStorageNodeTest1.cxx]
+
* vtkMRMLAnnotationStorageNodeTest1.cxx
* Slicer3FiducialsTest1 [http://viewvc.slicer.org/viewcvs.cgi/trunk/Base/GUI/Testing/TestFiducials.tcl Base/GUI/Testing/TestFiducials.tcl]
+
* vtkMRMLAnnotationRulerStorageNodeTest1.cxx
* Slicer3FiducialsTest2 [http://viewvc.slicer.org/viewcvs.cgi/trunk/Base/GUI/Testing/TestFiducialsAdd.tcl Base/GUI/Testing/TestFiducialsAdd.tcl]
+
* vtkMRMLAnnotationRulerNodeTest1.cxx
* Slicer3FiducialsTestGlyphs [http://viewvc.slicer.org/viewcvs.cgi/trunk/Base/GUI/Testing/TestFiducialsGlyphs.tcl Base/GUI/Testing/TestFiducialsGlyphs.tcl]
+
* vtkMRMLAnnotationPointDisplayNodeTest1.cxx
* Slicer3FiducialsTestChangeGlyphs [http://viewvc.slicer.org/viewcvs.cgi/trunk/Base/GUI/Testing/TestFiducialsAddSymbolScale.tcl Base/GUI/Testing/TestFiducialsAddSymbolScale.tcl]
+
* vtkMRMLAnnotationNodeTest1.cxx
 +
* vtkMRMLAnnotationLinesStorageNodeTest1.cxx
 +
* vtkMRMLAnnotationLinesNodeTest1.cxx
 +
* vtkMRMLAnnotationLineDisplayNodeTest1.cxx
 +
* vtkMRMLAnnotationFiducialsStorageNodeTest1.cxx
 +
* vtkMRMLAnnotationFiducialNodeTest1.cxx
 +
* vtkMRMLAnnotationDisplayNodeTest1.cxx
 +
* vtkMRMLAnnotationControlPointsStorageNodeTest1.cxx
 +
* vtkMRMLAnnotationControlPointsNodeTest1.cxx
 +
* vtkMRMLAnnotationAngleStorageNodeTest1.cxx
 +
* vtkMRMLAnnotationAngleNodeTest1.cxx
 +
* qSlicermiAnnotationModuleAnnotationPropertyDialogTest1.cxx
  
 
===Known bugs===
 
===Known bugs===
Line 371: Line 167:
  
 
Source Code:
 
Source Code:
*[http://viewvc.slicer.org/viewcvs.cgi/trunk/Base/GUI/vtkSlicerFiducialsGUI.cxx vtkSlicerFiducialsGUI.cxx], [http://viewvc.slicer.org/viewcvs.cgi/trunk/Base/GUI/vtkSlicerFiducialsGUI.h vtkSlicerFiducialsGUI.h]
+
*[http://viewvc.slicer.org/viewcvs.cgi/trunk/QTModules/miAnnotation/
*[http://viewvc.slicer.org/viewcvs.cgi/trunk/Base/GUI/vtkSlicerFiducialListWidget.cxx vtkSlicerFiducialListWidget.cxx], [http://viewvc.slicer.org/viewcvs.cgi/trunk/Base/GUI/vtkSlicerFiducialListWidget.h vtkSlicerFiducialListWidget.h]
 
*[http://viewvc.slicer.org/viewcvs.cgi/trunk/Base/GUI/vtkSlicerSeedWidgetClass.cxx vtkSlicerSeedWidgetClass.cxx], [http://viewvc.slicer.org/viewcvs.cgi/trunk/Base/GUI/vtkSlicerSeedWidgetClass.h vtkSlicerSeedWidgetClass.h]
 
*[http://viewvc.slicer.org/viewcvs.cgi/trunk/Base/Logic/vtkSlicerFiducialsLogic.cxx vtkSlicerFiducialsLogic.cxx], [http://viewvc.slicer.org/viewcvs.cgi/trunk/Base/Logic/vtkSlicerFiducialsLogic.h vtkSlicerFiducialsLogic.h]
 
  
Links to documentation generated by doxygen:
+
UML class diagrams of selected functionalities:
*[http://www.na-mic.org/Slicer/Documentation/Slicer3-doc/html/classvtkSlicerFiducialsGUI.html vtkSlicerFiducialsGUI]
+
[[Image:Annotation Module TextNodes Class Diagram.png|thumb|left|Classes involved in adding Text annotations]]
*[http://www.na-mic.org/Slicer/Documentation/Slicer3-doc/html/classvtkSlicerFiducialListWidget.html vtkSlicerFiducialListWidget]
 
*[http://www.na-mic.org/Slicer/Documentation/Slicer3-doc/html/classvtkSlicerFiducialsLogic.html vtkSlicerFiducialsLogic]
 
  
 
== More Information ==  
 
== More Information ==  
  
 
===Acknowledgment===
 
===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.
+
This work is supported by an [[Projects:ARRA:SlicerAM | ARRA supplement to the Neuroimage Analysis Center (NAC), an NCRR Resource Center, NIH NCRR grant P41 RR13218]].
 +
This work is part of the National Alliance for Medical Image Computing (NA-MIC), funded by the National Institutes of Health through the NIH Roadmap for Medical Research, Grant U54 EB005419.
  
 
===References===
 
===References===

Latest revision as of 17:36, 10 July 2017

Home < Annotation Documentation

Return to ARRA Page


miAnnotation

miAnnotation (Medical Image Annotation)

GUI

General Information

This module is a work in progress targeted for release with 3D Slicer version 4

Module Type & Category

Type: Interactive

Category: Base

Authors, Collaborators & Contact

  • Kilian Pohl: pohl@csail.mit.edu
  • Daniel Haehn: haehn@bwh.harvard.edu
  • Past Contributors:
    • 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

  • miAnnotation Main Panel:
  • Upper Panel:
    • 8 different annotation types
    • controls for mouse modes




  • Middle Panel:
    • A table contains all annotations
    • Edit annotation properties
    • Edit annotation table



  • Lower Panel:
    • Save as text format
    • Save screen shot
    • Save entire MRML structure
    • Save report as HTML format
Main Panel
  • Edit annotation table:
    • Click hide/unhide icon MiAnnotation-Visibility.jpg to hide and unhide a single annotation in the viewers
    • Click lock/unlock icon MiAnnotation-Lock.jpg to lock and unlock a single annotation in the viewers to enable and disable the user interaction
  • Save Annotations:
  • Save screen shot





  • Save entire MRML structure





  • Save HTML
Save Screen Shot
Save MRML Structure
Save HTML Format

Development

Notes from the Developer(s)

miAnnotation is not part of Slicer3.6. To use the module, you have to use the trunk version of the Slicer3. See the build instructions.

Dependencies

Fiducials and Measurements Modules are currently needed. Later these will be integrated into a unified Annotations module.

Tests

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

  • vtkSlicermiAnnotationModuleLogicTest1.cxx
  • vtkMRMLAnnotationStorageNodeTest1.cxx
  • vtkMRMLAnnotationRulerStorageNodeTest1.cxx
  • vtkMRMLAnnotationRulerNodeTest1.cxx
  • vtkMRMLAnnotationPointDisplayNodeTest1.cxx
  • vtkMRMLAnnotationNodeTest1.cxx
  • vtkMRMLAnnotationLinesStorageNodeTest1.cxx
  • vtkMRMLAnnotationLinesNodeTest1.cxx
  • vtkMRMLAnnotationLineDisplayNodeTest1.cxx
  • vtkMRMLAnnotationFiducialsStorageNodeTest1.cxx
  • vtkMRMLAnnotationFiducialNodeTest1.cxx
  • vtkMRMLAnnotationDisplayNodeTest1.cxx
  • vtkMRMLAnnotationControlPointsStorageNodeTest1.cxx
  • vtkMRMLAnnotationControlPointsNodeTest1.cxx
  • vtkMRMLAnnotationAngleStorageNodeTest1.cxx
  • vtkMRMLAnnotationAngleNodeTest1.cxx
  • qSlicermiAnnotationModuleAnnotationPropertyDialogTest1.cxx

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:

UML class diagrams of selected functionalities:

Classes involved in adding Text annotations

More Information

Acknowledgment

This work is supported by an ARRA supplement to the Neuroimage Analysis Center (NAC), an NCRR Resource Center, NIH NCRR grant P41 RR13218. This work is part of the National Alliance for Medical Image Computing (NA-MIC), funded by the National Institutes of Health through the NIH Roadmap for Medical Research, Grant U54 EB005419.

References