Difference between revisions of "Documentation/Labs/Slicer5-roadmap"

From Slicer Wiki
Jump to: navigation, search
Line 14: Line 14:
** Improve asynchronous behavior (like loading data in a background thread)
** Improve asynchronous behavior (like loading data in a background thread)
* Defining core and extensions
* Defining core and extensions
** Core functionality is:
*** DICOM and other format I/O, Subject management
*** Visualization 2D/3D/4D
*** Segmentation
*** Transforms and Registration
*** Annotations and Markups
** Move some extensions to core (Sequences, DICOMPlugins...)
** Move some extensions to core (Sequences, DICOMPlugins...)
** Move some core to extensions (SimpleITK, Editor...)
** Move some core to extensions (SimpleITK, Editor...)

Revision as of 14:23, 13 December 2018

Home < Documentation < Labs < Slicer5-roadmap

The major version number upgrade to 5 provides an opportunity to make changes that affect the application, the API, or the code in a way that was not possible in the past seven or so years.

This page collects community suggestions related to the transition plan for Slicer 4.10 and major changes for Slicer 5.0.

Related forum post: https://discourse.slicer.org/t/slicer-5-0-deprecation-discussion-wiki/2377

Overall Goals

  • Improve user experience
    • More logical interface
    • Perform most common tasks easily
    • Easier to discover advanced features
    • Improve asynchronous behavior (like loading data in a background thread)
  • Defining core and extensions
    • Core functionality is:
      • DICOM and other format I/O, Subject management
      • Visualization 2D/3D/4D
      • Segmentation
      • Transforms and Registration
      • Annotations and Markups
    • Move some extensions to core (Sequences, DICOMPlugins...)
    • Move some core to extensions (SimpleITK, Editor...)
  • Simplify maintenance
    • Remove legacy code that adds more complexity than value
    • Deprecate support for older build options and platforms (old libs, old compilers, etc)
    • Simplify documentation creation and use
    • Streamline the build and release process
    • Use unmodified upstream libraries
  • Developer experience
    • Improve API / Scripting documentation organization / search engine optimization
    • Simplify/accelerate build process on all platforms (options to use prebuilt sdk for example)
    • Use standard packages (Qt, Python, VTK, ITK)

Specific Change Proposals


Switch to Python3 and use the same compiler as official Python distribution. This would allow installation of any Python package inside Slicer's Python environment.

Slicer 5.0: Backward incompatible changes


The scene views feature does not work well for a long time now, and there is no consensus about what should be the scope it supports.


  • Do not save the state of all nodes: Support only display, view and hierarchy nodes.
  • Make SceneViews as stable as possible for these cases and remove support for data notes etc.
  • If a node is removed, update associated scene views


Similarly to SceneViews, it is a great feature but in time it started breaking. Need to decide if we want to keep it, and if yes fix it.

Potential fix (currently being tested by Kyle Sunderland and Andras Lasso): Add an "undo enabled" flag to vtkMRMLNode, disable it by default, only enable it for nodes that undo/redo has tested to work correctly. Preliminary tests show that the feature largely works, but there are complications with undo/redo of node add/remove actions and node references.

Removal of Charts based infrastructure

With Slicer 5.0, the idea is to remove the Charts infrastructure based on jqPlot, and only keep the Plots infrastructure based on VTK Charts.

Revisit MRML Copy API

Copy method does not perform complete deep-copy in some classes. For Sequences, we need both DeepCopy (for node modifications) and ShallowCopy (for fast replay possible).

There are also too many variants of node copy methods, which makes it difficult to use them correctly.

See also https://issues.slicer.org/view.php?id=2608.

Remove remote data support from MRML

MRML theoretically supports downloading files through http, but this feature has not seen much use. This will not likely to change in the future because there is a wide range of data access and authentication protocols, which would not be practical at MRML level.

It would be better to remove remote data support from MRML to simplify data storage. We can keep useful utility classes, such as cache manager for keeping track of local temporary files (downloaded using SampleData or other modules that download significant amount of temporary data).

See also https://discourse.slicer.org/t/improving-testing-data-management-for-self-test/5014/4.

Remove deprecated modules and/or Migrate to extension


The module already directs users to Segment Editor, which provides all the functionality of Editor and more, and is the successor module that will be improved and maintained. Removing it would decrease confusion of both old and new Slicer users

  • Potentially the hack about modules with names ending with the string "Lib" can also be removed after the Editor module will not require it. It is around here.
  • Make Editor hidden in 4.10, advertise its removal (some extensions still use it), then remove it in 5.0. Remove it from toolbar, move Editor to legacy category in 4.10
  • Investigate if the module could easily be moved to an extension


The plan would be to improve the Volume module so that vector volume could be converted to scalar volume, similarly to scalar to labelmap conversion option. Then, this module could be removed.

Unused module code

  • MultiVolumeRendering: A module that was effectively not developed since 2012, and is not currently compiled with Slicer. - Removed in r27087
  • Measurements: Same argument as MultiVolumeRendering - Removed in r27087
  • AtlasCreator Loadable module logic - Removed in r27088

CLI modules

  • Model to Label Map: Has too many limitations and bugs (cannot handle concave structures, can cause Slicer to hang or crash, etc.), and is not maintained any more. It might be better to remove it than to fix it, especially that there is an algorithm for the same thing in Slicer that works much better
    • The model node to labelmap node conversion feature could be added as a subject hierarchy plugin, if the route via segmentation node is not convenient enough
  • Review CLI modules
    • BlobDetection
    • ConnectedComponent
    • GrayscaleModelMaker, ModelMaker: The modules are too different to combine them. Each have specific use cases.
    • DiffusionTensorTest, ROITest, TestGridTransformRegistration: Already excluded from package by specifying NO_INSTALL
    • Resample Scalar Volume: Resample Scalar/Vector/DWI Volume module (which Crop Volume uses as well) can do everything it does already, except for four extra interpolation options. Probably can be removed

Migrate to extension

Existing DMRIInstall scripted module will be re-factored and moved into a Modules/Scripted/InstallSuggestions directory.

Then, after transitioning them to extension, the following module will be added to the "InstallSuggestions" so that the user knows how to install them:

  • BRAINSTools (also add SlicerElastix to the suggestions)
  • SimpleITK: Only used in the editor
  • EMSegment: already disabled in Slicer-4.10, so it may be completely removed from build scripts instead of moving it to an extension

Coding Style

Slicer 5.0: Indentation of curly braces

In Slicer the curly braces have a two-space indentation everywhere within functions. As this was inherited from VTK, but VTK changed its convention to align the braces with the statements (if etc.), it could make sense to make the change in Slicer too. This is considered a major change because it affects almost all cxx files.

Simpler VTK smart pointer usage

Use vtkNew<type> var; instead of vtkSmartPointer<type> var = vtkSmartPointer<type>::New(); and remove now unnecessary .GetPointer() calls.


Tcl codes

Most of the TCL code seems to be a heritage from Slicer3. Can they be removed? - Done in r27091

Remove self-test modules from the All modules list

Users already find the all modules list very long, and as the self tests are for developers only (and can be found in the modules list under the Testing category), they could be removed from the list.

Remove BTX/ETX pairs

Once VTK7 is no longer supported, the old way for disabling python wrapping is no longer needed. According to my tests (Csaba), wrapping works fine in all of those cases, so the new way (#ifndef __VTK_WRAP__) is not needed either.

Additional proposed changes to be discussed

- Bundle IPython package in Slicer installer - Install using brew