Hi Claudia,
here are two more possibilities (from simple to more advanced):
- Instantiate a separate mitk::DataStorage object (as Jochen suggested)
and insert your second dataset. Then you could open a second
QMitkStdMultiWidget which renders your separate mitk::DataStorage
contents by calling:
// Implement the mitk::IDataStorageReference interface
class MyDataStorageRef : public mitk::IDataStorageReference
{ ... } // see the internal class mitkDataStorageReference class for an
example
mitk::IDataStorageReference myDataStorageRef = new MyDataStorageRef(...);
mitk::DataStorageEditorInput::Pointer myDataStorageInput = new
mitk::DataStorageEditorInput(myDataStorageRef);
berry::PlatformUI::GetWorkbench()->GetActiveWorkbenchWindow()->GetActivePage()->OpenEditor(myDataStorageInput,
QmitkStdMultiWidgetEditor::EDITOR_ID);
See
http://docs.mitk.org/nightly-qt4/BlueBerry/reference/api/html/structberry_1_1IWorkbenchPage.html
for variants of "OpenEditor()". Note that you cannot lay out the two
editors (QmitkStdMultiWidget widgets) by code, you have to drag and drop
them by hand.
- Create your own "editor", just like QmitkStdMultiWidgetEditor with a
custom layout of rendering widgets (for example QmitkRenderWindow
widgets, or two QmitkStdMultiWidget widgets) and use the
"OpenEditor(...)" method as above (using your own editor id). Have a
look at the code and the "plugin.xml" file in the org.mitk.gui.qt.common
bundle. This is the way to go for your own plugin providing your own
specialized editor.
Keep posting to the list if you have further questions.
Best,
Sascha
On 10/12/2010 12:56 PM, Neuhaus Jochen wrote:
Hi Claudia,
There are several possibilites:
Node properties can be set per Renderwindow.
Assuming, your datasets are in two nodes in the default DataStorage,
you could try this:
node1->SetVisibility(true,
multiwidget->GetRenderWindow1()->GetRenderer());
node1->SetVisibility(false,
multiwidget->GetRenderWindow2()->GetRenderer());
node2->SetVisibility(false,
multiwidget->GetRenderWindow1()->GetRenderer());
node2->SetVisibility(true,
multiwidget->GetRenderWindow2()->GetRenderer());
This will show the node1 in the first (red) renderwindow and hide it
in the second (green?) window and vice versa for node2.
Another, more complex possibility would be to create separate
renderwindows each use separate DataStorages and separate
RenderingManager instances with separate GlobalInteraction instances.
You cannot use QmitkStdMultiWidget for this. I don’t have example code
for this, but I know that is is possible.
Best Regards,
Jochen
--------------
MSc. Jochen Neuhaus
Deutsches Krebsforschungszentrum
Div. Medical and Biological Informatics (E130)
Im Neuenheimer Feld 280
D-69120 Heidelberg, Germany
Email: [email protected]
Phone: (+49) 6221/42-3553
Fax: (+49) 6221/42-2345
http://www.dkfz-heidelberg.de/de/mbi/people/Jochen_Neuhaus.html
<https://dkfzowa0.dkfz-heidelberg.de/owa/redir.aspx?C=085e0b87b0bc42bfa9851b67b10bdfbe&URL=http%3a%2f%2fwww.dkfz-heidelberg.de%2fde%2fmbi%2fpeople%2fAnja_Groch.html>
*Von:* Claudia Hänel [mailto:[email protected]]
*Gesendet:* Dienstag, 12. Oktober 2010 11:27
*An:* [email protected]
*Betreff:* [mitk-users] Two data sets in different render widgets of
the QMitkStdMultiWidget
Hello,
what we want to do is to visualize two different data sets at the same
time in a parallel view in the ExtApp. E.g. that you can see one data
set in the the transversal view and another in the saggital view of
the QmitkStdMultiWidget. Or is it easy to write a plugin for the
ExtApp to create a second QMitkStdMultiWidget? Or has anyone done
something like this before?
Thanks for your help in advance!
Best regards,
Claudia
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users