New feature: Shared labelmap segmentations

Segmentations can now store multiple segments in shared 3D volumes, which allows significant decrease in memory usage and improvement in speed.

Previously, segmentations could only contain several tens of segments before the application started to slow down. Segmentations was almost unusable for cases such as atlases, which could contain hundreds of segments. By sharing binary labelmaps between segments, performance remains fast when editing and visualizing, even when the number of segments is high.

For users:

  • Improved speed and memory usage: tested on SPL brain atlas (304 segments)
    • import time: 10.95 sec -> 4.55 sec
    • loading time: 5.69 sec -> <0.3 sec
    • saving time: 18.09 sec -> 5.86 sec; peak memory usage: 5958 MB -> 1344 MB
    • slice browsing: 7.7 fps -> 37.1 fps
    • painting in an effect (overwrite mode): 3.73 sec -> <0.1 sec
  • Segmentation is saved as a simple 3D nrrd file if there are no overlapping segments.
  • 3D nrrd labelmap (such as the ones from ITK-Snap) can be loaded into Slicer direclty as segmentation (choose “Segmentation” in “Description” column in “Add data” dialog).
  • By default, segments are stored on a single layer unless the user paints a region that should overlap another segment on the same layer.
  • The current layer number for each segment can be displayed in the segmentation table by right-clicking on the table and enabling “Show layer column”.
  • The number of layers can be collapsed in the Segmentations module under the “Binary labelmap layers” section.

For developers:

Development was funded in part by CANARIE’s Research Software Program, OpenAnatomy, and Brigham and Women’s Hospital through NIH grant R01MH112748


This is great. I have been looking forward to it for a while: Segmentations can get big!