Page MenuHomePhabricator

QmitkLevelWindowWidget should not display helper objects in context menu "images"
Closed, ResolvedPublic

Description

When i use the Threshold tool i can see the level window of the "preview" node (which has the property "helper object" and is not shown in the data manager).

I dont think that this should be shown...

Event Timeline

There should be a boolean property for that level window appeareance, maybe it can be useful to display helper objects in level window

And maybe you should change all GetClassName methods by dynamic_cast's to support inherited data from mitk::Image!

Are you currently working on this Mathias?

no, that's a party bug that anybody could look into

Taking it for next bug squashing
One possible solution is to check for the helper object bool preoperty and block all such images during QmitkLevelWindowWidgetContextMenu::getContextMenu(QMenu* contextmenu)

i would add a new property, maybe levelwindow.show or something like that. Then it is also possible to add more properties in future like levelwindow.orientation, levelwindow.viewmode, levelwindow.histogrammode etc.

While this would be more poweful, I am not sure if there is additional benefit in controling this behaviour by additional properties. Usually anything declared as helper object is not intended to be directly selected/manipulated by the user and should thus not be accessible but for the intended interface (e.g. in the corresponding bundle).

For developer access the feature described in T5041 allows displaying of helper objects in the datamanager, their selection and subsequent manipulation. If level window access is desired the helper object flag could be unchecked.

Furthermore requiring a property to govern this behaviour would probably increase subsequent bugs, where a helper object that should not have been shown is shown due to the developer forgetting to set the levelwindow.show flag. Personally I prefer to keep the flags that have to be explicitly set for each node to a minimum.

i know what you mean but when you set the levelwindow.view to false at default (for sure only for helper objects) it should prevent forgetting it :-)

But ok if it is the better solution for you then it is ok for me because i do not need that functionality (yet)

Add check for helper object

[SVN revision 27716]
CHG (#4877): Implemented check that level window image menu images are no helper objects