32 setText(tr(
"Colormap"));
40 setText(tr(
"Colormap"));
49 connect(
menu(), &QMenu::aboutToShow,
this, &QmitkDataNodeColorMapAction::OnMenuAboutShow);
52 void QmitkDataNodeColorMapAction::OnMenuAboutShow()
55 if (dataNode.IsNull())
63 if (lookupTableProperty.IsNull())
67 lookupTableProperty->SetLookupTable(mitkLut);
68 dataNode->SetProperty(
"LookupTable", lookupTableProperty, baseRenderer);
72 if (lookupTable.IsNull())
79 for (
const auto& lutTypeString : lookupTable->typenameList)
81 lutAction =
menu()->addAction(QString::fromStdString(lutTypeString));
82 lutAction->setCheckable(
true);
84 if (lutTypeString == lookupTable->GetActiveTypeAsString())
86 lutAction->setChecked(
true);
89 connect(lutAction, &QAction::triggered,
this, &QmitkDataNodeColorMapAction::OnActionTriggered);
93 void QmitkDataNodeColorMapAction::OnActionTriggered(
bool )
98 for (
auto& dataNode : selectedNodes)
100 if (dataNode.IsNull())
105 if (lookupTableProperty.IsNull())
111 if (lookupTable.IsNull())
118 QAction* senderAction = qobject_cast<QAction*>(QObject::sender());
119 if (
nullptr == senderAction)
125 std::string activatedItem = senderAction->text().toStdString();
126 renderWindowSpecificLuT->SetType(activatedItem);
129 if (mitk::LookupTable::LookupTableType::MULTILABEL == lookupTable->GetActiveType())
138 if (
nullptr == baseRenderer)
152 if (
nullptr !=
image)
mitk::BaseRenderer::Pointer GetBaseRenderer()
Grants access to the base renderer stored for the action. Will return nullptr if renderer was never s...
void SetToImageRange(const Image *image)
sets level/window to the min/max greyvalues of the given Image
QList< mitk::DataNode::Pointer > GetSelectedNodes() const
void InitializeAction() override
QmitkDataNodeColorMapAction(QWidget *parent, berry::IWorkbenchPartSite::Pointer workbenchPartSite)
The LevelWindow class Class to store level/window values.
BaseData * GetData() const
Get the data object (instance of BaseData, e.g., an Image) managed by this DataNode.
The LookupTableProperty class Property to associate mitk::LookupTable to an mitk::DataNode.
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
mitk::Image::Pointer image
void RequestUpdate(vtkRenderWindow *renderWindow)
void UseWholePixelRange(mitk::DataNode *node)
void SetLevelWindow(mitk::LevelWindow levelWindow, const mitk::BaseRenderer *renderer=nullptr, const char *propertyKey="levelwindow")
Convenience method for setting level-window properties (instances of LevelWindowProperty) ...
void RequestUpdateAll(RequestType type=REQUEST_UPDATE_ALL)
Class for nodes of the DataTree.