Difference between revisions of "Modules:Editor-Documentation"

From Slicer Wiki
Jump to: navigation, search
m (Text replacement - "https?:\/\/(?:www|wiki)\.slicer\.org\/slicerWiki\/index\.php\/([^ ]+) " to "https://www.slicer.org/wiki/$1 ")
 
(19 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[[Image:EditorModule.png|thumb|400px|right|Editor Module]]
+
[[Image:Editor3.6-interface.png|thumb|400px|right|Editor Module]]
 
[[Documentation|Return to Slicer Documentation]]
 
[[Documentation|Return to Slicer Documentation]]
  
 
==Introduction==
 
==Introduction==
  
* This is very preliminary
 
* To be completed by Steve Pieper and others
 
 
* See the following [[Slicer3:Editor|page]] for background information
 
* See the following [[Slicer3:Editor|page]] for background information
  
Line 22: Line 20:
 
* '''b''' - move to previous slice
 
* '''b''' - move to previous slice
 
* '''e''' - toggles from the current color to 0 and back (use this while painting or drawing to quickly erase if you go over the line)
 
* '''e''' - toggles from the current color to 0 and back (use this while painting or drawing to quickly erase if you go over the line)
* '''a''' - apply the current outline in Draw Effect
+
* '''a''' or '''Enter''' - apply the current outline in Draw Effect
 
* '''x''' - delete last point added in Draw Effect
 
* '''x''' - delete last point added in Draw Effect
 
* '''`''' - cycle through fiducials (this is the backtick key, usually between Tab and Escape)
 
* '''`''' - cycle through fiducials (this is the backtick key, usually between Tab and Escape)
 +
* '''Control-`''' - cycle backwards through fiducials
 +
* '''z''' - undo the previous effect
 +
* '''y''' - redo last undone operation
  
 
==Volumes==
 
==Volumes==
  
* Creating a new label map:
+
* Creating a new label map: see the different options in the [[Modules:Editor-Documentation-3.6|Editor Module Documentation]].
** Source volume: Indicate the volume that you want to use as the source for creating a new volume.
 
** Provide the name for the label map volume and click the create label map button.
 
 
 
You may also use an existing label map, for example one read from a file or a label map created by a different segmentation module such as the Otsu segmenter.
 
 
 
==[[image:Undo.png]] Undo==
 
The green curved arrow pointing left will go back one editing step.
 
  
 
==Effects==
 
==Effects==
Line 85: Line 79:
  
 
==[[image:LevelTracing.png]] Level Tracing==
 
==[[image:LevelTracing.png]] Level Tracing==
* moving the mouse defines an outline where the pixels all have the same background value as the current background pixel.
+
* moving the mouse defines an outline where the pixels all have the same background value as the current background pixel
* clicking the left mouse button applies that outline to the label map.
+
* clicking the left mouse button applies that outline to the label map
 +
 
 +
==[[image:IdentifyIslands.png]] Identify Islands==
 +
* Use this tool to create a unique label value for each connected region in the current label map.  Connected regions are defined as groups of pixels which touch each other but are surrounded by zero valued voxels.  If FullyConnected is selected, then only voxels that share a face are counted as connected; if unselected, then voxels that touch at an edge or a corner are considered connected.
 +
 
 +
Note: be aware that all non-zero label values labels values are considered equal by this filter and that the result will renumber the resulting islands in order of size.
  
==[[image:ChangeIsland.png]] Change Island (work in progress)==
+
Note: the output label values use the currently selected color table, but the names assigned to islands are arbitrary.  Label values are assigned in order of the size of the island starting with 1.  The value of 0 is assigned to the background.
*Changes color of an island, where Island is a group of connected pixels with the same label. Does not change other voxels with the same label.
+
 
 +
==[[image:ChangeIsland.png]] Change Island==
 +
(work in progress)
 +
* Changes color of an island, where Island is a group of connected pixels with the same label. Does not change other voxels with the same label.
 
* This tool is useful after thresholding, to separate anatomy further.
 
* This tool is useful after thresholding, to separate anatomy further.
** Click Change Island.
+
** Click Change Island
** Click New Label and select a color, or enter a color number.
+
** Click New Label and select a color, or enter a color number
** Click any part of the island.
+
** Click any part of the island
** Pixels that are part of that island will receive the New Label value.
+
** Pixels that are part of that island will receive the New Label value
  
 
==[[image:RemoveIslands.png]] Remove Islands==
 
==[[image:RemoveIslands.png]] Remove Islands==
* Remove Islands: Automatically removes unlabeled voxels within a region.
+
* Remove Islands: Automatically removes unlabelled voxels within a region.
* Useful for removing small areas of noise inside a surrounding thresholded area.
+
* Useful for removing small areas of noise inside a surrounding thresholded area
  
 
==[[image:SaveIsland.png]] Save Island==
 
==[[image:SaveIsland.png]] Save Island==
Line 105: Line 107:
  
 
==[[image:ErodeLabel.png]] Erode and [[image:DilateLabel.png]] Dilate==
 
==[[image:ErodeLabel.png]] Erode and [[image:DilateLabel.png]] Dilate==
* Add or remove a single layer of pixels from the current label value.
+
* Add or remove a single layer of pixels from the current label value
  
 
==[[image:ChangeLabel.png]] Change Label==
 
==[[image:ChangeLabel.png]] Change Label==
Changes ever voxel in the target label map with the input value to the output value.
+
Changes every voxel in the target label map with the input value to the output value
  
 
==Fiducials==
 
==Fiducials==
* Use Previous Fiducial [[image:PrevFiducial.png]] and Next Fiducial [[image:NextFiducial.png]] to cycle through the currently defined fiducial points.
+
* Use Previous Fiducial [[image:PrevFiducial.png]] and Next Fiducial [[image:NextFiducial.png]] to cycle through the currently defined fiducial points
 +
 
 +
==Undo/Redo (was Check Points prior to 3.6.2)==
 +
* The Editor can save state before each effect is applied.  This is useful for experimentation and error correction.  Prior to version 3.6.2 this can be somewhat slow and very memory hungry when working with large volumes so it is disabled by default.  As of version 3.6.2 the save operation is light weight and is enabled by default.
 +
* When enabled the buttons can be used to move forward and back through the volume checkpoints.
 +
* Note that the '''z'''/'''y''' keys can be used for undo/redo.
  
 
==[[Image:ModelMaker.jpg]] Modelmaker==
 
==[[Image:ModelMaker.jpg]] Modelmaker==
* A simple interface to of the full CLI module
+
* A simple interface to of the full CLI module (See [[Modules:Modelmaker-Documentation| Model Maker Documentation]])
 
* The currently selected label number will be used to build.
 
* The currently selected label number will be used to build.
* select smooth model for more pleasing results
+
* Select smooth model for more pleasing results
 
* Just click apply and models of all label maps will be created.
 
* Just click apply and models of all label maps will be created.
 
* Model building runs in the background and the model appears in the 3D view when finished.
 
* Model building runs in the background and the model appears in the 3D view when finished.
  
==Hints==
+
==GrowCutSegment==
 +
https://www.slicer.org/wiki/Modules:GrowCutSegmentation-Documentation-3.6 ==Hints==
 
[[Image:Slicer3-Editor-LabelOutline.png|thumb|400px|right|Menu to show label maps as outlines.]]
 
[[Image:Slicer3-Editor-LabelOutline.png|thumb|400px|right|Menu to show label maps as outlines.]]
* You can use the Image Label Combine filter to make a composite label map from two indpendent input label maps.  Some times it will make sense to have a separate label map for each anatomical structure and then combine them after editing.  In other cases it makes sense to put all structures into the same label map so that you can use the Paint Over option to make clean interfaces between the structures.
+
* You can use the Image Label Combine filter to make a composite label map from two independent input label maps.  Some times it will make sense to have a separate label map for each anatomical structure and then combine them after editing.  In other cases it makes sense to put all structures into the same label map so that you can use the Paint Over option to make clean interfaces between the structures.
 
* The Model Maker can automatically make models for all non-zero values in the label map.  The option for Joint Smoothing creates a 'water tight' set of models.  If you build the models independently the smoothing will cause gaps between the models.
 
* The Model Maker can automatically make models for all non-zero values in the label map.  The option for Joint Smoothing creates a 'water tight' set of models.  If you build the models independently the smoothing will cause gaps between the models.
 
* A large radius paint brush with threshold painting is often a very fast way to segment anatomy that is consistently brighter or darker than the surrounding region, but partially connected to similar nearby structures (this happens a lot).
 
* A large radius paint brush with threshold painting is often a very fast way to segment anatomy that is consistently brighter or darker than the surrounding region, but partially connected to similar nearby structures (this happens a lot).

Latest revision as of 13:15, 27 November 2019

Home < Modules:Editor-Documentation
Editor Module

Return to Slicer Documentation

Introduction

  • See the following page for background information

Terminology:

  • label map volume is a 3D scalar volume node where each voxel is a number indicating the type of tissue at that location. A label volume is associated with a Color Node that maps the numbers into colors and text strings.
  • slice viewer refers to the Red, Yellow, and Green windows that display volume slices on the slicer3 interface
  • effect refers to one of the editor tools in the editor toolbox
  • labeler is a type of effect that modifies the existing label map; labelers have a common set of control options described below.

The Editor Module is used for manipulating label map volumes. Each of the slice viewers can be operated on independently, although typically the same background and label layer will be used in all slice views. Whichever label map volume is selected in the label layer will be the target for each of the editor effects. Any scalar volume can be used as the background layer. For example you may wish to create a label map volume based on a high resolution structural scan, and then edit while looking at a lower resolution diffusion scan.

Keystrokes

  • Space Bar - brings up the editor tool box; normally this is a pop up menu, but you can turn it into a persistent window by clicking the 'pin open' icon.
  • c - brings up the color selection box
  • f - move to next slice
  • b - move to previous slice
  • e - toggles from the current color to 0 and back (use this while painting or drawing to quickly erase if you go over the line)
  • a or Enter - apply the current outline in Draw Effect
  • x - delete last point added in Draw Effect
  • ` - cycle through fiducials (this is the backtick key, usually between Tab and Escape)
  • Control-` - cycle backwards through fiducials
  • z - undo the previous effect
  • y - redo last undone operation

Volumes

Effects

  • Effects operate either by clicking the Apply button in the GUI or by clicking and/or dragging in the slice view. For operations where you use the GUI, the target label map is the one in the Red slice viewer. Otherwise the target is based on which slice viewer you click in.
  • select the label value for the tools to work on. Clicking on the colored box will provide a pop-up with a selection of labels.

Threshold Effect

  • Select a label value.
  • Voxels in the source volume within the range will have the label value that is selected.
  • When apply is clicked, the labels are written into the label map.

Labeler Effects

The following options work for all labelers (draw, paint, level tracing...)

Threshold Painting and Drawing

  • Use Threshold to determine a threshold range and click on Use for Paint
  • Change into Paint or Draw and click on the Threshold button
  • begin painting/drawing

Only voxels where the background value is within the threshold range will be set to the new label value.

Paint Over

When enabled, the labels are set to the new value no matter what their previous value was.

When disabled, only 0 (black/transparent) voxels are set to the new value. Non-zero values are not changed.

Paint.png Paint

  • pick the radius (in millimeters) of the brush to apply
  • left click to apply single circle
  • left click and drag to draw a curve
  • a trace of circles is left which are applied when the mouse button is released

The 'smudge' option can be used when working on the boundary between two or more regions. In this mode, the label color is set to the value of the labelmap where the first left click occurs. This mode allows you to quickly switch between colors.

Draw.png Draw

  • left click to lay individual points of an outline
  • left drag to lay down a continuous line of points
  • 'x' key to delete the last point added
  • right click or 'a' key to apply outline to label map

Rectangle.png Rectangle

  • left click to start rubber band rectangle
  • release button to apply

LevelTracing.png Level Tracing

  • moving the mouse defines an outline where the pixels all have the same background value as the current background pixel
  • clicking the left mouse button applies that outline to the label map

IdentifyIslands.png Identify Islands

  • Use this tool to create a unique label value for each connected region in the current label map. Connected regions are defined as groups of pixels which touch each other but are surrounded by zero valued voxels. If FullyConnected is selected, then only voxels that share a face are counted as connected; if unselected, then voxels that touch at an edge or a corner are considered connected.

Note: be aware that all non-zero label values labels values are considered equal by this filter and that the result will renumber the resulting islands in order of size.

Note: the output label values use the currently selected color table, but the names assigned to islands are arbitrary. Label values are assigned in order of the size of the island starting with 1. The value of 0 is assigned to the background.

ChangeIsland.png Change Island

(work in progress)

  • Changes color of an island, where Island is a group of connected pixels with the same label. Does not change other voxels with the same label.
  • This tool is useful after thresholding, to separate anatomy further.
    • Click Change Island
    • Click New Label and select a color, or enter a color number
    • Click any part of the island
    • Pixels that are part of that island will receive the New Label value

RemoveIslands.png Remove Islands

  • Remove Islands: Automatically removes unlabelled voxels within a region.
  • Useful for removing small areas of noise inside a surrounding thresholded area

SaveIsland.png Save Island

  • Save Island retains the selected island, and removes disconnected pixels with the same label. This is another way to clean up the results of a thresholding operation.
  • Useful for separating a single connected structure from other structures.

ErodeLabel.png Erode and DilateLabel.png Dilate

  • Add or remove a single layer of pixels from the current label value

ChangeLabel.png Change Label

Changes every voxel in the target label map with the input value to the output value

Fiducials

  • Use Previous Fiducial PrevFiducial.png and Next Fiducial NextFiducial.png to cycle through the currently defined fiducial points

Undo/Redo (was Check Points prior to 3.6.2)

  • The Editor can save state before each effect is applied. This is useful for experimentation and error correction. Prior to version 3.6.2 this can be somewhat slow and very memory hungry when working with large volumes so it is disabled by default. As of version 3.6.2 the save operation is light weight and is enabled by default.
  • When enabled the buttons can be used to move forward and back through the volume checkpoints.
  • Note that the z/y keys can be used for undo/redo.

ModelMaker.jpg Modelmaker

  • A simple interface to of the full CLI module (See Model Maker Documentation)
  • The currently selected label number will be used to build.
  • Select smooth model for more pleasing results
  • Just click apply and models of all label maps will be created.
  • Model building runs in the background and the model appears in the 3D view when finished.

GrowCutSegment

https://www.slicer.org/wiki/Modules:GrowCutSegmentation-Documentation-3.6 ==Hints==

Menu to show label maps as outlines.
  • You can use the Image Label Combine filter to make a composite label map from two independent input label maps. Some times it will make sense to have a separate label map for each anatomical structure and then combine them after editing. In other cases it makes sense to put all structures into the same label map so that you can use the Paint Over option to make clean interfaces between the structures.
  • The Model Maker can automatically make models for all non-zero values in the label map. The option for Joint Smoothing creates a 'water tight' set of models. If you build the models independently the smoothing will cause gaps between the models.
  • A large radius paint brush with threshold painting is often a very fast way to segment anatomy that is consistently brighter or darker than the surrounding region, but partially connected to similar nearby structures (this happens a lot).
  • Use the slice viewer menus to control the label map opacity and display mode (to show outlines only or full volume).

Limitations

  • Threshold will not work with non-scalar volume background volumes.
  • Mouse wheel can be used to move slice through volume, but on some platforms (mac) it may move more than one slice at a time.