Page MenuHomePhabricator

QmitkDataStorageComboBox does not react on DICOM node changes
Closed, ResolvedPublic

Description

To reproduce:

  1. Load a DICOM image into the data storage
  2. Open a plugin with a QmitkDataStorageComboBox, e.g. the segmentation plugin
  3. Rename the loaded image (the data node) in the data manager

Result: The name of the node in the combo box will not be changed.
Expected result: The combo box should reflect the name changes of data nodes.

Revisions and Commits

Event Timeline

kalali triaged this task as Normal priority.Jun 4 2019, 6:04 PM
kalali created this task.

The ChangedNodeEvent of the data storage is not used inside the QmitkDataStorageComboBox. A reason for this might be that the changed node event is sent very often.
Instead, a specific listener for the name property is used in QmitkDataStorageComboBox::InsertNode.

However, this does not seem to work if a DICOM image is loaded.
Inside QmitkDataStorageComboBox::InsertNode the "name" property is retrieved and used to add an observer. The name property is also retrieved and valid for a DICOM node, but the name property is not shown in the property list of the data node. The data node does not have a name property but the base data has. So retrieving the "name" property will use the fallback case and use the base data name. This base data name however is not touched if the user changes the data node name e.g. by changing the name in the data manager. Here the property is set to the new value and if the property did not exist before it is newly created (see mitk::PropertyList::SetProperty).

kalali renamed this task from QmitkDataStorageComboBox does not react on node changes to QmitkDataStorageComboBox does not react on DICOM node changes.Jun 21 2019, 1:53 PM
kalali updated the task description. (Show Details)
kalali removed a project: Request for Discussion.

There is a similar problem with the properties view: A DICOM DataNode does not have a name (just the base data). That's why the properties view tab does not have a name until the name of the data node has been changed for the first time in the data manager.
Both bugs appear presumable since the fallback option was added to mitk::DataNode::GetProperty.

I'm hesitant to simply change this in the data data storage combo box since the bug will probably appear elsewhere.

kalali added a revision: Restricted Differential Revision.Jul 8 2019, 12:59 PM