Von: "Fetzer, Andreas" <a.fet...@dkfz-heidelberg.de>
An: "'Ingmar Wegner'" <iweg...@gmx.de>, "Mitk Users" <mitk-users@lists.sourceforge.net>
Betreff: RE: [mitk-users] Best way to reach StdMultiWidget
Hi Ingmar,
sorry for the late answer!
It is no longer possible to access the stdmultiwidget from your plugin. The dependency to the multiwidget was removed so that you can easily use your own specialized renderwindow editor. There is a wiki page which gives an overview about this topic:
http://www.mitk.org/ViewsWithoutMultiWidget
So customization has to be done directly in the StdMultiWidget class i.e. you have to customize it by yourself (actually usecases like this one have been the motivation for the changes describe above).
If it is just for deactivating the LevelwindowWidget you can try to set the according multiwidget preference. Here is a code snippet:
// Blueberry
#include <berryIPreferencesService.h>
#include <berryPlatformUI.h>
berry::IPreferencesService::Pointer prefService = berry::Platform::GetServiceRegistry().GetServiceById<berry::IPreferencesService>(berry::IPreferencesService::ID);
prefService->GetSystemPreferences()->Node("org.mitk.editors.stdmultiwidget")->PutBool("Show level/window widget", false); //false for hiding, true for showing
If you don’t want to hide the widget completely you can also try to set a certain rendering mode property as kind of a workaround. Right now in MITK if you set the rendering mode to LookupTable_Color or ColorTransferFunction_Color, the levelwindow widget will simply be disabled.
Hope this helps!
Best regards
Andreas
From: Ingmar Wegner [mailto:iweg...@gmx.de]
Sent: Montag, 7. April 2014 15:27
To: Mitk Users
Subject: [mitk-users] Best way to reach StdMultiWidget
Hi List,
has anyone a code snippet how to reach the StdMultiWidget from a plugin?
I have tried it with blueberry (IEditorDescriptor) but propably I misunderstood something.
During debugging I then saw, that
this->GetRenderWindowPart()
returns a reference to the QmitkStdMultiWidgetEditor which has a GetStdMultiWidget() method. But as the QmitkStdMultiWidgetEditor is a plugin itself, I can't include it (by design)!
I need to reach the StdMultiWidget to customize it a bit. In this case I want to disable the LevelWindowWidget temporarily.
Thank you,
Ingmar
------------------------------------------------------------------------------ Start Your Social Network Today - Download eXo Platform Build your Enterprise Intranet with eXo Platform Software Java Based Open Source Intranet - Social, Extensible, Cloud Ready Get Started Now And Turn Your Intranet Into A Collaboration Platform http://p.sf.net/sfu/ExoPlatform
_______________________________________________ mitk-users mailing list mitk-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mitk-users