Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
QmitkStdMultiWidget.cpp
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #define SMW_INFO MITK_INFO("widget.stdmulti")
18 
19 #include "QmitkStdMultiWidget.h"
20 
21 #include <QGridLayout>
22 #include <QHBoxLayout>
23 #include <QList>
24 #include <QMouseEvent>
25 #include <QTimer>
26 #include <QVBoxLayout>
27 #include <qsplitter.h>
28 
30 #include "mitkPixelTypeMultiplex.h"
31 #include <mitkCameraController.h>
32 #include <mitkDataStorage.h>
33 #include <mitkImage.h>
34 #include <mitkInteractionConst.h>
35 #include <mitkLine.h>
36 #include <mitkNodePredicateBase.h>
38 #include <mitkNodePredicateNot.h>
40 #include <mitkOverlayManager.h>
42 #include <mitkPointSet.h>
43 #include <mitkProperties.h>
44 #include <mitkStatusBar.h>
45 #include <mitkVtkLayerController.h>
46 #include <vtkCornerAnnotation.h>
47 #include <vtkMitkRectangleProp.h>
48 #include <vtkTextProperty.h>
49 
50 #include <iomanip>
51 
53  Qt::WindowFlags f,
54  mitk::RenderingManager *renderingManager,
56  const QString &name)
57  : QWidget(parent, f),
58  mitkWidget1(NULL),
59  mitkWidget2(NULL),
60  mitkWidget3(NULL),
61  mitkWidget4(NULL),
62  levelWindowWidget(NULL),
63  QmitkStdMultiWidgetLayout(NULL),
64  m_Layout(LAYOUT_DEFAULT),
65  m_PlaneMode(PLANE_MODE_SLICING),
66  m_RenderingManager(renderingManager),
67  m_GradientBackgroundFlag(true),
69  m_MainSplit(NULL),
70  m_LayoutSplit(NULL),
71  m_SubSplit1(NULL),
72  m_SubSplit2(NULL),
73  mitkWidget1Container(NULL),
74  mitkWidget2Container(NULL),
75  mitkWidget3Container(NULL),
76  mitkWidget4Container(NULL),
77  m_PendingCrosshairPositionEvent(false),
78  m_CrosshairNavigationEnabled(false)
79 {
80  /******************************************************
81  * Use the global RenderingManager if none was specified
82  * ****************************************************/
83  if (m_RenderingManager == NULL)
84  {
86  }
88 
89  /*******************************/
90  // Create Widget manually
91  /*******************************/
92 
93  // create Layouts
94  QmitkStdMultiWidgetLayout = new QHBoxLayout(this);
95  QmitkStdMultiWidgetLayout->setContentsMargins(0, 0, 0, 0);
96 
97  // Set Layout to widget
98  this->setLayout(QmitkStdMultiWidgetLayout);
99 
100  // create main splitter
101  m_MainSplit = new QSplitter(this);
103 
104  // create m_LayoutSplit and add to the mainSplit
105  m_LayoutSplit = new QSplitter(Qt::Vertical, m_MainSplit);
106  m_MainSplit->addWidget(m_LayoutSplit);
107 
108  // create m_SubSplit1 and m_SubSplit2
109  m_SubSplit1 = new QSplitter(m_LayoutSplit);
110  m_SubSplit2 = new QSplitter(m_LayoutSplit);
111 
112  // creae Widget Container
113  mitkWidget1Container = new QWidget(m_SubSplit1);
114  mitkWidget2Container = new QWidget(m_SubSplit1);
115  mitkWidget3Container = new QWidget(m_SubSplit2);
116  mitkWidget4Container = new QWidget(m_SubSplit2);
117 
118  mitkWidget1Container->setContentsMargins(0, 0, 0, 0);
119  mitkWidget2Container->setContentsMargins(0, 0, 0, 0);
120  mitkWidget3Container->setContentsMargins(0, 0, 0, 0);
121  mitkWidget4Container->setContentsMargins(0, 0, 0, 0);
122 
123  // create Widget Layout
124  QHBoxLayout *mitkWidgetLayout1 = new QHBoxLayout(mitkWidget1Container);
125  QHBoxLayout *mitkWidgetLayout2 = new QHBoxLayout(mitkWidget2Container);
126  QHBoxLayout *mitkWidgetLayout3 = new QHBoxLayout(mitkWidget3Container);
127  QHBoxLayout *mitkWidgetLayout4 = new QHBoxLayout(mitkWidget4Container);
128 
133 
138 
139  mitkWidgetLayout1->setMargin(0);
140  mitkWidgetLayout2->setMargin(0);
141  mitkWidgetLayout3->setMargin(0);
142  mitkWidgetLayout4->setMargin(0);
143 
144  // set Layout to Widget Container
145  mitkWidget1Container->setLayout(mitkWidgetLayout1);
146  mitkWidget2Container->setLayout(mitkWidgetLayout2);
147  mitkWidget3Container->setLayout(mitkWidgetLayout3);
148  mitkWidget4Container->setLayout(mitkWidgetLayout4);
149 
150  // set SizePolicy
151  mitkWidget1Container->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
152  mitkWidget2Container->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
153  mitkWidget3Container->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
154  mitkWidget4Container->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
155 
156  // insert Widget Container into the splitters
157  m_SubSplit1->addWidget(mitkWidget1Container);
158  m_SubSplit1->addWidget(mitkWidget2Container);
159 
160  m_SubSplit2->addWidget(mitkWidget3Container);
161  m_SubSplit2->addWidget(mitkWidget4Container);
162 
163  // Create RenderWindows 1
164  mitkWidget1 = new QmitkRenderWindow(mitkWidget1Container, name + ".widget1", NULL, m_RenderingManager, renderingMode);
166  mitkWidgetLayout1->addWidget(mitkWidget1);
167 
168  // Create RenderWindows 2
169  mitkWidget2 = new QmitkRenderWindow(mitkWidget2Container, name + ".widget2", NULL, m_RenderingManager, renderingMode);
170  mitkWidget2->setEnabled(true);
172  mitkWidgetLayout2->addWidget(mitkWidget2);
173 
174  // Create RenderWindows 3
175  mitkWidget3 = new QmitkRenderWindow(mitkWidget3Container, name + ".widget3", NULL, m_RenderingManager, renderingMode);
177  mitkWidgetLayout3->addWidget(mitkWidget3);
178 
179  // Create RenderWindows 4
180  mitkWidget4 = new QmitkRenderWindow(mitkWidget4Container, name + ".widget4", NULL, m_RenderingManager, renderingMode);
182  mitkWidgetLayout4->addWidget(mitkWidget4);
183 
184  // create SignalSlot Connection
185  connect(mitkWidget1, SIGNAL(SignalLayoutDesignChanged(int)), this, SLOT(OnLayoutDesignChanged(int)));
186  connect(mitkWidget1, SIGNAL(ResetView()), this, SLOT(ResetCrosshair()));
187  connect(mitkWidget1, SIGNAL(ChangeCrosshairRotationMode(int)), this, SLOT(SetWidgetPlaneMode(int)));
188  connect(this, SIGNAL(WidgetNotifyNewCrossHairMode(int)), mitkWidget1, SLOT(OnWidgetPlaneModeChanged(int)));
189 
190  connect(mitkWidget2, SIGNAL(SignalLayoutDesignChanged(int)), this, SLOT(OnLayoutDesignChanged(int)));
191  connect(mitkWidget2, SIGNAL(ResetView()), this, SLOT(ResetCrosshair()));
192  connect(mitkWidget2, SIGNAL(ChangeCrosshairRotationMode(int)), this, SLOT(SetWidgetPlaneMode(int)));
193  connect(this, SIGNAL(WidgetNotifyNewCrossHairMode(int)), mitkWidget2, SLOT(OnWidgetPlaneModeChanged(int)));
194 
195  connect(mitkWidget3, SIGNAL(SignalLayoutDesignChanged(int)), this, SLOT(OnLayoutDesignChanged(int)));
196  connect(mitkWidget3, SIGNAL(ResetView()), this, SLOT(ResetCrosshair()));
197  connect(mitkWidget3, SIGNAL(ChangeCrosshairRotationMode(int)), this, SLOT(SetWidgetPlaneMode(int)));
198  connect(this, SIGNAL(WidgetNotifyNewCrossHairMode(int)), mitkWidget3, SLOT(OnWidgetPlaneModeChanged(int)));
199 
200  connect(mitkWidget4, SIGNAL(SignalLayoutDesignChanged(int)), this, SLOT(OnLayoutDesignChanged(int)));
201  connect(mitkWidget4, SIGNAL(ResetView()), this, SLOT(ResetCrosshair()));
202  connect(mitkWidget4, SIGNAL(ChangeCrosshairRotationMode(int)), this, SLOT(SetWidgetPlaneMode(int)));
203  connect(this, SIGNAL(WidgetNotifyNewCrossHairMode(int)), mitkWidget4, SLOT(OnWidgetPlaneModeChanged(int)));
204 
205  // Create Level Window Widget
207  levelWindowWidget->setObjectName(QString::fromUtf8("levelWindowWidget"));
208  QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
209  sizePolicy.setHorizontalStretch(0);
210  sizePolicy.setVerticalStretch(0);
211  sizePolicy.setHeightForWidth(levelWindowWidget->sizePolicy().hasHeightForWidth());
212  levelWindowWidget->setSizePolicy(sizePolicy);
213  levelWindowWidget->setMaximumWidth(50);
214 
215  // add LevelWindow Widget to mainSplitter
216  m_MainSplit->addWidget(levelWindowWidget);
217 
218  // show mainSplitt and add to Layout
219  m_MainSplit->show();
220 
221  // resize Image.
222  this->resize(QSize(364, 477).expandedTo(minimumSizeHint()));
223 
224  // Initialize the widgets.
225  this->InitializeWidget();
226 
227  // Activate Widget Menu
228  this->ActivateMenuWidget(true);
229 }
230 
232 {
233  // Make all black and overwrite renderwindow 4
235  // This is #191919 in hex
236  float tmp1[3] = {0.098f, 0.098f, 0.098f};
237  // This is #7F7F7F in hex
238  float tmp2[3] = {0.498f, 0.498f, 0.498f};
239  m_GradientBackgroundColors[3] = std::make_pair(mitk::Color(tmp1), mitk::Color(tmp2));
240 
241  // Yellow is default color for widget4
242  m_DecorationColorWidget4[0] = 1.0f;
243  m_DecorationColorWidget4[1] = 1.0f;
244  m_DecorationColorWidget4[2] = 0.0f;
245 
246  // transfer colors in WorldGeometry-Nodes of the associated Renderer
248  // of widget 1
249  m_PlaneNode1 = mitk::BaseRenderer::GetInstance(mitkWidget1->GetRenderWindow())->GetCurrentWorldPlaneGeometryNode();
250  m_PlaneNode1->SetColor(GetDecorationColor(0));
251  layer = mitk::IntProperty::New(1000);
252  m_PlaneNode1->SetProperty("layer", layer);
253 
254  // ... of widget 2
255  m_PlaneNode2 = mitk::BaseRenderer::GetInstance(mitkWidget2->GetRenderWindow())->GetCurrentWorldPlaneGeometryNode();
256  m_PlaneNode2->SetColor(GetDecorationColor(1));
257  layer = mitk::IntProperty::New(1000);
258  m_PlaneNode2->SetProperty("layer", layer);
259 
260  // ... of widget 3
261  m_PlaneNode3 = mitk::BaseRenderer::GetInstance(mitkWidget3->GetRenderWindow())->GetCurrentWorldPlaneGeometryNode();
262  m_PlaneNode3->SetColor(GetDecorationColor(2));
263  layer = mitk::IntProperty::New(1000);
264  m_PlaneNode3->SetProperty("layer", layer);
265 
266  // The parent node
268  mitk::BaseRenderer::GetInstance(mitkWidget4->GetRenderWindow())->GetCurrentWorldPlaneGeometryNode();
269  layer = mitk::IntProperty::New(1000);
270  m_ParentNodeForGeometryPlanes->SetProperty("layer", layer);
271 
273  mitk::BaseRenderer::GetInstance(mitkWidget1->GetRenderWindow())->SetOverlayManager(OverlayManager);
274  mitk::BaseRenderer::GetInstance(mitkWidget2->GetRenderWindow())->SetOverlayManager(OverlayManager);
275  mitk::BaseRenderer::GetInstance(mitkWidget3->GetRenderWindow())->SetOverlayManager(OverlayManager);
276  mitk::BaseRenderer::GetInstance(mitkWidget4->GetRenderWindow())->SetOverlayManager(OverlayManager);
277 
279  // Set plane mode (slicing/rotation behavior) to slicing (default)
281 
282  // Set default view directions for SNCs
287 
289  SetDecorationProperties("Sagittal", GetDecorationColor(1), 1);
292 
293  // connect to the "time navigation controller": send time via sliceNavigationControllers
299  mitk::BaseRenderer::GetInstance(mitkWidget4->GetRenderWindow()));
300 
301  // reverse connection between sliceNavigationControllers and m_TimeNavigationController
305  // mitkWidget4->GetSliceNavigationController()
306  // ->ConnectGeometryTimeEvent(m_TimeNavigationController, false);
307 
309 
310  // setup the department logo rendering
313  m_LogoRendering->SetOpacity(0.5);
315  offset.Fill(0.03);
316  m_LogoRendering->SetOffsetVector(offset);
317  m_LogoRendering->SetRelativeSize(0.15);
318  m_LogoRendering->SetCornerPosition(1);
319  m_LogoRendering->SetLogoImagePath("DefaultLogo");
320  renderer4->GetOverlayManager()->AddOverlay(m_LogoRendering.GetPointer(), renderer4);
321 }
322 
324 {
325  // We have 4 widgets and ...
326  for (unsigned int i = 0; i < 4; ++i)
327  {
328  float black[3] = {0.0f, 0.0f, 0.0f};
329  m_GradientBackgroundColors[i] = std::make_pair(mitk::Color(black), mitk::Color(black));
330  }
331 }
332 
333 std::pair<mitk::Color, mitk::Color> QmitkStdMultiWidget::GetGradientColors(unsigned int widgetNumber)
334 {
335  if (widgetNumber > 3)
336  {
337  MITK_ERROR << "Decoration color for unknown widget!";
338  float black[3] = {0.0f, 0.0f, 0.0f};
339  return std::make_pair(mitk::Color(black), mitk::Color(black));
340  }
341  return m_GradientBackgroundColors[widgetNumber];
342 }
343 
345 {
346  // The implementation looks a bit messy here, but it avoids
347  // synchronization of the color of the geometry nodes and an
348  // internal member here.
349  // Default colors were chosen for decent visibitliy.
350  // Feel free to change your preferences in the workbench.
351  float tmp[3] = {0.0f, 0.0f, 0.0f};
352  switch (widgetNumber)
353  {
354  case 0:
355  {
356  if (m_PlaneNode1.IsNotNull())
357  {
358  if (m_PlaneNode1->GetColor(tmp))
359  {
360  return dynamic_cast<mitk::ColorProperty *>(m_PlaneNode1->GetProperty("color"))->GetColor();
361  }
362  }
363  float red[3] = {0.753f, 0.0f, 0.0f}; // This is #C00000 in hex
364  return mitk::Color(red);
365  }
366  case 1:
367  {
368  if (m_PlaneNode2.IsNotNull())
369  {
370  if (m_PlaneNode2->GetColor(tmp))
371  {
372  return dynamic_cast<mitk::ColorProperty *>(m_PlaneNode2->GetProperty("color"))->GetColor();
373  }
374  }
375  float green[3] = {0.0f, 0.69f, 0.0f}; // This is #00B000 in hex
376  return mitk::Color(green);
377  }
378  case 2:
379  {
380  if (m_PlaneNode3.IsNotNull())
381  {
382  if (m_PlaneNode3->GetColor(tmp))
383  {
384  return dynamic_cast<mitk::ColorProperty *>(m_PlaneNode3->GetProperty("color"))->GetColor();
385  }
386  }
387  float blue[3] = {0.0, 0.502f, 1.0f}; // This is #0080FF in hex
388  return mitk::Color(blue);
389  }
390  case 3:
391  {
393  }
394  default:
395  MITK_ERROR << "Decoration color for unknown widget!";
396  float black[3] = {0.0f, 0.0f, 0.0f};
397  return mitk::Color(black);
398  }
399 }
400 
401 std::string QmitkStdMultiWidget::GetCornerAnnotationText(unsigned int widgetNumber)
402 {
403  if (widgetNumber > 3)
404  {
405  MITK_ERROR << "Decoration color for unknown widget!";
406  return std::string("");
407  }
408  return std::string(m_CornerAnnotations[widgetNumber]->GetText(0));
409 }
410 
412 {
414  // DisableNavigationControllerEventListening();
415 
420 }
421 
423 {
424  if (m_PlaneNode1.IsNotNull() && m_PlaneNode2.IsNotNull() && m_PlaneNode3.IsNotNull() &&
425  m_ParentNodeForGeometryPlanes.IsNotNull())
426  {
427  if (m_DataStorage.IsNotNull())
428  {
429  m_DataStorage->Remove(m_PlaneNode1);
430  m_DataStorage->Remove(m_PlaneNode2);
431  m_DataStorage->Remove(m_PlaneNode3);
433  }
434  }
435 }
436 
438 {
439  if (m_PlaneNode1.IsNotNull() && m_PlaneNode2.IsNotNull() && m_PlaneNode3.IsNotNull() &&
440  m_ParentNodeForGeometryPlanes.IsNotNull())
441  {
442  if (m_DataStorage.IsNotNull())
443  {
448  }
449  }
450 }
451 
453 {
454  SMW_INFO << "changing layout to 2D images up... " << std::endl;
455 
456  // Hide all Menu Widgets
457  this->HideAllWidgetToolbars();
458 
460 
461  // create Main Layout
462  QmitkStdMultiWidgetLayout = new QHBoxLayout(this);
463 
464  // Set Layout to widget
465  this->setLayout(QmitkStdMultiWidgetLayout);
466 
467  // create main splitter
468  m_MainSplit = new QSplitter(this);
470 
471  // create m_LayoutSplit and add to the mainSplit
472  m_LayoutSplit = new QSplitter(Qt::Vertical, m_MainSplit);
473  m_MainSplit->addWidget(m_LayoutSplit);
474 
475  // add LevelWindow Widget to mainSplitter
476  m_MainSplit->addWidget(levelWindowWidget);
477 
478  // create m_SubSplit1 and m_SubSplit2
479  m_SubSplit1 = new QSplitter(m_LayoutSplit);
480  m_SubSplit2 = new QSplitter(m_LayoutSplit);
481 
482  // insert Widget Container into splitter top
483  m_SubSplit1->addWidget(mitkWidget1Container);
484  m_SubSplit1->addWidget(mitkWidget2Container);
485  m_SubSplit1->addWidget(mitkWidget3Container);
486 
487  // set SplitterSize for splitter top
488  QList<int> splitterSize;
489  splitterSize.push_back(1000);
490  splitterSize.push_back(1000);
491  splitterSize.push_back(1000);
492  m_SubSplit1->setSizes(splitterSize);
493 
494  // insert Widget Container into splitter bottom
495  m_SubSplit2->addWidget(mitkWidget4Container);
496 
497  // set SplitterSize for splitter m_LayoutSplit
498  splitterSize.clear();
499  splitterSize.push_back(400);
500  splitterSize.push_back(1000);
501  m_LayoutSplit->setSizes(splitterSize);
502 
503  // show mainSplitt
504  m_MainSplit->show();
505 
506  // show Widget if hidden
507  if (mitkWidget1->isHidden())
508  mitkWidget1->show();
509  if (mitkWidget2->isHidden())
510  mitkWidget2->show();
511  if (mitkWidget3->isHidden())
512  mitkWidget3->show();
513  if (mitkWidget4->isHidden())
514  mitkWidget4->show();
515 
516  // Change Layout Name
518 
519  // update Layout Design List
524 
525  // update Alle Widgets
526  this->UpdateAllWidgets();
527 }
528 
530 {
531  SMW_INFO << "changing layout to 2D images left... " << std::endl;
532 
533  // Hide all Menu Widgets
534  this->HideAllWidgetToolbars();
535 
537 
538  // create Main Layout
539  QmitkStdMultiWidgetLayout = new QHBoxLayout(this);
540 
541  // create main splitter
542  m_MainSplit = new QSplitter(this);
544 
545  // create m_LayoutSplit and add to the mainSplit
546  m_LayoutSplit = new QSplitter(m_MainSplit);
547  m_MainSplit->addWidget(m_LayoutSplit);
548 
549  // add LevelWindow Widget to mainSplitter
550  m_MainSplit->addWidget(levelWindowWidget);
551 
552  // create m_SubSplit1 and m_SubSplit2
553  m_SubSplit1 = new QSplitter(Qt::Vertical, m_LayoutSplit);
554  m_SubSplit2 = new QSplitter(m_LayoutSplit);
555 
556  // insert Widget into the splitters
557  m_SubSplit1->addWidget(mitkWidget1Container);
558  m_SubSplit1->addWidget(mitkWidget2Container);
559  m_SubSplit1->addWidget(mitkWidget3Container);
560 
561  // set splitterSize of SubSplit1
562  QList<int> splitterSize;
563  splitterSize.push_back(1000);
564  splitterSize.push_back(1000);
565  splitterSize.push_back(1000);
566  m_SubSplit1->setSizes(splitterSize);
567 
568  m_SubSplit2->addWidget(mitkWidget4Container);
569 
570  // set splitterSize of Layout Split
571  splitterSize.clear();
572  splitterSize.push_back(400);
573  splitterSize.push_back(1000);
574  m_LayoutSplit->setSizes(splitterSize);
575 
576  // show mainSplitt and add to Layout
577  m_MainSplit->show();
578 
579  // show Widget if hidden
580  if (mitkWidget1->isHidden())
581  mitkWidget1->show();
582  if (mitkWidget2->isHidden())
583  mitkWidget2->show();
584  if (mitkWidget3->isHidden())
585  mitkWidget3->show();
586  if (mitkWidget4->isHidden())
587  mitkWidget4->show();
588 
589  // update Layout Name
591 
592  // update Layout Design List
597 
598  // update Alle Widgets
599  this->UpdateAllWidgets();
600 }
601 
602 void QmitkStdMultiWidget::SetDecorationProperties(std::string text, mitk::Color color, int widgetNumber)
603 {
604  if (widgetNumber > 3)
605  {
606  MITK_ERROR << "Unknown render window for annotation.";
607  return;
608  }
609  vtkRenderer *renderer = this->GetRenderWindow(widgetNumber)->GetRenderer()->GetVtkRenderer();
610  if (!renderer)
611  return;
612  vtkSmartPointer<vtkCornerAnnotation> annotation = m_CornerAnnotations[widgetNumber];
613  annotation->SetText(0, text.c_str());
614  annotation->SetMaximumFontSize(12);
615  annotation->GetTextProperty()->SetColor(color[0], color[1], color[2]);
616  if (!renderer->HasViewProp(annotation))
617  {
618  renderer->AddViewProp(annotation);
619  }
620  vtkSmartPointer<vtkMitkRectangleProp> frame = m_RectangleProps[widgetNumber];
621  frame->SetColor(color[0], color[1], color[2]);
622  if (!renderer->HasViewProp(frame))
623  {
624  renderer->AddViewProp(frame);
625  }
626 }
627 
629 {
630  for (int i = 0; i < 4; ++i)
631  {
632  m_CornerAnnotations[i]->SetVisibility(visibility);
633  }
634 }
635 
637 {
638  return m_CornerAnnotations[0]->GetVisibility() > 0;
639 }
640 
642 {
643  switch (number)
644  {
645  case 0:
646  return this->GetRenderWindow1();
647  case 1:
648  return this->GetRenderWindow2();
649  case 2:
650  return this->GetRenderWindow3();
651  case 3:
652  return this->GetRenderWindow4();
653  default:
654  MITK_ERROR << "Requested unknown render window";
655  break;
656  }
657  return NULL;
658 }
659 
661 {
662  SMW_INFO << "changing layout to default... " << std::endl;
663 
664  // Hide all Menu Widgets
665  this->HideAllWidgetToolbars();
666 
668 
669  // create Main Layout
670  QmitkStdMultiWidgetLayout = new QHBoxLayout(this);
671 
672  // create main splitter
673  m_MainSplit = new QSplitter(this);
675 
676  // create m_LayoutSplit and add to the mainSplit
677  m_LayoutSplit = new QSplitter(Qt::Vertical, m_MainSplit);
678  m_MainSplit->addWidget(m_LayoutSplit);
679 
680  // add LevelWindow Widget to mainSplitter
681  m_MainSplit->addWidget(levelWindowWidget);
682 
683  // create m_SubSplit1 and m_SubSplit2
684  m_SubSplit1 = new QSplitter(m_LayoutSplit);
685  m_SubSplit2 = new QSplitter(m_LayoutSplit);
686 
687  // insert Widget container into the splitters
688  m_SubSplit1->addWidget(mitkWidget1Container);
689  m_SubSplit1->addWidget(mitkWidget2Container);
690 
691  m_SubSplit2->addWidget(mitkWidget3Container);
692  m_SubSplit2->addWidget(mitkWidget4Container);
693 
694  // set splitter Size
695  QList<int> splitterSize;
696  splitterSize.push_back(1000);
697  splitterSize.push_back(1000);
698  m_SubSplit1->setSizes(splitterSize);
699  m_SubSplit2->setSizes(splitterSize);
700  m_LayoutSplit->setSizes(splitterSize);
701 
702  // show mainSplitt and add to Layout
703  m_MainSplit->show();
704 
705  // show Widget if hidden
706  if (mitkWidget1->isHidden())
707  mitkWidget1->show();
708  if (mitkWidget2->isHidden())
709  mitkWidget2->show();
710  if (mitkWidget3->isHidden())
711  mitkWidget3->show();
712  if (mitkWidget4->isHidden())
713  mitkWidget4->show();
714 
716 
717  // update Layout Design List
722 
723  // update Alle Widgets
724  this->UpdateAllWidgets();
725 }
726 
728 {
729  SMW_INFO << "changing layout to big 3D ..." << std::endl;
730 
731  // Hide all Menu Widgets
732  this->HideAllWidgetToolbars();
733 
735 
736  // create Main Layout
737  QmitkStdMultiWidgetLayout = new QHBoxLayout(this);
738 
739  // create main splitter
740  m_MainSplit = new QSplitter(this);
742 
743  // add widget Splitter to main Splitter
744  m_MainSplit->addWidget(mitkWidget4Container);
745 
746  // add LevelWindow Widget to mainSplitter
747  m_MainSplit->addWidget(levelWindowWidget);
748 
749  // show mainSplitt and add to Layout
750  m_MainSplit->show();
751 
752  // show/hide Widgets
753  mitkWidget1->hide();
754  mitkWidget2->hide();
755  mitkWidget3->hide();
756  if (mitkWidget4->isHidden())
757  mitkWidget4->show();
758 
760 
761  // update Layout Design List
766 
767  // update Alle Widgets
768  this->UpdateAllWidgets();
770 }
771 
773 {
774  SMW_INFO << "changing layout to big Widget1 ..." << std::endl;
775 
776  // Hide all Menu Widgets
777  this->HideAllWidgetToolbars();
778 
780 
781  // create Main Layout
782  QmitkStdMultiWidgetLayout = new QHBoxLayout(this);
783 
784  // create main splitter
785  m_MainSplit = new QSplitter(this);
787 
788  // add widget Splitter to main Splitter
789  m_MainSplit->addWidget(mitkWidget1Container);
790 
791  // add LevelWindow Widget to mainSplitter
792  m_MainSplit->addWidget(levelWindowWidget);
793 
794  // show mainSplitt and add to Layout
795  m_MainSplit->show();
796 
797  // show/hide Widgets
798  if (mitkWidget1->isHidden())
799  mitkWidget1->show();
800  mitkWidget2->hide();
801  mitkWidget3->hide();
802  mitkWidget4->hide();
803 
805 
806  // update Layout Design List
811 
812  // update Alle Widgets
813  this->UpdateAllWidgets();
814 
816 }
817 
819 {
820  SMW_INFO << "changing layout to big Widget2 ..." << std::endl;
821 
822  // Hide all Menu Widgets
823  this->HideAllWidgetToolbars();
824 
826 
827  // create Main Layout
828  QmitkStdMultiWidgetLayout = new QHBoxLayout(this);
829 
830  // create main splitter
831  m_MainSplit = new QSplitter(this);
833 
834  // add widget Splitter to main Splitter
835  m_MainSplit->addWidget(mitkWidget2Container);
836 
837  // add LevelWindow Widget to mainSplitter
838  m_MainSplit->addWidget(levelWindowWidget);
839 
840  // show mainSplitt and add to Layout
841  m_MainSplit->show();
842 
843  // show/hide Widgets
844  mitkWidget1->hide();
845  if (mitkWidget2->isHidden())
846  mitkWidget2->show();
847  mitkWidget3->hide();
848  mitkWidget4->hide();
849 
851 
852  // update Layout Design List
857 
858  // update Alle Widgets
859  this->UpdateAllWidgets();
861 }
862 
864 {
865  SMW_INFO << "changing layout to big Widget3 ..." << std::endl;
866 
867  // Hide all Menu Widgets
868  this->HideAllWidgetToolbars();
869 
871 
872  // create Main Layout
873  QmitkStdMultiWidgetLayout = new QHBoxLayout(this);
874 
875  // create main splitter
876  m_MainSplit = new QSplitter(this);
878 
879  // add widget Splitter to main Splitter
880  m_MainSplit->addWidget(mitkWidget3Container);
881 
882  // add LevelWindow Widget to mainSplitter
883  m_MainSplit->addWidget(levelWindowWidget);
884 
885  // show mainSplitt and add to Layout
886  m_MainSplit->show();
887 
888  // show/hide Widgets
889  mitkWidget1->hide();
890  mitkWidget2->hide();
891  if (mitkWidget3->isHidden())
892  mitkWidget3->show();
893  mitkWidget4->hide();
894 
896 
897  // update Layout Design List
902 
903  // update Alle Widgets
904  this->UpdateAllWidgets();
906 }
907 
909 {
910  SMW_INFO << "changing layout to Widget3 and 4 in a Row..." << std::endl;
911 
912  // Hide all Menu Widgets
913  this->HideAllWidgetToolbars();
914 
916 
917  // create Main Layout
918  QmitkStdMultiWidgetLayout = new QHBoxLayout(this);
919 
920  // create main splitter
921  m_MainSplit = new QSplitter(this);
923 
924  // create m_LayoutSplit and add to the mainSplit
925  m_LayoutSplit = new QSplitter(Qt::Vertical, m_MainSplit);
926  m_MainSplit->addWidget(m_LayoutSplit);
927 
928  // add LevelWindow Widget to mainSplitter
929  m_MainSplit->addWidget(levelWindowWidget);
930 
931  // add Widgets to splitter
934 
935  // set Splitter Size
936  QList<int> splitterSize;
937  splitterSize.push_back(1000);
938  splitterSize.push_back(1000);
939  m_LayoutSplit->setSizes(splitterSize);
940 
941  // show mainSplitt and add to Layout
942  m_MainSplit->show();
943 
944  // show/hide Widgets
945  mitkWidget1->hide();
946  mitkWidget2->hide();
947  if (mitkWidget3->isHidden())
948  mitkWidget3->show();
949  if (mitkWidget4->isHidden())
950  mitkWidget4->show();
951 
953 
954  // update Layout Design List
959 
960  // update Alle Widgets
961  this->UpdateAllWidgets();
962 }
963 
965 {
966  SMW_INFO << "changing layout to Widget3 and 4 in one Column..." << std::endl;
967 
968  // Hide all Menu Widgets
969  this->HideAllWidgetToolbars();
970 
972 
973  // create Main Layout
974  QmitkStdMultiWidgetLayout = new QHBoxLayout(this);
975 
976  // create main splitter
977  m_MainSplit = new QSplitter(this);
979 
980  // create m_LayoutSplit and add to the mainSplit
981  m_LayoutSplit = new QSplitter(m_MainSplit);
982  m_MainSplit->addWidget(m_LayoutSplit);
983 
984  // add LevelWindow Widget to mainSplitter
985  m_MainSplit->addWidget(levelWindowWidget);
986 
987  // add Widgets to splitter
990 
991  // set SplitterSize
992  QList<int> splitterSize;
993  splitterSize.push_back(1000);
994  splitterSize.push_back(1000);
995  m_LayoutSplit->setSizes(splitterSize);
996 
997  // show mainSplitt and add to Layout
998  m_MainSplit->show();
999 
1000  // show/hide Widgets
1001  mitkWidget1->hide();
1002  mitkWidget2->hide();
1003  if (mitkWidget3->isHidden())
1004  mitkWidget3->show();
1005  if (mitkWidget4->isHidden())
1006  mitkWidget4->show();
1007 
1009 
1010  // update Layout Design List
1015 
1016  // update Alle Widgets
1017  this->UpdateAllWidgets();
1018 }
1019 
1021 {
1022  SMW_INFO << "changing layout to Widget3 and 4 in a Row..." << std::endl;
1023 
1025 
1027 }
1028 
1030 {
1031  SMW_INFO << "changing layout to Widget3 and 4 in a Row..." << std::endl;
1032 
1033  // Hide all Menu Widgets
1034  this->HideAllWidgetToolbars();
1035 
1037 
1038  // create Main Layout
1039  QmitkStdMultiWidgetLayout = new QHBoxLayout(this);
1040 
1041  // create main splitter
1042  m_MainSplit = new QSplitter(this);
1044 
1045  // create m_LayoutSplit and add to the mainSplit
1046  m_LayoutSplit = new QSplitter(Qt::Vertical, m_MainSplit);
1047  m_MainSplit->addWidget(m_LayoutSplit);
1048 
1049  // add LevelWindow Widget to mainSplitter
1050  m_MainSplit->addWidget(levelWindowWidget);
1051 
1052  // create m_SubSplit1 and m_SubSplit2
1053  m_SubSplit1 = new QSplitter(Qt::Vertical, m_LayoutSplit);
1054  m_SubSplit2 = new QSplitter(m_LayoutSplit);
1055 
1056  // insert Widget into the splitters
1057  m_SubSplit1->addWidget(mitkWidget2Container);
1058 
1059  m_SubSplit2->addWidget(mitkWidget3Container);
1060  m_SubSplit2->addWidget(mitkWidget4Container);
1061 
1062  // set Splitter Size
1063  QList<int> splitterSize;
1064  splitterSize.push_back(1000);
1065  splitterSize.push_back(1000);
1066  m_SubSplit2->setSizes(splitterSize);
1067  splitterSize.clear();
1068  splitterSize.push_back(500);
1069  splitterSize.push_back(1000);
1070  m_LayoutSplit->setSizes(splitterSize);
1071 
1072  // show mainSplitt
1073  m_MainSplit->show();
1074 
1075  // show Widget if hidden
1076  mitkWidget1->hide();
1077  if (mitkWidget2->isHidden())
1078  mitkWidget2->show();
1079  if (mitkWidget3->isHidden())
1080  mitkWidget3->show();
1081  if (mitkWidget4->isHidden())
1082  mitkWidget4->show();
1083 
1085 
1086  // update Layout Design List
1091 
1092  // update Alle Widgets
1093  this->UpdateAllWidgets();
1094 }
1095 
1097 {
1098  SMW_INFO << "changing layout to 2 x 2D and 3D Widget" << std::endl;
1099 
1100  // Hide all Menu Widgets
1101  this->HideAllWidgetToolbars();
1102 
1104 
1105  // create Main Layout
1106  QmitkStdMultiWidgetLayout = new QHBoxLayout(this);
1107 
1108  // create main splitter
1109  m_MainSplit = new QSplitter(this);
1111 
1112  // create m_LayoutSplit and add to the mainSplit
1113  m_LayoutSplit = new QSplitter(m_MainSplit);
1114  m_MainSplit->addWidget(m_LayoutSplit);
1115 
1116  // add LevelWindow Widget to mainSplitter
1117  m_MainSplit->addWidget(levelWindowWidget);
1118 
1119  // create m_SubSplit1 and m_SubSplit2
1120  m_SubSplit1 = new QSplitter(Qt::Vertical, m_LayoutSplit);
1121  m_SubSplit2 = new QSplitter(m_LayoutSplit);
1122 
1123  // add Widgets to splitter
1124  m_SubSplit1->addWidget(mitkWidget1Container);
1125  m_SubSplit1->addWidget(mitkWidget2Container);
1126  m_SubSplit2->addWidget(mitkWidget4Container);
1127 
1128  // set Splitter Size
1129  QList<int> splitterSize;
1130  splitterSize.push_back(1000);
1131  splitterSize.push_back(1000);
1132  m_SubSplit1->setSizes(splitterSize);
1133  m_LayoutSplit->setSizes(splitterSize);
1134 
1135  // show mainSplitt and add to Layout
1136  m_MainSplit->show();
1137 
1138  // show/hide Widgets
1139  if (mitkWidget1->isHidden())
1140  mitkWidget1->show();
1141  if (mitkWidget2->isHidden())
1142  mitkWidget2->show();
1143  mitkWidget3->hide();
1144  if (mitkWidget4->isHidden())
1145  mitkWidget4->show();
1146 
1148 
1149  // update Layout Design List
1154 
1155  // update Alle Widgets
1156  this->UpdateAllWidgets();
1157 }
1158 
1160 {
1161  SMW_INFO << "changing layout to 2D and 3D left, 2D right Widget" << std::endl;
1162 
1163  // Hide all Menu Widgets
1164  this->HideAllWidgetToolbars();
1165 
1167 
1168  // create Main Layout
1169  QmitkStdMultiWidgetLayout = new QHBoxLayout(this);
1170 
1171  // create main splitter
1172  m_MainSplit = new QSplitter(this);
1174 
1175  // create m_LayoutSplit and add to the mainSplit
1176  m_LayoutSplit = new QSplitter(m_MainSplit);
1177  m_MainSplit->addWidget(m_LayoutSplit);
1178 
1179  // add LevelWindow Widget to mainSplitter
1180  m_MainSplit->addWidget(levelWindowWidget);
1181 
1182  // create m_SubSplit1 and m_SubSplit2
1183  m_SubSplit1 = new QSplitter(Qt::Vertical, m_LayoutSplit);
1184  m_SubSplit2 = new QSplitter(m_LayoutSplit);
1185 
1186  // add Widgets to splitter
1187  m_SubSplit1->addWidget(mitkWidget1Container);
1188  m_SubSplit1->addWidget(mitkWidget4Container);
1189  m_SubSplit2->addWidget(mitkWidget2Container);
1190 
1191  // set Splitter Size
1192  QList<int> splitterSize;
1193  splitterSize.push_back(1000);
1194  splitterSize.push_back(1000);
1195  m_SubSplit1->setSizes(splitterSize);
1196  m_LayoutSplit->setSizes(splitterSize);
1197 
1198  // show mainSplitt and add to Layout
1199  m_MainSplit->show();
1200 
1201  // show/hide Widgets
1202  if (mitkWidget1->isHidden())
1203  mitkWidget1->show();
1204  if (mitkWidget2->isHidden())
1205  mitkWidget2->show();
1206  mitkWidget3->hide();
1207  if (mitkWidget4->isHidden())
1208  mitkWidget4->show();
1209 
1211 
1212  // update Layout Design List
1217 
1218  // update Alle Widgets
1219  this->UpdateAllWidgets();
1220 }
1221 
1223 {
1224  SMW_INFO << "changing layout to 2D up and 3D down" << std::endl;
1225 
1226  // Hide all Menu Widgets
1227  this->HideAllWidgetToolbars();
1228 
1230 
1231  // create Main Layout
1232  QmitkStdMultiWidgetLayout = new QHBoxLayout(this);
1233 
1234  // Set Layout to widget
1235  this->setLayout(QmitkStdMultiWidgetLayout);
1236 
1237  // create main splitter
1238  m_MainSplit = new QSplitter(this);
1240 
1241  // create m_LayoutSplit and add to the mainSplit
1242  m_LayoutSplit = new QSplitter(Qt::Vertical, m_MainSplit);
1243  m_MainSplit->addWidget(m_LayoutSplit);
1244 
1245  // add LevelWindow Widget to mainSplitter
1246  m_MainSplit->addWidget(levelWindowWidget);
1247 
1248  // create m_SubSplit1 and m_SubSplit2
1249  m_SubSplit1 = new QSplitter(m_LayoutSplit);
1250  m_SubSplit2 = new QSplitter(m_LayoutSplit);
1251 
1252  // insert Widget Container into splitter top
1253  m_SubSplit1->addWidget(mitkWidget1Container);
1254 
1255  // set SplitterSize for splitter top
1256  QList<int> splitterSize;
1257  // insert Widget Container into splitter bottom
1258  m_SubSplit2->addWidget(mitkWidget4Container);
1259  // set SplitterSize for splitter m_LayoutSplit
1260  splitterSize.clear();
1261  splitterSize.push_back(700);
1262  splitterSize.push_back(700);
1263  m_LayoutSplit->setSizes(splitterSize);
1264 
1265  // show mainSplitt
1266  m_MainSplit->show();
1267 
1268  // show/hide Widgets
1269  if (mitkWidget1->isHidden())
1270  mitkWidget1->show();
1271  mitkWidget2->hide();
1272  mitkWidget3->hide();
1273  if (mitkWidget4->isHidden())
1274  mitkWidget4->show();
1275 
1277 
1278  // update Layout Design List
1283 
1284  // update all Widgets
1285  this->UpdateAllWidgets();
1286 }
1287 
1289 {
1290  if (ds == m_DataStorage)
1291  {
1292  return;
1293  }
1294 
1299  m_DataStorage = ds;
1300 }
1301 
1303 {
1304  vtkSmartPointer<vtkRenderer> vtkrenderer;
1305  vtkrenderer = mitk::BaseRenderer::GetInstance(mitkWidget1->GetRenderWindow())->GetVtkRenderer();
1306  if (vtkrenderer != NULL)
1307  vtkrenderer->ResetCamera();
1308 
1309  vtkrenderer = mitk::BaseRenderer::GetInstance(mitkWidget2->GetRenderWindow())->GetVtkRenderer();
1310  if (vtkrenderer != NULL)
1311  vtkrenderer->ResetCamera();
1312 
1313  vtkrenderer = mitk::BaseRenderer::GetInstance(mitkWidget3->GetRenderWindow())->GetVtkRenderer();
1314  if (vtkrenderer != NULL)
1315  vtkrenderer->ResetCamera();
1316 
1317  vtkrenderer = mitk::BaseRenderer::GetInstance(mitkWidget4->GetRenderWindow())->GetVtkRenderer();
1318  if (vtkrenderer != NULL)
1319  vtkrenderer->ResetCamera();
1320 
1321  mitk::BaseRenderer::GetInstance(mitkWidget1->GetRenderWindow())->GetCameraController()->Fit();
1322  mitk::BaseRenderer::GetInstance(mitkWidget2->GetRenderWindow())->GetCameraController()->Fit();
1323  mitk::BaseRenderer::GetInstance(mitkWidget3->GetRenderWindow())->GetCameraController()->Fit();
1324  mitk::BaseRenderer::GetInstance(mitkWidget4->GetRenderWindow())->GetCameraController()->Fit();
1325 
1326  int w = vtkObject::GetGlobalWarningDisplay();
1327  vtkObject::GlobalWarningDisplayOff();
1328 
1329  vtkObject::SetGlobalWarningDisplay(w);
1330 }
1331 
1333 {
1334  // TODO POSITIONTRACKER
1335 }
1336 
1338 {
1339  // add the displayed planes of the multiwidget to a node to which the subtree
1340  // @a planesSubTree points ...
1341 
1343 
1344  // ... of widget 1
1345  mitk::BaseRenderer *renderer1 = mitk::BaseRenderer::GetInstance(mitkWidget1->GetRenderWindow());
1347  m_PlaneNode1->SetProperty("visible", mitk::BoolProperty::New(true));
1348  m_PlaneNode1->SetProperty("name", mitk::StringProperty::New(std::string(renderer1->GetName()) + ".plane"));
1349  m_PlaneNode1->SetProperty("includeInBoundingBox", mitk::BoolProperty::New(false));
1350  m_PlaneNode1->SetProperty("helper object", mitk::BoolProperty::New(true));
1352  m_PlaneNode1->SetMapper(mitk::BaseRenderer::Standard2D, mapper);
1353 
1354  // ... of widget 2
1355  mitk::BaseRenderer *renderer2 = mitk::BaseRenderer::GetInstance(mitkWidget2->GetRenderWindow());
1357  m_PlaneNode2->SetProperty("visible", mitk::BoolProperty::New(true));
1358  m_PlaneNode2->SetProperty("name", mitk::StringProperty::New(std::string(renderer2->GetName()) + ".plane"));
1359  m_PlaneNode2->SetProperty("includeInBoundingBox", mitk::BoolProperty::New(false));
1360  m_PlaneNode2->SetProperty("helper object", mitk::BoolProperty::New(true));
1362  m_PlaneNode2->SetMapper(mitk::BaseRenderer::Standard2D, mapper);
1363 
1364  // ... of widget 3
1365  mitk::BaseRenderer *renderer3 = mitk::BaseRenderer::GetInstance(mitkWidget3->GetRenderWindow());
1367  m_PlaneNode3->SetProperty("visible", mitk::BoolProperty::New(true));
1368  m_PlaneNode3->SetProperty("name", mitk::StringProperty::New(std::string(renderer3->GetName()) + ".plane"));
1369  m_PlaneNode3->SetProperty("includeInBoundingBox", mitk::BoolProperty::New(false));
1370  m_PlaneNode3->SetProperty("helper object", mitk::BoolProperty::New(true));
1372  m_PlaneNode3->SetMapper(mitk::BaseRenderer::Standard2D, mapper);
1373 
1375  m_ParentNodeForGeometryPlanes->SetProperty("name", mitk::StringProperty::New("Widgets"));
1376  m_ParentNodeForGeometryPlanes->SetProperty("helper object", mitk::BoolProperty::New(true));
1377 }
1378 
1380 {
1382 }
1383 
1385 {
1386  levelWindowWidget->disconnect(this);
1388  levelWindowWidget->show();
1389 }
1390 
1392 {
1393  levelWindowWidget->disconnect(this);
1394  levelWindowWidget->hide();
1395 }
1396 
1397 // CAUTION: Legacy code for enabling Qt-signal-controlled view initialization.
1398 // Use RenderingManager::InitializeViews() instead.
1400 {
1401  return m_RenderingManager->InitializeViews(geometry);
1402 }
1403 
1405 {
1406  m_RenderingManager->RequestUpdate(mitkWidget1->GetRenderWindow());
1407  m_RenderingManager->RequestUpdate(mitkWidget2->GetRenderWindow());
1408  m_RenderingManager->RequestUpdate(mitkWidget3->GetRenderWindow());
1409  m_RenderingManager->RequestUpdate(mitkWidget4->GetRenderWindow());
1410 }
1411 
1413 {
1418 }
1419 
1421 {
1422  emit WheelMoved(e);
1423 }
1424 
1426 {
1427 }
1428 
1430 {
1431  QWidget::moveEvent(e);
1432 
1433  // it is necessary to readjust the position of the overlays as the StdMultiWidget has moved
1434  // unfortunately it's not done by QmitkRenderWindow::moveEvent -> must be done here
1435  emit Moved();
1436 }
1437 
1439 {
1440  return mitkWidget1;
1441 }
1442 
1444 {
1445  return mitkWidget2;
1446 }
1447 
1449 {
1450  return mitkWidget3;
1451 }
1452 
1454 {
1455  return mitkWidget4;
1456 }
1457 
1459 {
1463 
1465  if ((plane1 != NULL) && (plane2 != NULL) && (plane1->IntersectionLine(plane2, line)))
1466  {
1467  mitk::Point3D point;
1468  if ((plane3 != NULL) && (plane3->IntersectionPoint(line, point)))
1469  {
1470  return point;
1471  }
1472  }
1473  // TODO BUG POSITIONTRACKER;
1474  mitk::Point3D p;
1475  return p;
1476  // return m_LastLeftClickPositionSupplier->GetCurrentPoint();
1477 }
1478 
1480 {
1481 }
1482 
1484 {
1485 }
1486 
1488 {
1489  mitk::Point2D pointOnDisplay;
1490  renderer->WorldToDisplay(p, pointOnDisplay);
1491 
1492  if (pointOnDisplay[0] < renderer->GetVtkRenderer()->GetOrigin()[0] ||
1493  pointOnDisplay[1] < renderer->GetVtkRenderer()->GetOrigin()[1] ||
1494  pointOnDisplay[0] > renderer->GetVtkRenderer()->GetOrigin()[0] + renderer->GetViewportSize()[0] ||
1495  pointOnDisplay[1] > renderer->GetVtkRenderer()->GetOrigin()[1] + renderer->GetViewportSize()[1])
1496  {
1497  mitk::Point2D pointOnPlane;
1498  renderer->GetCurrentWorldPlaneGeometry()->Map(p, pointOnPlane);
1499  renderer->GetCameraController()->MoveCameraToPoint(pointOnPlane);
1500  }
1501 }
1502 
1504 {
1508 
1510 }
1511 
1513 {
1515  {
1517  QTimer::singleShot(0, this, SLOT(HandleCrosshairPositionEventDelayed()));
1518  }
1519 }
1520 
1522 {
1523  mitk::Point3D crosshairPos = this->GetCrossPosition();
1525  int maxlayer = -32768;
1526 
1527  if (nodes.IsNotNull())
1528  {
1530  // find node with largest layer, that is the node shown on top in the render window
1531  for (unsigned int x = 0; x < nodes->size(); x++)
1532  {
1533  if ((nodes->at(x)->GetData()->GetGeometry() != NULL) &&
1534  nodes->at(x)->GetData()->GetGeometry()->IsInside(crosshairPos))
1535  {
1536  int layer = 0;
1537  if (!(nodes->at(x)->GetIntProperty("layer", layer)))
1538  continue;
1539  if (layer > maxlayer)
1540  {
1541  if (static_cast<mitk::DataNode::Pointer>(nodes->at(x))->IsVisible(baseRenderer))
1542  {
1543  node = nodes->at(x);
1544  maxlayer = layer;
1545  }
1546  }
1547  }
1548  }
1549  }
1550  return node;
1551 }
1552 
1554 {
1556 
1557  // find image with highest layer
1559  mitk::DataStorage::SetOfObjects::ConstPointer nodes = this->m_DataStorage->GetSubset(isImageData).GetPointer();
1560 
1562  mitk::DataNode::Pointer topSourceNode;
1563  mitk::Image::Pointer image;
1564  bool isBinary = false;
1565  node = this->GetTopLayerNode(nodes);
1566  int component = 0;
1567  if (node.IsNotNull())
1568  {
1569  node->GetBoolProperty("binary", isBinary);
1570  if (isBinary)
1571  {
1572  mitk::DataStorage::SetOfObjects::ConstPointer sourcenodes = m_DataStorage->GetSources(node, NULL, true);
1573  if (!sourcenodes->empty())
1574  {
1575  topSourceNode = this->GetTopLayerNode(sourcenodes);
1576  }
1577  if (topSourceNode.IsNotNull())
1578  {
1579  image = dynamic_cast<mitk::Image *>(topSourceNode->GetData());
1580  topSourceNode->GetIntProperty("Image.Displayed Component", component);
1581  }
1582  else
1583  {
1584  image = dynamic_cast<mitk::Image *>(node->GetData());
1585  node->GetIntProperty("Image.Displayed Component", component);
1586  }
1587  }
1588  else
1589  {
1590  image = dynamic_cast<mitk::Image *>(node->GetData());
1591  node->GetIntProperty("Image.Displayed Component", component);
1592  }
1593  }
1594 
1595  mitk::Point3D crosshairPos = this->GetCrossPosition();
1596  std::string statusText;
1597  std::stringstream stream;
1598  itk::Index<3> p;
1600  unsigned int timestep = baseRenderer->GetTimeStep();
1601 
1602  if (image.IsNotNull() && (image->GetTimeSteps() > timestep))
1603  {
1604  image->GetGeometry()->WorldToIndex(crosshairPos, p);
1605  stream.precision(2);
1606  stream << "Position: <" << std::fixed << crosshairPos[0] << ", " << std::fixed << crosshairPos[1] << ", "
1607  << std::fixed << crosshairPos[2] << "> mm";
1608  stream << "; Index: <" << p[0] << ", " << p[1] << ", " << p[2] << "> ";
1609 
1610  mitk::ScalarType pixelValue;
1611 
1613  image->GetChannelDescriptor().GetPixelType(),
1614  image,
1615  image->GetVolumeData(baseRenderer->GetTimeStep()),
1616  p,
1617  pixelValue,
1618  component);
1619 
1620  if (fabs(pixelValue) > 1000000 || fabs(pixelValue) < 0.01)
1621  {
1622  stream << "; Time: " << baseRenderer->GetTime() << " ms; Pixelvalue: " << std::scientific << pixelValue << " ";
1623  }
1624  else
1625  {
1626  stream << "; Time: " << baseRenderer->GetTime() << " ms; Pixelvalue: " << pixelValue << " ";
1627  }
1628  }
1629  else
1630  {
1631  stream << "No image information at this position!";
1632  }
1633 
1634  statusText = stream.str();
1635  mitk::StatusBar::GetInstance()->DisplayGreyValueText(statusText.c_str());
1636 }
1637 
1639 {
1640  return m_Layout;
1641 }
1642 
1644 {
1645  return m_GradientBackgroundFlag;
1646 }
1647 
1649 {
1650  // gradient background is by default only in widget 4, otherwise
1651  // interferences between 2D rendering and VTK rendering may occur.
1652  for (unsigned int i = 0; i < 4; ++i)
1653  {
1654  GetRenderWindow(i)->GetRenderer()->GetVtkRenderer()->GradientBackgroundOn();
1655  }
1656  m_GradientBackgroundFlag = true;
1657 }
1658 
1660 {
1661  for (unsigned int i = 0; i < 4; ++i)
1662  {
1663  GetRenderWindow(i)->GetRenderer()->GetVtkRenderer()->GradientBackgroundOff();
1664  }
1665  m_GradientBackgroundFlag = false;
1666 }
1667 
1669 {
1670  m_LogoRendering->SetVisibility(true);
1671  RequestUpdate();
1672 }
1673 
1675 {
1676  m_LogoRendering->SetVisibility(false);
1677  RequestUpdate();
1678 }
1679 
1681 {
1682  return m_LogoRendering->IsVisible(mitk::BaseRenderer::GetInstance(mitkWidget4->GetRenderWindow()));
1683 }
1684 
1685 void QmitkStdMultiWidget::SetWidgetPlaneVisibility(const char *widgetName, bool visible, mitk::BaseRenderer *renderer)
1686 {
1687  if (m_DataStorage.IsNotNull())
1688  {
1689  mitk::DataNode *n = m_DataStorage->GetNamedNode(widgetName);
1690  if (n != NULL)
1691  n->SetVisibility(visible, renderer);
1692  }
1693 }
1694 
1696 {
1697  if (m_PlaneNode1.IsNotNull())
1698  {
1699  m_PlaneNode1->SetVisibility(visible, renderer);
1700  }
1701  if (m_PlaneNode2.IsNotNull())
1702  {
1703  m_PlaneNode2->SetVisibility(visible, renderer);
1704  }
1705  if (m_PlaneNode3.IsNotNull())
1706  {
1707  m_PlaneNode3->SetVisibility(visible, renderer);
1708  }
1710 }
1711 
1713 {
1714  // do your job and lock or unlock slices.
1718 }
1719 
1721 {
1722  // do your job and lock or unlock slices.
1726 }
1727 
1729 {
1730  emit WidgetPlanesRotationLinked(link);
1731 }
1732 
1734 {
1735  MITK_DEBUG << "Changing crosshair mode to " << userMode;
1736 
1737  emit WidgetNotifyNewCrossHairMode(userMode);
1738  // Convert user interface mode to actual mode
1739  {
1740  switch (userMode)
1741  {
1742  case 0:
1743  m_MouseModeSwitcher->SetInteractionScheme(mitk::MouseModeSwitcher::InteractionScheme::MITK);
1744  break;
1745  case 1:
1746  m_MouseModeSwitcher->SetInteractionScheme(mitk::MouseModeSwitcher::InteractionScheme::ROTATION);
1747  break;
1748 
1749  case 2:
1750  m_MouseModeSwitcher->SetInteractionScheme(mitk::MouseModeSwitcher::InteractionScheme::ROTATIONLINKED);
1751  break;
1752 
1753  case 3:
1754  m_MouseModeSwitcher->SetInteractionScheme(mitk::MouseModeSwitcher::InteractionScheme::SWIVEL);
1755  break;
1756  }
1757  }
1758 }
1759 
1761  const mitk::Color &lower,
1762  unsigned int widgetNumber)
1763 {
1764  if (widgetNumber > 3)
1765  {
1766  MITK_ERROR << "Gradientbackground for unknown widget!";
1767  return;
1768  }
1769  m_GradientBackgroundColors[widgetNumber].first = upper;
1770  m_GradientBackgroundColors[widgetNumber].second = lower;
1771  vtkRenderer *renderer = GetRenderWindow(widgetNumber)->GetRenderer()->GetVtkRenderer();
1772  renderer->SetBackground2(upper[0], upper[1], upper[2]);
1773  renderer->SetBackground(lower[0], lower[1], lower[2]);
1774  m_GradientBackgroundFlag = true;
1775 }
1776 
1778 {
1779  for (unsigned int i = 0; i < 4; ++i)
1780  {
1781  vtkRenderer *renderer = GetRenderWindow(i)->GetRenderer()->GetVtkRenderer();
1782  renderer->SetBackground2(upper[0], upper[1], upper[2]);
1783  renderer->SetBackground(lower[0], lower[1], lower[2]);
1784  }
1785  m_GradientBackgroundFlag = true;
1786 }
1787 
1789 {
1790  m_LogoRendering->SetLogoImagePath(path);
1791  mitk::BaseRenderer *renderer = mitk::BaseRenderer::GetInstance(mitkWidget4->GetRenderWindow());
1792  m_LogoRendering->Update(renderer);
1793  RequestUpdate();
1794 }
1795 
1797 {
1798  if (activate)
1799  {
1801  }
1802 }
1803 
1805 {
1806  if (activate)
1807  {
1809  }
1810 }
1811 
1813 {
1814  if (activate)
1815  {
1817  }
1818 }
1819 
1821 {
1822  switch (layoutDesignIndex)
1823  {
1824  case LAYOUT_DEFAULT:
1825  {
1826  this->changeLayoutToDefault();
1827  break;
1828  }
1829  case LAYOUT_2D_IMAGES_UP:
1830  {
1831  this->changeLayoutTo2DImagesUp();
1832  break;
1833  }
1834  case LAYOUT_2D_IMAGES_LEFT:
1835  {
1837  break;
1838  }
1839  case LAYOUT_BIG_3D:
1840  {
1841  this->changeLayoutToBig3D();
1842  break;
1843  }
1844  case LAYOUT_WIDGET1:
1845  {
1846  this->changeLayoutToWidget1();
1847  break;
1848  }
1849  case LAYOUT_WIDGET2:
1850  {
1851  this->changeLayoutToWidget2();
1852  break;
1853  }
1854  case LAYOUT_WIDGET3:
1855  {
1856  this->changeLayoutToWidget3();
1857  break;
1858  }
1860  {
1862  break;
1863  }
1865  {
1867  break;
1868  }
1870  {
1872  break;
1873  }
1875  {
1877  break;
1878  }
1880  {
1882  break;
1883  }
1885  {
1887  break;
1888  }
1889  };
1890 }
1891 
1893 {
1894  mitkWidget1->resize(mitkWidget1Container->frameSize().width() - 1, mitkWidget1Container->frameSize().height());
1895  mitkWidget1->resize(mitkWidget1Container->frameSize().width(), mitkWidget1Container->frameSize().height());
1896 
1897  mitkWidget2->resize(mitkWidget2Container->frameSize().width() - 1, mitkWidget2Container->frameSize().height());
1898  mitkWidget2->resize(mitkWidget2Container->frameSize().width(), mitkWidget2Container->frameSize().height());
1899 
1900  mitkWidget3->resize(mitkWidget3Container->frameSize().width() - 1, mitkWidget3Container->frameSize().height());
1901  mitkWidget3->resize(mitkWidget3Container->frameSize().width(), mitkWidget3Container->frameSize().height());
1902 
1903  mitkWidget4->resize(mitkWidget4Container->frameSize().width() - 1, mitkWidget4Container->frameSize().height());
1904  mitkWidget4->resize(mitkWidget4Container->frameSize().width(), mitkWidget4Container->frameSize().height());
1905 }
1906 
1908 {
1913 }
1914 
1916 {
1917  mitkWidget1->ActivateMenuWidget(state, this);
1918  mitkWidget2->ActivateMenuWidget(state, this);
1919  mitkWidget3->ActivateMenuWidget(state, this);
1920  mitkWidget4->ActivateMenuWidget(state, this);
1921 }
1922 
1924 {
1926 }
1927 
1928 void QmitkStdMultiWidget::SetDecorationColor(unsigned int widgetNumber, mitk::Color color)
1929 {
1930  switch (widgetNumber)
1931  {
1932  case 0:
1933  if (m_PlaneNode1.IsNotNull())
1934  {
1935  m_PlaneNode1->SetColor(color);
1936  }
1937  break;
1938  case 1:
1939  if (m_PlaneNode2.IsNotNull())
1940  {
1941  m_PlaneNode2->SetColor(color);
1942  }
1943  break;
1944  case 2:
1945  if (m_PlaneNode3.IsNotNull())
1946  {
1947  m_PlaneNode3->SetColor(color);
1948  }
1949  break;
1950  case 3:
1951  m_DecorationColorWidget4 = color;
1952  break;
1953  default:
1954  MITK_ERROR << "Decoration color for unknown widget!";
1955  break;
1956  }
1957 }
1958 
1960 {
1961  if (m_DataStorage.IsNotNull())
1962  {
1964  // m_RenderingManager->InitializeViews( m_DataStorage->ComputeVisibleBoundingGeometry3D() );
1965  // reset interactor to normal slicing
1967  }
1968 }
1969 
1971 {
1972  m_RectangleProps[0]->SetVisibility(1);
1973  m_RectangleProps[1]->SetVisibility(1);
1974  m_RectangleProps[2]->SetVisibility(1);
1975  m_RectangleProps[3]->SetVisibility(1);
1976 }
1977 
1979 {
1980  m_RectangleProps[0]->SetVisibility(0);
1981  m_RectangleProps[1]->SetVisibility(0);
1982  m_RectangleProps[2]->SetVisibility(0);
1983  m_RectangleProps[3]->SetVisibility(0);
1984 }
1985 
1987 {
1988  return m_RectangleProps[0]->GetVisibility() > 0;
1989 }
1990 
1992 {
1993  return m_MouseModeSwitcher;
1994 }
1995 
1997 {
1998  return this->m_PlaneNode1;
1999 }
2000 
2002 {
2003  return this->m_PlaneNode2;
2004 }
2005 
2007 {
2008  return this->m_PlaneNode3;
2009 }
2010 
2012 {
2013  switch (id)
2014  {
2015  case 1:
2016  return this->m_PlaneNode1;
2017  break;
2018  case 2:
2019  return this->m_PlaneNode2;
2020  break;
2021  case 3:
2022  return this->m_PlaneNode3;
2023  break;
2024  default:
2025  return NULL;
2026  }
2027 }
mitk::RenderWindow::Pointer mitkWidget4
mitk::ScalarType FastSinglePixelAccess(mitk::PixelType, mitk::Image::Pointer im, ImageDataItem *item, itk::Index< 3 > idx, mitk::ScalarType &val, int component=0)
virtual bool InitializeViews(const BaseGeometry *geometry, RequestType type=REQUEST_UPDATE_ALL, bool preserveRoughOrientationInWorldSpace=false)
void LayoutDesignListChanged(int layoutDesignIndex)
virtual DataNode * GetCurrentWorldPlaneGeometryNode()
Get a DataNode pointing to a data object containing the current 2D-worldgeometry. ...
vtkSmartPointer< vtkMitkRectangleProp > m_RectangleProps[4]
void WheelMoved(QWheelEvent *)
Descibes a line.
Definition: mitkLine.h:32
static char * line
Definition: svm.cpp:2884
QmitkRenderWindow * GetRenderWindow1() const
Data management class that handles 'was created by' relations.
std::string GetCornerAnnotationText(unsigned int widgetNumber)
GetCornerAnnotationText Getter for corner annotation text.
const SliceNavigationController * GetTimeNavigationController() const
std::pair< mitk::Color, mitk::Color > GetGradientColors(unsigned int widgetNumber)
GetGradientColors Getter for gradientbackground colors.
Standard implementation of BaseGeometry.
void SelectSliceByPoint(const mitk::Point3D &point)
Positions the SNC according to the specified point.
mitk::MouseModeSwitcher * GetMouseModeSwitcher()
bool IntersectionPoint(const Line3D &line, Point3D &intersectionPoint) const
Calculate intersection point between the plane and a line.
void SetVisibility(bool visible, const mitk::BaseRenderer *renderer=nullptr, const char *propertyKey="visible")
Convenience method for setting visibility properties (instances of BoolProperty)
mitk::DataNode::Pointer m_PlaneNode2
static BaseRenderer * GetInstance(vtkRenderWindow *renWin)
std::string tmp2
BaseRenderer * GetRenderer() const
Gets the BaseRenderer associated with this SNC (if any). While the BaseRenderer is not directly used ...
bool InitializeStandardViews(const mitk::Geometry3D *geometry)
bool IsDepartmentLogoEnabled() const
virtual bool Map(const mitk::Point3D &pt3d_mm, mitk::Point2D &pt2d_mm) const
Project a 3D point given in mm (pt3d_mm) onto the 2D geometry. The result is a 2D point in mm (pt2d_m...
mitk::MouseModeSwitcher::Pointer m_MouseModeSwitcher
#define MITK_ERROR
Definition: mitkLogMacros.h:24
double ScalarType
mitk::RenderWindow::Pointer mitkWidget2
void SetGradientBackgroundColors(const mitk::Color &upper, const mitk::Color &lower)
mitk::SliceNavigationController * GetTimeNavigationController()
void WidgetNotifyNewCrossHairMode(int)
void SetLayoutIndex(unsigned int layoutIndex)
Organizes the rendering process.
QmitkRenderWindow * mitkWidget4
QmitkRenderWindow * mitkWidget2
#define SMW_INFO
void SetDepartmentLogoPath(const char *path)
mitk::DataNode::Pointer GetWidgetPlane(int id)
Convenience method to access node of widget planes.
ScalarType GetTime() const
Get the time in ms of the currently displayed content.
#define MITK_DEBUG
Definition: mitkLogMacros.h:26
void SetDecorationColor(unsigned int widgetNumber, mitk::Color color)
SetDecorationColor Set the color of the decoration of the 4 widgets.
static mitk::DataStorage::Pointer GetDataStorage()
void HandleCrosshairPositionEvent()
Listener to the CrosshairPositionEvent.
static Pointer New()
virtual const PlaneGeometry * GetCurrentWorldPlaneGeometry()
Get the current 2D-worldgeometry (m_CurrentWorldPlaneGeometry) used for 2D-rendering.
void ActivateMenuWidget(bool state)
activate Menu Widget. true: activated, false: deactivated
Constants for most interaction classes, due to the generic StateMachines.
virtual vtkRenderWindow * GetVtkRenderWindow() override
vtkSmartPointer< vtkCornerAnnotation > m_CornerAnnotations[4]
QmitkRenderWindow * GetRenderWindow2() const
bool IsColoredRectanglesEnabled() const
bool IsCornerAnnotationVisible(void) const
virtual void SetSliceRotationLocked(bool _arg)
Feature option to lock slice rotation.
mitk::DataNode::Pointer m_PlaneNode1
m_PlaneNode1 the 3 helper objects which contain the plane geometry.
void FillGradientBackgroundWithBlack()
FillGradientBackgroundWithBlack Internal helper method to initialize the gradient background colors w...
QmitkRenderWindow * mitkWidget1
mitk::DataNode::Pointer m_PlaneNode3
void SetWidgetPlaneMode(int mode)
Controls the selection of the slice the associated BaseRenderer will display.
bool GetGradientBackgroundFlag() const
void HandleCrosshairPositionEventDelayed()
Receives the signal from HandleCrosshairPositionEvent, executes the StatusBar update.
mitk::RenderingManager * m_RenderingManager
itk::SmartPointer< const Self > ConstPointer
void OnLayoutDesignChanged(int layoutDesignIndex)
mitk::DataNode::Pointer GetTopLayerNode(mitk::DataStorage::SetOfObjects::ConstPointer nodes)
QmitkLevelWindowWidget * levelWindowWidget
static Pointer New()
void SetWidgetPlanesRotationLocked(bool locked)
void SetWidgetPlaneVisibility(const char *widgetName, bool visible, mitk::BaseRenderer *renderer=NULL)
const mitk::Point3D GetCrossPosition() const
mitk::Color GetDecorationColor(unsigned int widgetNumber)
GetDecorationColorForWidget Get the color for annotation, crosshair and rectangle.
static Vector3D offset
The ColorProperty class RGB color property.
void WorldToDisplay(const Point3D &worldIndex, Point2D &displayPoint) const
This method converts a 3D world index to the display point using the geometry of the renderWindow...
void ConnectGeometryTimeEvent(T *receiver, bool connectSendEvent=true)
mitk::RenderWindow::Pointer mitkWidget1
Example of a NON QT DEPENDENT MITK RENDERING APPLICATION.
void SetRenderWindowFocus(vtkRenderWindow *focusWindow)
Sets a flag to the given renderwindow to indicated that it has the focus e.g. has been clicked recent...
void EnsureDisplayContainsPoint(mitk::BaseRenderer *renderer, const mitk::Point3D &p)
Manager for coordinating the rendering process.
static Pointer New()
void moveEvent(QMoveEvent *e) override
bool GetActivateMenuWidgetFlag()
static RenderingManager * GetInstance()
virtual CameraController * GetCameraController()
QmitkRenderWindow * GetRenderWindow4() const
QmitkRenderWindow * mitkWidget3
Image class for storing images.
Definition: mitkImage.h:76
mitk::RenderWindow::Pointer mitkWidget3
const mitk::PlaneGeometry * GetCurrentPlaneGeometry()
Returns the currently selected Plane in the current BaseGeometry (if existent).
MITK implementation of the QVTKWidget.
void MoveCrossToPosition(const mitk::Point3D &newPosition)
virtual mitk::VtkPropRenderer * GetRenderer()
void ForceImmediateUpdate(vtkRenderWindow *renderWindow)
void SetDataStorage(mitk::DataStorage *ds)
virtual int * GetViewportSize() const
itk::RGBPixel< float > Color
Color Standard RGB color typedef (float)
void SetDataStorage(mitk::DataStorage *ds)
mitk::SliceNavigationController * m_TimeNavigationController
mitk::DataNode::Pointer GetWidgetPlane1()
Access node of widget plane 1.
virtual unsigned int GetTimeStep() const
void WidgetPlanesRotationLinked(bool)
static StatusBar * GetInstance()
static method to get the GUI dependent StatusBar-instance so the methods DisplayText, etc. can be called No reference counting, cause of decentral static use!
mitk::DataNode::Pointer GetWidgetPlane2()
Access node of widget plane 2.
void wheelEvent(QWheelEvent *e) override
void SetWidgetPlaneModeToSlicing(bool activate)
void RequestUpdate(vtkRenderWindow *renderWindow)
mitk::DataNode::Pointer GetWidgetPlane3()
Access node of widget plane 3.
void SetCornerAnnotationVisibility(bool visibility)
static Pointer New()
mitk::DataNode::Pointer m_ParentNodeForGeometryPlanes
m_ParentNodeForGeometryPlanes This helper object is added to the datastorage and contains the 3 plane...
const char * GetName() const
get the name of the Renderer
void mousePressEvent(QMouseEvent *e) override
bool IntersectionLine(const PlaneGeometry *plane, Line3D &crossline) const
Calculate the intersecting line of two planes.
void SetWidgetPlanesVisibility(bool visible, mitk::BaseRenderer *renderer=NULL)
void SetGradientBackgroundColorForRenderWindow(const mitk::Color &upper, const mitk::Color &lower, unsigned int widgetNumber)
SetGradientBackgroundColorForRenderWindow background for a widget.
void DisplayGreyValueText(const char *t)
std::pair< mitk::Color, mitk::Color > m_GradientBackgroundColors[4]
m_GradientBackgroundColors Contains the colors of the gradient background.
void RemovePlanesFromDataStorage()
called when the StdMultiWidget is closed to remove the 3 widget planes and the helper node from the D...
QmitkRenderWindow * GetRenderWindow3() const
QmitkRenderWindow * GetRenderWindow(unsigned int number)
GetRenderWindow convinience method to get a widget.
virtual mitk::SliceNavigationController * GetSliceNavigationController()
void ActivateMenuWidget(bool state, QmitkStdMultiWidget *stdMultiWidget=0)
#define mitkPixelTypeMultiplex5(function, ptype, param1, param2, param3, param4, param5)
Describes a two-dimensional, rectangular plane.
void SetProperty(const char *propertyKey, BaseProperty *property, const mitk::BaseRenderer *renderer=nullptr)
Set the property (instance of BaseProperty) with key propertyKey in the PropertyList of the renderer ...
US_USE_NAMESPACE std::string tmp1
mitk::SliceNavigationController * m_TimeNavigationController
virtual void SetSliceLocked(bool _arg)
Feature option to lock planes during mouse interaction. This option flag disables the mouse event whi...
void MoveCameraToPoint(const Point2D &planePoint)
MoveCameraToPoint Move camera so that the point on the plane is in the view center.
void SetWidgetPlaneModeToSwivel(bool activate)
vtkRenderer * GetVtkRenderer() const
mitk::LogoOverlay::Pointer m_LogoRendering
mitk::DataStorage::Pointer m_DataStorage
void SetDecorationProperties(std::string text, mitk::Color color, int widgetNumber)
SetCornerAnnotation Create a corner annotation for a widget.
virtual void InitializeViewsByBoundingObjects(const DataStorage *)
Initializes the renderwindows by the aggregated geometry of all objects that are held in the data sto...
static Pointer New()
static Pointer New()
void RequestUpdateAll(RequestType type=REQUEST_UPDATE_ALL)
QmitkStdMultiWidget(QWidget *parent=0, Qt::WindowFlags f=0, mitk::RenderingManager *renderingManager=0, mitk::BaseRenderer::RenderingMode::Type renderingMode=mitk::BaseRenderer::RenderingMode::Standard, const QString &name="stdmulti")
mitk::Color m_DecorationColorWidget4
m_DecorationColorWidget4 color for annotation and rectangle of widget 4.
Class for nodes of the DataTree.
Definition: mitkDataNode.h:66
void SetWidgetPlaneModeToRotation(bool activate)
QHBoxLayout * QmitkStdMultiWidgetLayout
static Pointer New()
void SetWidgetPlanesRotationLinked(bool link)
void SetWidgetPlanesLocked(bool locked)
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.