22 setText(tr(
"Texture Interpolation"));
30 setText(tr(
"Texture Interpolation"));
38 connect(
this, &QmitkDataNodeTextureInterpolationAction::toggled,
this, &QmitkDataNodeTextureInterpolationAction::OnActionToggled);
39 connect(
this, &QmitkDataNodeTextureInterpolationAction::changed,
this, &QmitkDataNodeTextureInterpolationAction::OnActionChanged);
44 if (
nullptr == dataNode)
52 bool textureInterpolation =
false;
53 dataNode->
GetBoolProperty(
"texture interpolation", textureInterpolation, baseRenderer);
54 setChecked(textureInterpolation);
57 void QmitkDataNodeTextureInterpolationAction::OnActionToggled(
bool checked)
60 if (dataNode.IsNull())
66 dataNode->SetBoolProperty(
"texture interpolation", checked, baseRenderer);
68 if (
nullptr == baseRenderer)
78 void QmitkDataNodeTextureInterpolationAction::OnActionChanged()
81 if (dataNode.IsNull())
mitk::BaseRenderer::Pointer GetBaseRenderer()
Grants access to the base renderer stored for the action. Will return nullptr if renderer was never s...
QmitkDataNodeTextureInterpolationAction(QWidget *parent, berry::IWorkbenchPartSite::Pointer workbenchPartSite)
void InitializeAction() override
bool GetBoolProperty(const char *propertyKey, bool &boolValue, const mitk::BaseRenderer *renderer=nullptr) const
Convenience access method for bool properties (instances of BoolProperty)
static RenderingManager * GetInstance()
mitk::DataNode::Pointer GetSelectedNode() const
void RequestUpdate(vtkRenderWindow *renderWindow)
void InitializeWithDataNode(const mitk::DataNode *dataNode) override
void RequestUpdateAll(RequestType type=REQUEST_UPDATE_ALL)
Class for nodes of the DataTree.