21 #include <QMessageBox> 28 setText(tr(
"Open in"));
36 setText(tr(
"Open in"));
54 connect(
menu(), &QMenu::aboutToShow,
this, &QmitkDataNodeOpenInAction::OnMenuAboutToShow);
59 void QmitkDataNodeOpenInAction::OnMenuAboutToShow()
64 QStringList rendererNames;
67 rendererNames.append(renderer->GetName());
71 for (
const auto& rendererName : rendererNames)
73 action =
menu()->addAction(rendererName);
74 connect(action, &QAction::triggered,
this, &QmitkDataNodeOpenInAction::OnActionTriggered);
78 void QmitkDataNodeOpenInAction::OnActionTriggered(
bool )
81 if (dataNode.IsNull())
86 QAction* senderAction = qobject_cast<QAction*>(QObject::sender());
87 if (
nullptr == senderAction)
92 std::string selectedRenderer = senderAction->text().toStdString();
94 if (
nullptr == renderer)
100 if (
nullptr ==
image)
114 for (
const auto& renderWindow : allRegisteredRenderWindows)
117 if (
nullptr != baseRenderer)
static BaseRenderer * GetInstance(vtkRenderWindow *renWin)
void SetControlledRenderer()
Organizes the rendering process.
void InitializeAction() override
std::vector< mitk::BaseRenderer * > RendererVector
QmitkDataNodeOpenInAction(QWidget *parent, berry::IWorkbenchPartSite::Pointer workbenchPartSite)
static RenderingManager * GetInstance()
The custom viewer plugin implements simple viewer functionality presented in a customized look and feel It was developed to demonstrate extensibility and customizability of the blueberry application framework As an example for the GUI customization capabilities provided by the BlueBerry application the custom viewer plugin was developed It features simple viewer functionality presented in a customized look and feel The custom viewer consists of two i e a viewer perspective and a DICOM perspective As part of the viewer an instance of QmitkDataManagerView allows for data selection Visualization of the selected data is then performed by a simple render window view According data can either be directly loaded from file or be imported as DICOM data DICOM import functionality is accessible from the DICOM perspective incorporating the QmitkDicomExternalDataWidget The customization of Qt Stylesheets is used to give the application a non native look and feel This is further emphasized by a Tab Widget like unification of the perspectives with the according perspective bar In addition to an absence of menu
Image class for storing images.
mitk::DataNode::Pointer GetSelectedNode() const
std::vector< vtkRenderWindow * > RenderWindowVector
mitk::Image::Pointer image
vtkRenderWindow * GetRenderWindow() const
Access the RenderWindow into which this renderer renders.
static BaseRenderer * GetByName(const std::string &name)
RendererVector m_ControlledRenderer
virtual bool InitializeView(vtkRenderWindow *renderWindow, const BaseGeometry *geometry, bool initializeGlobalTimeSNC=false)
const RenderWindowVector & GetAllRegisteredRenderWindows()