Difference between revisions of "Documentation/Nightly/Modules/Markups"

From Slicer Wiki
Jump to: navigation, search
Tag: 2017 source edit
 
(28 intermediate revisions by 6 users not shown)
Line 1: Line 1:
 
<noinclude>{{documentation/versioncheck}}</noinclude>
 
<noinclude>{{documentation/versioncheck}}</noinclude>
<!-- ---------------------------- -->
 
{{documentation/{{documentation/version}}/module-header}}
 
<!-- ---------------------------- -->
 
  
<!-- ---------------------------- -->
+
{{documentation/banner
{{documentation/{{documentation/version}}/module-section|Introduction and Acknowledgements}}
+
| text  = [https://slicer.readthedocs.io/en/latest/user_guide/modules/markups.html This page has been moved to read-the-docs.]
{{documentation/{{documentation/version}}/module-introduction-start|{{documentation/modulename}}}}
+
| background-color = 8FBC8F }}
{{documentation/{{documentation/version}}/module-introduction-row}}
 
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 EB005149. Information on NA-MIC can be obtained from the [http://www.na-mic.org/ NA-MIC website].<br>
 
Author: Nicole Aucoin, SPL, BWH<br>
 
Contact: Nicole Aucoin, <email>nicole@bwh.harvard.edu</email><br>
 
{{documentation/{{documentation/version}}/module-introduction-row}}
 
{{documentation/{{documentation/version}}/module-introduction-logo-gallery
 
|{{collaborator|logo|spl}}|{{collaborator|longname|spl}}
 
}}
 
{{documentation/{{documentation/version}}/module-introduction-end}}
 
 
 
<!-- ---------------------------- -->
 
{{documentation/{{documentation/version}}/module-section|Module Description}}
 
This module is used to manage markups in Slicer.
 
 
 
It is based on the functionality in the Slicer 3.6 Fiducials module, with elements from the Slicer 4.2 Annotations module.
 
 
 
Currently, only fiducials are supported.
 
 
 
{{documentation/{{documentation/version}}/module-description}}
 
 
 
Development history can be found in the [[documentation/{{documentation/version}}/Modules/{{documentation/modulename}}#References|references]].
 
 
 
<!-- ---------------------------- -->
 
{{documentation/{{documentation/version}}/module-section|Use Cases}}
 
 
 
This module allows you to add new markups, edit markups in a list, delete markups and modify display properties of markups.
 
 
 
Markups can be passed to command line modules (CLIs) using the <pre>--point</pre> argument.
 
 
 
The Mouse mode tool bar can be used to place new markups by positioning the mouse and right clicking in the viewers. Once you are in Place mode and placing Markups fiducials, you can use the 'p' key to place a new fiducial while the Markups GUI is open. You can also use a right button click to stop placing fiducials when in persistent mode.
 
 
 
The Markups module can convert Annotation fiducials into Markups fiducials, and will offer the user the option of doing it automatically when the Markups GUI is entered. There is also a manual button under the Advanced tab.
 
 
 
<!-- ---------------------------- -->
 
{{documentation/{{documentation/version}}/module-section|Tutorials}}
 
 
 
N/A
 
 
 
<!-- ---------------------------- -->
 
 
 
== Panels ==
 
 
 
<gallery>
 
File:Markups-GUI-Collapsed.png | GUI
 
File:Markups-ModifyList.png | Select the active list, set visibility and lock flags, set uniform scale.
 
File:Markups-JumpSlices.png | Jump the 2D slice view windows to the coordinates of the highlighted markup.
 
File:Markups-ModifyMarkupsInList.png | Modify Markups in list: toggle visibility, selected, and lock flags, delete.
 
File:Markups-Table.png | Table showing the fiducials in the active Markups list
 
File:Markups-Advanced.png | Advanced panel: move markups up or down, add a markup, name format, convert annotation fiducials, display properties for the list of markups
 
File:Markups-DisplayProperties.png | Display properties, inside the Advaned panel, includes 2d projection settings.
 
File:Markups-MouseToolbar.png | Place Markup fiducials by setting the Mouse mode in the tool bar
 
</gallery>
 
{{documentation/{{documentation/version}}/module-section|Panels and their use}}
 
 
 
{{documentation/{{documentation/version}}/module-parametersdescription}}
 
 
 
<!-- ---------------------------- -->
 
{{documentation/{{documentation/version}}/module-section|Similar Modules}}
 
 
 
*[[Documentation/Nightly/Modules/Annotations | Annotations]] module is similar, and will be deprecated as the functionality is moved to the Markups module.
 
 
 
<!-- ---------------------------- -->
 
{{documentation/{{documentation/version}}/module-section|References}}
 
 
 
*[http://wiki.na-mic.org/Wiki/index.php/2013_Summer_Project_Week:MarkupsModuleSummer2013 Summer 2013 Project Week project page]
 
*[http://wiki.na-mic.org/Wiki/index.php/2013_Project_Week:MarkupsModule Winter 2013 Project Week project page]
 
*[http://wiki.na-mic.org/Wiki/index.php/2012_Summer_Project_Week:AnnotationModule Summer 2012 Project Week project page]
 
 
 
<!-- ---------------------------- -->
 
{{documentation/{{documentation/version}}/module-section|Information for Developers}}
 
{{documentation/{{documentation/version}}/module-developerinfo}}
 
 
 
== Python ==
 
 
 
Markups fiducials can be loaded from file:
 
 
 
  slicer.util.loadMarkupsFiducialList('/path/to/list/F.fcsv')
 
 
 
Markups fiducials can be added to the currently active list from the python console by using the following module logic command:
 
 
 
  slicer.modules.markups.logic().AddFiducial()
 
 
 
The command with no arguments will place a new fiducial at the origin. You can also pass it an initial location:
 
 
 
  slicer.modules.markups.logic().AddFiducial(1.0, -2.0, 3.3)
 
 
 
Each vtkMRMLMarkupsFiducialNode has a vector of points in it which can be accessed from python:
 
 
 
  fidNode = getNode("vtkMRMLMarkupsFiducialNode1")
 
  n = fidNode.AddFiducial(4.0, 5.5, -6.0)
 
  fidNode.SetNthFiducialLabel(n, "new label")
 
  # each markup is given a unique id which can be accessed from the superclass level
 
  id1 = fidNode.GetNthMarkupID(n)
 
  # manually set the position
 
  fidNode.SetNthFiducialPosition(n, 6.0, 7.0, 8.0)
 
  # set the label
 
  fidNode.SetNthFiducialLabel(n, "New label")
 
  # set the selected flag, only selected = 1 fiducials will be passed to CLIs
 
  fidNode.SetNthFiducialSelected(n, 1)
 
  # set the visibility flag
 
  fidNode.SetNthFiducialVisibility(n, 0) 
 
 
 
The Markups 3D fiducial displayable manager can be accessed from python allowing debugging of the vtkSeedWidget:
 
 
 
  lm = slicer.app.layoutManager()
 
  td = lm.threeDWidget(0)
 
  ms = vtk.vtkCollection()
 
  td.getDisplayableManagers(ms)
 
  for i in range(ms.GetNumberOfItems()):
 
    m = ms.GetItemAsObject(i)
 
    if m.GetClassName() == "vtkMRMLMarkupsFiducialDisplayableManager3D":
 
      print i, m.GetClassName()
 
      h = m.GetHelper()
 
      seedWidget = h.GetWidget(fidNode)
 
      seedRepresentation = seedWidget.GetSeedRepresentation()
 
      handleRep2 = seedRepresentation.GetHandleRepresentation(2)
 
      print handleRep2.GetDisplayPosition()
 
      print handleRep2.GetWorldPosition()
 
 
 
 
 
<!-- ---------------------------- -->
 
{{documentation/{{documentation/version}}/module-footer}}
 
<!-- ---------------------------- -->
 

Latest revision as of 23:24, 22 May 2020

Home < Documentation < Nightly < Modules < Markups