Page MenuHomePhabricator

After changing colormap, cannot return to grayscale
Closed, ResolvedPublic

Description

After changing the colormap of a node in the data manager (right click on the node -> colormap -> some other colormap besides grayscale), the first colormap in the pop-up-menue (grayscale) does not work anymore, i.e. it can be clicked and the pop-up closes, but the colormap of the displayed node stays unchanged.

I used monday's master branch: "commit 26bf5f7cf5fd0986609fc8c3eb173a356e161df7 (HEAD -> master, origin/master, origin/HEAD) Date: Mon Jul 8 09:12:53 2019 +0200", with the following (maybe unusual) build options:

CMAKE_BUILD_TYPE:STRING=RelWithDebInfo
MITK_BUILD_CONFIGURATION:STRING=Custom
BUILD_TESTING:BOOL=OFF
MITK_BUILD_EXAMPLES:BOOL=ON
MITK_BUILD_APP_Diffusion:BOOL=ON
MITK_BUILD_APP_Workbench:BOOL=ON

CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-Og -g -DNDEBUG
CMAKE_CXX_FLAGS:STRING=-fno-delete-null-pointer-checks -fwrapv -fno-strict-overflow -ftrapv -fno-aggressive-loop-optimizations -fstack-protector-strong -fstack-clash-protection -Wno-error=catch-value= -Wno-error=class-memaccess -Wno-error=deprecated-declarations

BLUEBERRY_USE_QT_HELP:BOOL=ON
BUILD_DiffusionConnectomicsCmdApps:BOOL=ON
BUILD_DiffusionFiberProcessingCmdApps:BOOL=ON
BUILD_DiffusionFiberfoxCmdApps:BOOL=ON
BUILD_DiffusionMiscCmdApps:BOOL=ON
BUILD_DiffusionPythonCmdApps:BOOL=OFF
BUILD_DiffusionQuantificationCmdApps:BOOL=ON
BUILD_DiffusionTractographyCmdApps:BOOL=ON
BUILD_DiffusionTractographyEvaluationCmdApps:BOOL=ON
CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=ON
CMAKE_VERBOSE_MAKEFILE:BOOL=OFF
MITK_USE_Vigra:BOOL=ON

Revisions and Commits

Event Timeline

hettich created this task.

Same bug with alternative build configuration:

CMAKE_BUILD_TYPE:STRING=Debug
MITK_BUILD_CONFIGURATION:STRING=Default
BUILD_TESTING:BOOL=ON
CMAKE_CXX_FLAGS:STRING=-fno-delete-null-pointer-checks -fwrapv -fno-strict-overflow -ftrapv -fno-aggressive-loop-optimizations -fstack-protector-strong -fstack-clash-protection -Wno-error=catch-value= -Wno-error=class-memaccess
CMAKE_CXX_FLAGS_DEBUG:STRING=-Og -g
CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=OFF

Both builds done with g++-8 version (Debian 8.3.0-6) 8.3.0, cmake version 3.14.5, make version GNU Make 4.2.1, Qt QMake version 3.1, Qt version 5.11.3 in /usr/lib/x86_64-linux-gnu.

I cannot reproduce this using Windows.
I can reproduce this using Ubuntu 18.04, gcc 7.4.0.

kalali added a project: Restricted Project.Jul 15 2019, 5:24 PM

The problem is with m_Type == type inside mitk::LookupTable::SetType. This variable is always GRAYSCALE when SetType is called inside the QmitkDataNodeColorMapAction. I guess this has something to do with the cloning of the lookup table.
I will take a closer look at this on Friday.

kalali added a revision: Restricted Differential Revision.Jul 19 2019, 12:16 PM
kalali claimed this task.