Medical Imaging Interaction Toolkit  2025.12.02
Medical Imaging Interaction Toolkit
QmitkTransferFunctionWidget.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef QmitkTransferFunctionWidget_h
14 #define QmitkTransferFunctionWidget_h
15 
17 #include "ui_QmitkTransferFunctionWidget.h"
18 
19 #include <mitkCommon.h>
20 
21 #include <QWidget>
22 
23 #include <mitkDataNode.h>
25 
26 #include <QPushButton>
27 #include <QSlider>
28 
30 
31 namespace mitk
32 {
33  class BaseRenderer;
34 }
35 
36 class MITKQTWIDGETSEXT_EXPORT QmitkTransferFunctionWidget : public QWidget, public Ui::QmitkTransferFunctionWidget
37 {
38  Q_OBJECT
39 
40 public:
41  QmitkTransferFunctionWidget(QWidget *parent = nullptr, Qt::WindowFlags f = {});
43 
44  void SetDataNode(mitk::DataNode *node, mitk::TimeStepType timestep = 0, const mitk::BaseRenderer *renderer = nullptr);
45 
46  void SetScalarLabel(const QString &scalarLabel);
47 
48  void ShowScalarOpacityFunction(bool show);
49  void ShowColorFunction(bool show);
50  void ShowGradientOpacityFunction(bool show);
51 
53  void SetColorFunctionEnabled(bool enable);
55 
56 public slots:
57 
58  void SetXValueScalar(const QString text);
59  void SetYValueScalar(const QString text);
60  void SetXValueGradient(const QString text);
61  void SetYValueGradient(const QString text);
62  void SetXValueColor(const QString text);
63 
65  void UpdateRanges();
67  void OnResetSlider();
68 
69  void OnSpanChanged(double lower, double upper);
70 
71 protected:
73 
75 };
76 
77 #endif
#define MITKQTWIDGETSEXT_EXPORT
~QmitkTransferFunctionWidget() override
QmitkTransferFunctionWidget(QWidget *parent=nullptr, Qt::WindowFlags f={})
void SetYValueGradient(const QString text)
void SetScalarOpacityFunctionEnabled(bool enable)
mitk::TransferFunctionProperty::Pointer tfpToChange
void SetDataNode(mitk::DataNode *node, mitk::TimeStepType timestep=0, const mitk::BaseRenderer *renderer=nullptr)
void SetXValueScalar(const QString text)
void SetXValueGradient(const QString text)
void SetYValueScalar(const QString text)
void SetGradientOpacityFunctionEnabled(bool enable)
void SetXValueColor(const QString text)
void ShowScalarOpacityFunction(bool show)
mitk::SimpleHistogramCache histogramCache
void ShowColorFunction(bool show)
void ShowGradientOpacityFunction(bool show)
void OnSpanChanged(double lower, double upper)
void SetColorFunctionEnabled(bool enable)
void SetScalarLabel(const QString &scalarLabel)
Class for nodes of the DataTree.
Definition: mitkDataNode.h:64
Find image slices visible on a given plane.
std::size_t TimeStepType