Hi Hortense,
sorry for the late reply. We were discussing this issue and in principle this
should be possible.
A very straightforward way would be to check for the assigned color (similarly
to the check performed in the QmitkNodeDescriptorManager to ascertain an image
is binary ) and assign an existing icon depending on the result. This should
work well for a small number of cases, however it becomes impractical if you
have to provide icons for all 16+ million possible colors. Going from there you
could either divide the entire color spectrum into a small number of classes
and implement a function assigning a given color to one of these classes.
Alternatively you could generate an icon of the appropriate color.
In any case, if you add your own descriptors they should overwrite MITKs
default descriptors where applicable, as the GetDescriptor(const
mitk::DataNode* _Node) function of the QmitkNodeDescriptorManager returns the
last added descriptor fitting a given node.
I hope this helps,
Caspar
Von: Hortense KIRISLI [mailto:[email protected]]
Gesendet: Dienstag, 17. Juni 2014 10:01
An: mitk-users [[email protected]]
Betreff: [mitk-users] Binary image node icon change on node color change
Hi all,
I am currently investigating whether it would be possible to change the icon of
a binary image dataNode, to be a square filled with the node color, instead of
the current default binary image icon (square with grey/red pixels).
I have noticed that the icon is set as NodePredicateProperty in the
QmitkNodeDescriptorManager class.
However, I am unsure/doubting of how to link it with the node color, for
instance in the function QmitkDataManagerView::ColorChanged().
Any hint would be welcome!
Thanks in advance,
Regards,
Hortense
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users