Page MenuHomePhabricator

Plugin generator created plugins fail to recognize selected images
Closed, InvalidPublic

Description

To reproduce:

  1. Create a plugin using the plugin generator
  2. copy it to the MITK source tree and cmake/build it
  3. Start ExtApp and open plugin
  4. Load image
  5. Click "Do Something" button

Expected results:
Output of "Performing image processing for image '<NAME>'."

Actual results:
Nothing happens

Reason:
In function DoImageProcessing() after
QList<mitk::DataNode::Pointer> nodes = this->GetDataManagerSelection();
nodes is empty even though nodes are selected.

I assume the GetDataManagerSelection() does not work as it should and the plugin generator itself is not at fault, thus the rather high priority and severity. Even if the generated code is just wrong this bug is still fairly important considering most people creating a new plugin will use it to generate one.

Event Timeline

The problem has been fixed in T12203. It was a combination of QmitkAbstractView by default providing empty selections to the workbench and QmitkDataManager clearing its current selection when selection events from other view occured.

kislinsk changed the task status from Invalid to Spite.Jun 27 2018, 1:31 PM
kislinsk added a project: Bulk Edit.
kislinsk changed the task status from Spite to Invalid.Jun 27 2018, 1:36 PM
kislinsk removed a project: Bulk Edit.