Hi Caspar,
Many thanks for your reply ; better after some time than never ;)
Ideally I would prefer not putting restriction on the color, thus go for the
16+million possible colors.
But the alternatives suggested sound nice for a “coarse to fine” implementation.
Thanks for the tips, I will try it out soon,
Best,
Hortense
----
Hortense KIRISLI, PhD
Research & Development Engineer
AQUILAB
Parc Eurasanté – Lille Métropole
Bâtiment Hermès
250 rue Salvador Allende
59120 Loos Les Lille - France
Tel. +33 3 69 61 51 65
www.aquilab.com<http://www.aquilab.com>
[AQUILAB]
----
De : Goch, Caspar Jonas [mailto:[email protected]]
Envoyé : mardi 8 juillet 2014 17:49
À : Hortense KIRISLI; mitk-users [[email protected]]
Objet : AW: Binary image node icon change on node color change
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
------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users