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

From Slicer Wiki
Jump to: navigation, search
m (Text replacement - "\[https:\/\/www\.slicer\.org\/slicerWiki\/index.php\/([^ ]+) ([^]]+)]" to "$2")
(Replaced content with "<noinclude>{{documentation/versioncheck}}</noinclude> This page has moved to https://slicer.readthedocs.io/en/latest/user_guide/modules/module_data.html")
Tags: 2017 source edit, Replaced
Line 1: Line 1:
 
<noinclude>{{documentation/versioncheck}}</noinclude>
 
<noinclude>{{documentation/versioncheck}}</noinclude>
<!-- ---------------------------- -->
 
{{documentation/{{documentation/version}}/module-header}}
 
<!-- ---------------------------- -->
 
  
<!-- ---------------------------- -->
+
This page has moved to https://slicer.readthedocs.io/en/latest/user_guide/modules/module_data.html
{{documentation/{{documentation/version}}/module-section|Introduction and Acknowledgements}}
 
{{documentation/{{documentation/version}}/module-introduction-start|{{documentation/modulename}} }}
 
{{documentation/{{documentation/version}}/module-introduction-row}}
 
:'''Title''': Data
 
:'''Authors''': Csaba Pinter (Queen's), Julien Finet (Kitware), Alex Yarmarkovich (Isomics), Nicole Aucoin (SPL, BWH)
 
{{documentation/{{documentation/version}}/module-acknowledgements}}
 
:'''Acknowledgements''': 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 was also funded by An Applied Cancer Research Unit of Cancer Care Ontario with funds provided by the Ministry of Health, Canada<br>
 
: '''End-user advocate:''' Ron Kikinis (SPL, NA-MIC)
 
: '''Contact:''' Csaba Pinter, <email>csaba.pinter@queensu.ca</email>, Julien Finet (Kitware), <email>julien.finet@kitware.com</email>
 
{{documentation/{{documentation/version}}/module-introduction-row}}
 
{{documentation/{{documentation/version}}/module-introduction-logo-gallery
 
|{{collaborator|logo|namic}}|{{collaborator|longname|namic}}
 
|{{collaborator|logo|kitware}}|{{collaborator|longname|kitware}}
 
|{{collaborator|logo|isomics}}|{{collaborator|longname|isomics}}
 
|{{collaborator|logo|spl}}|{{collaborator|longname|spl}}
 
|{{collaborator|logo|cco}}|{{collaborator|longname|cco}}
 
}}
 
{{documentation/{{documentation/version}}/module-introduction-end}}
 
 
 
<!-- ---------------------------- -->
 
{{documentation/{{documentation/version}}/module-section|Module Description}}
 
{{documentation/{{documentation/version}}/module-description}}
 
 
 
The Data module acts as a central data-organizing point in Slicer. It shows the data loaded into Slicer in various views. The Subject Hierarchy view shows the data in an easy-to-explore way, and offers operations on the data nodes, while Transform Hierarchy supports exploring transformation chains, and the All Nodes view shows all nodes in an unstructured way<br>
 
 
 
In Subject Hierarchy, DICOM data is automatically added as patient-study-series hierarchy. Non-DICOM data can be parsed if loaded from a local directory structure, or can be manually organized in tree structure by creating DICOM-like hierarchy or folders. Model hierarchies are automatically mirrored in subject hierarchy, so an atlas can be explored the usual way.<br><br>
 
Subject hierarchy provides features for the underlying data nodes, including cloning, bulk transforming, bulk show/hide, type-specific features, and basic node operations such as delete or rename. Additional plugins provide other type-specific features and general operations, see [[Documentation/Labs/SubjectHierarchy|Subject hierarchy labs page]]
 
 
 
<!-- ---------------------------- -->
 
{{documentation/{{documentation/version}}/module-section|Use Cases}}
 
 
 
{|
 
|
 
 
 
* Subject hierarchy view
 
** Overview all loaded data objects in the same place, types indicated by icons
 
** Organize data in folders or patient/subject trees
 
** Visualize and bulk-handle lots of data nodes loaded from disk
 
** Easy show/hide of branches of displayable data
 
** Transform whole study (any branch)
 
** Export DICOM data (edit DICOM tags)
 
** Lots of type-specific functionality offered by the plugins
 
* Transform hierarchy view
 
** Manage transformation chains/hierarchies
 
* All nodes view
 
** Developer tool for debugging problems
 
 
 
<!-- ---------------------------- -->
 
{{documentation/{{documentation/version}}/module-section|Tutorials}}
 
 
 
* 2016: [http://www.na-mic.org/Wiki/index.php/Winter2016TutorialContest This tutorial] demonstrates the basic usage and potential of Slicer’s data manager module Subject Hierarchy using a two-timepoint radiotherapy phantom dataset.
 
* 2015: Tutorial about [[Documentation/4.5/Training|loading and viewing data]].
 
 
 
<!-- ---------------------------- -->
 
{{documentation/{{documentation/version}}/module-section|Panels and their use}}
 
 
 
; Subject hierarchy
 
Contains all the objects in the Subject hierarchy in a tree representation
 
* Data loaded from '''DICOM''' are automatically added to the tree in the right structure (patient, study, series)
 
* '''Non-DICOM''' data also appears automatically in Subject hierarchy. There two ways are two ways to organize them in hierarchy
 
** 'Create hierarchy '''from loaded directory structure'''' action in the context menu of the scene (right-click on empty area, see bottom screenshot). This organizes the nodes according to the local file structure they have been loaded from.
 
** Drag&drop manually under a hierarchy node
 
** Create model or other (e.g. annotation) hierarchies, and see the same structure in subject hierarchy
 
* When an item is selected, the related items are '''highlight'''ed:
 
** Green: Items referencing the current item directly via DICOM or node references
 
** Yellow: Items referenced by the current item directly via DICOM or node references
 
** Light yellow: Items referenced by the current item recursively via node references
 
* Nodes can be drag&dropped under other nodes, thus re-arranging the tree
 
* Basic operations (accessible in the context menu of the nodes by right-clicking them)
 
** '''Transform node or branch''': Double-click the cell of the node or branch to transform in the column named 'Tr', then set the desired transform. If the column is not visible, check the 'Transforms' checkbox under the tree. An example can be seen in the top screenshot at 'Day 2' study
 
** '''Show/hide''' node or branch: Click on the eye icon
 
** '''Delete''': Delete both data node and SH node
 
** '''Rename''': Rename both data node and SH node
 
** '''Clone''': Creates a copy of the selected node that will be identical in every manner. Its name will contain a '_Copy' postfix
 
** '''Edit properties''': If the role of the node is specified (i.e. its icon is not a question mark), then the corresponding module is opened and the node selected (e.g. Volumes module for volumes)
 
** '''Create child...''': Create a node with the specified type
 
* There are no nodes in the tree when Slicer is opened, new nodes can be added by right-clicking the empty area (or the scene item if visible)
 
* Roles and corresponding functions
 
** '''Volumes''': icon, Edit properties and additional information in tooltip
 
*** ''''Register this...'''' action to select fixed image for registration. Right-click the moving image to initiate registration
 
*** ''''Segment this...'''' action allows segmenting the volume, for example, in the Editor module
 
*** ''''Toggle labelmap outline display'''' for labelmaps
 
** '''Models''': icon, Edit properties and additional information in tooltip
 
** '''SceneViews''': icon, Edit properties and Restore scene view
 
** '''Transforms''': icon, additional tooltip info, Edit properties, Invert, Reset to identity
 
** Many others, such as Markups, Charts, Annotations, Tables, etc.
 
* Subject hierarchy item information
 
** Displays detailed information about the selected subject hierarchy item
 
 
 
; Transform hierarchy
 
* '''Nodes''': The view lists all transformable nodes of the scene as a hierarchical tree that describes the relationships between nodes. Nodes are graphical objects such as volumes or models that control the displays in the different views (2D, 3D). To rename an item, double click with the left button on any item (but the scene) in the list. A right click pops up a menu containing different actions: "Insert Transform" creates an identity linear transform node and applies it on the selected node. "Edit properties" opens the module of the node (e.g. "Volumes" for volume nodes, "Models" for model nodes, etc.). "Rename" opens a dialog to rename the node. "Delete" removes the node from the scene. Internal drag-and-drops are supported in the view, while moving a node position within the same parent has no effect, changing the parent of a node has a different meaning depending on the current scene model.
 
* '''Show MRML ID's''': Show/hide in the tree view a second column containing the node ID of the nodes. Hidden by default
 
* '''Show hidden nodes''': Show/hide the hidden nodes. By default, only the main nodes are shown
 
 
 
; All nodes
 
* Unstructured view of all nodes in the scene. Supports Edit properties, Rename, Delete
 
 
 
; Common
 
* '''Filter''': Hide all the nodes not matching the typed string. This can be useful to quickly search for a specific node. Please note that the search is case sensitive
 
* '''MRML node information''': Attribute list of the currently selected node. Attributes can be edited (double click in the "Attribute value" cell), added (with the "Add" button) or removed (with the "Remove" button).
 
 
 
<!-- ---------------------------- -->
 
{{documentation/{{documentation/version}}/module-section|How to}}
 
 
 
; Create new Subject from scratch
 
: Right-click on the empty area and select 'Create new subject'
 
 
 
; Create new folder
 
: Right-click on an existing item or the empty area and select 'Create new folder'. Folder type hierarchy item can be converted to Subject or Study using the context menu
 
 
 
; Rename item
 
: Right-click on the node and select 'Rename', or double-click the name of a node
 
 
 
; Apply transform on node or branch
 
: Double-click the cell of the node or branch to transform in the transform column (same icon as Transforms module), then set the desired transform. If the column is not visible, check the 'Transforms' checkbox under the tree.  An example can be seen in the top screenshot at Patient 2
 
 
 
|
 
[[File:20170425_SubjectHierarchyInDataNode.png|thumb|409px| Subject hierarchy tree]]
 
[[File:SlicerRT_0.13_HuntingtonsLongitudinalInSubjectHierarchy2.png|thumb|622px| Parse local data loaded from directory structures]]
 
[[File:20170425_TransformHierarchyInDataNode.png|thumb|410px| Transform hierarchy]]
 
[[File:20170425_AllNodesInDataNode.png|thumb|410px| All nodes view]]
 
|}
 
 
 
<!-- ---------------------------- -->
 
{{documentation/{{documentation/version}}/module-section|Similar Modules}}
 
N/A
 
 
 
<!-- ---------------------------- -->
 
{{documentation/{{documentation/version}}/module-section|References}}
 
* Additional information on [[Documentation/Labs/SubjectHierarchy|Subject hierarchy labs page]]
 
* Manual editing of segmentations can be done in the [[Documentation/Nightly/Modules/SegmentEditor|Segment Editor module]]
 
 
 
<!-- ---------------------------- -->
 
{{documentation/{{documentation/version}}/module-section|Information for Developers}}
 
* Code snippets accessing and manipulating subject hierarchy items can be found in the [https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Subject_hierarchy script repository]
 
* '''Implementing new plugins''': Plugins are the real power of subject hierarchy, as they provide support for data node types, and add functionality to the context menu items.<br>To create a C++ plugin, implement a child class of qSlicerSubjectHierarchyAbstractPlugin, for Python plugin see below. Many examples can be found in Slicer core and in the SlicerRT extension, look for folders named SubjectHierarchyPlugins.
 
** Writing plugins in '''Python''':
 
*** Child class of AbstractScriptedSubjectHierarchyPlugin which is a Python adaptor of the C++ qSlicerSubjectHierarchyScriptedPlugin class
 
*** Example: [https://github.com/Slicer/Slicer/blob/master/Modules/Loadable/Annotations/SubjectHierarchyPlugins/AnnotationsSubjectHierarchyPlugin.py Annotations] role plugin, [https://github.com/Slicer/Slicer/blob/master/Modules/Scripted/SegmentEditor/SubjectHierarchyPlugins/SegmentEditorSubjectHierarchyPlugin.py function plugin]
 
** '''Role''' plugins: add support for new data node types
 
*** Defines: ownership, icon, tooltip, edit properties, help text (in the yellow question mark popup), visibility icon, set/get display visibility, displayed node name (if different than name of the node object)
 
*** Existing plugins in Slicer core: Markups, Models, SceneViews, Charts, Folder, Tables, Transforms, LabelMaps, Volumes
 
** '''Function''' plugins: add feature in right-click context menu for certain types of nodes
 
*** Defines: list of contect menu actions for nodes and the scene, types of nodes for which the action shows up, functions handling the defined action
 
*** Existing plugins in Slicer core: CloneNode, ParseLocalData, Register, Segment, DICOM, Volumes, Markups, Models, Annotations, Segmentations, Segments, etc.
 
 
 
 
 
<!-- ---------------------------- -->
 
{{documentation/{{documentation/version}}/module-footer}}
 
<!-- ---------------------------- -->
 

Revision as of 22:04, 22 May 2020

Home < Documentation < Nightly < Modules < Data