Import 2017-06-07 23:51:09: master 6dd8a342

Author Committer Branch Timestamp Parent
jcfr jcfr master 2014-08-14 14:10:10 master ad32fd41
Affected Issues 0002919: Add UseColorNameAsLabel for scalar bar widget
Changeset

ENH: Add enhanced scalarbar actor class based on VTK6. Fixes 0002919

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.

Additional remarks:

  • Change colors module logic using the new class.

  • Keep backward compatibility to VTK5.

  • Added a python selftest based on scripted module superclass.

  • 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.

  • Regular expression associated with LabelFormat could be improved. This
    is tracked by issue 3802

Co-authored-by: Nicole Aucoin <nicole@bwh.harvard.edu>

From: Kevin Wang <kevin.wang@rmp.uhn.ca>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23566 3bd1e089-480b-0410-8dfb-8563597acbee

mod - Modules/Loadable/Colors/CMakeLists.txt Diff File
mod - Modules/Loadable/Colors/Resources/UI/qSlicerColorsModuleWidget.ui Diff File
mod - Modules/Loadable/Colors/Testing/CMakeLists.txt Diff File
add - Modules/Loadable/Colors/Testing/Python/CMakeLists.txt Diff File
add - Modules/Loadable/Colors/Testing/Python/ColorsScalarBarSelfTest.py Diff File
add - Modules/Loadable/Colors/VTKWidgets/CMakeLists.txt Diff File
add - Modules/Loadable/Colors/VTKWidgets/vtkSlicerScalarBarActor.cxx Diff File
add - Modules/Loadable/Colors/VTKWidgets/vtkSlicerScalarBarActor.h Diff File
mod - Modules/Loadable/Colors/qSlicerColorsModuleWidget.cxx Diff File
mod - Modules/Loadable/Colors/qSlicerColorsModuleWidget.h Diff File