23 #include <QMouseEvent>
32 this->setObjectName(name);
34 popUp =
new QMenu(
this);
35 popUp->addAction(
"Axial");
36 popUp->addAction(
"Frontal");
37 popUp->addAction(
"Sagittal");
39 QObject::connect(popUp, SIGNAL(triggered(QAction *)),
this, SLOT(
ChangeView(QAction *)));
45 QHBoxLayout *hlayout =
new QHBoxLayout(container);
46 hlayout->setMargin(0);
49 QString composedName(
"QmitkSliceWidget::");
50 if (!this->objectName().isEmpty())
51 composedName += this->objectName();
53 composedName +=
"QmitkGLWidget";
70 return SelectionFrame;
75 m_DataStorage = storage;
76 m_Renderer->SetDataStorage(m_DataStorage);
99 if (m_DataStorage.IsNotNull())
101 m_DataStorage->Add(node);
116 MITK_WARN <<
"QmitkSliceWidget data is not an image!";
120 m_SlicedGeometry = image->GetSlicedGeometry();
144 if (m_SlicedGeometry.IsNull())
153 if (boundingbox->GetPoints()->Size() > 0)
159 timeGeometry->Initialize(geometry, 1);
162 timeGeometry->SetFirstTimePoint(timebounds[0]);
163 timeGeometry->SetStepDuration(1.0);
166 if (const_cast<mitk::BoundingBox *>(timeGeometry->GetBoundingBoxInWorld())->GetDiagonalLength2() >=
mitk::eps)
185 if (e->button() == Qt::RightButton && popUpEnabled)
187 popUp->popup(QCursor::pos());
193 int val = m_NavigatorWidget->GetPos();
195 if (e->orientation() * e->delta() > 0)
197 m_NavigatorWidget->SetPos(val + 1);
202 m_NavigatorWidget->SetPos(val - 1);
208 if (val->text() ==
"Axial")
212 else if (val->text() ==
"Frontal")
216 else if (val->text() ==
"Sagittal")
229 return m_NavigatorWidget;
234 levelWindow->setEnabled(enable);
237 levelWindow->setMinimumWidth(0);
238 levelWindow->setMaximumWidth(0);
242 levelWindow->setMinimumWidth(28);
243 levelWindow->setMaximumWidth(28);
249 return levelWindow->isEnabled();
virtual mitk::CameraRotationController * GetCameraRotationController()
mitk::Stepper * GetSlice()
Get the Stepper through the slices.
Data management class that handles 'was created by' relations.
itk::SmartPointer< Self > Pointer
itk::FixedArray< ScalarType, 2 > TimeBounds
Standard typedef for time-bounds.
Baseclass for renderer slice-/camera-control.
void SetInputWorldTimeGeometry(const mitk::TimeGeometry *geometry)
Controls the selection of the slice the associated BaseRenderer will display.
Helper class to connect Qt-based navigators to instances of Stepper.
static RenderingManager * GetInstance()
virtual CameraController * GetCameraController()
Image class for storing images.
MITK implementation of the QVTKWidget.
virtual mitk::VtkPropRenderer * GetRenderer()
void RequestUpdate(vtkRenderWindow *renderWindow)
MITKCORE_EXPORT const ScalarType eps
virtual mitk::SliceNavigationController * GetSliceNavigationController()
void Fit()
Fit Adjust the camera, so that the world bounding box is fully visible.
ViewDirection
Possible view directions, Original will uses the PlaneGeometry instances in a SlicedGeometry3D provid...
virtual void Update()
Do the actual creation and send it to the connected observers (renderers)
BaseGeometry Describes the geometry of a data object.
virtual mitk::BaseController * GetController()