Skip to content

ENH: Added the enhanced scalarbar actor class based on VTK6.

The VTK6 vtkScalarBarActor class allows displaying annotations in conjunction with labels. However, in Slicer we want to sample the annotations for display just like color values since some color tables have more than 10000 values and annotations. The vtkSlicerScalarBarActor is based on vtkScalarBarActor class and only overrides its LayoutTicks method to slightly modify the method to enable sampling the annotations and display it as labels. Also change colors module logic using the new class. Keep backward compatibility to VTK5. Also added a python selftest. Added a check box to toggle using the color names as labels, and set default label formats when it's toggled to support strings or numbers. Added simple label format testing to avoid crashes that were seen when using a string format with a number value. Joint work between Kevin Wang and Nicole Aucoin

Issue #2919

Merge request reports