Import 2017-06-07 23:51:09: master e2bd1ae5

Author Committer Branch Timestamp Parent
jcfr jcfr master 2015-10-27 20:12:05 master b304b93a
Affected Issues 0003992: LUT lost when changing scene views
Changeset

BUG: Preserve custom color tables on scene view restore

Moving the color table information into files on disk created
a bug (analogous to the same situation with fiducials[1]) that when
a scene contains scene views that contain custom color tables
the scene view restore wipes out the colors in the color node
in the main scene. When a MRML file is read, the files on disk
are not reread to fill in scene view nodes, so the scene view
color table node is empty. This fix adds a check for if the
scene is currently restoring a scene view, and if so, don't
proceed with the copy as it will result in an color table
with the correct number of entries (as the number of colors is
saved in the MRML file) but all black and unamed.
Added a test to ensure that restoring scene views with changed
color table nodes doesn't result in a zeroed out color table,
nor a changed one (for this work around state)

[1] fiducials were fixed in this commit:
http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=24376
https://github.com/Slicer/Slicer/commit/1440084bbdd9d11c1e9e1f195087f521a91af186

Issue 0003992

From: Nicole Aucoin <nicole@bwh.harvard.edu>

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

mod - Libs/MRML/Core/vtkMRMLColorTableNode.cxx Diff File
mod - Modules/Loadable/Colors/Testing/Python/CMakeLists.txt Diff File
add - Modules/Loadable/Colors/Testing/Python/CustomColorTableSceneViewRestoreTestBug3992.py Diff File