Page MenuHomePhabricator

[image statistics plugin] Add multithreading
Closed, ResolvedPublic


To use the new multiselection widget (T26269) the CalculationJob has to be replaced with a class inheriting from QRunnable.
Otherwise there may be issues between the threads.

Event Timeline

kraeuter created this task.

The statistic nodes aren't named properly.
All statistic nodes are named after the last thread started, in a small selection they are all named the same.

Right now there is no way to get the names from the runnable, because the runnable itself is only given the image and mask to calculate the statistic.
Both of these do not have a 'name' property. Instead the name is part of the selected node and can thus only be extracted from the node.
There needs to be a way to save the names of the picture and the mask so the resulting statistic can be named correctly.

I wouldn't value the node name of statistic nodes that high, as it has questionable importance/value.

  1. It is an open discussion if the statistic nodes should be visible at all in the data managers/storage inspectors. I currently tend to declare them as helpernodes that are not visible any ways.
  2. The name is not needed for the statistics view. For relations we use the relation rules.
  3. Name properties of nodes must not be "stable"; e.g. the name of an image node could change and then it would not fit any more to the image name encoded in the statistic node name.

Bottom line: I definetly wouldn't change interfaces or introduce dependencies to nodes just for getting node names. But I am open for discussion, if I missed good pro arguments.

Modified this feature with respect to changes made in T26348. Also fixed the naming by using the UID of image and mask that are currently processed by a QRunnable.