Medical Imaging Interaction Toolkit  2023.12.00
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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 = nullptr);
42  ~QmitkTransferFunctionWidget() override;
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 
52  void SetScalarOpacityFunctionEnabled(bool enable);
53  void SetColorFunctionEnabled(bool enable);
54  void SetGradientOpacityFunctionEnabled(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 
64  void OnUpdateCanvas();
65  void UpdateRanges();
66  void OnResetSlider();
67 
68  void OnSpanChanged(int lower, int upper);
69 
70 protected:
72 
75 
77 };
78 
79 #endif
MITKQTWIDGETSEXT_EXPORT
#define MITKQTWIDGETSEXT_EXPORT
Definition: MitkQtWidgetsExtExports.h:15
itk::SmartPointer< Self >
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::SimpleHistogramCache
Definition: mitkSimpleHistogram.h:112
mitkTransferFunctionProperty.h
QmitkTransferFunctionWidget
Definition: QmitkTransferFunctionWidget.h:36
mitkCommon.h
QmitkTransferFunctionWidget::histogramCache
mitk::SimpleHistogramCache histogramCache
Definition: QmitkTransferFunctionWidget.h:76
mitkDataNode.h
QmitkTransferFunctionWidget::tfpToChange
mitk::TransferFunctionProperty::Pointer tfpToChange
Definition: QmitkTransferFunctionWidget.h:71
mitk::TimeStepType
std::size_t TimeStepType
Definition: mitkTimeGeometry.h:27
MitkQtWidgetsExtExports.h
QmitkTransferFunctionWidget::m_RangeSliderMax
int m_RangeSliderMax
Definition: QmitkTransferFunctionWidget.h:74
mitk::BaseRenderer
Definition: mitkBaseRenderer.h:56
QmitkTransferFunctionWidget.h
QmitkTransferFunctionWidget::m_RangeSliderMin
int m_RangeSliderMin
Definition: QmitkTransferFunctionWidget.h:73
mitk::DataNode
Class for nodes of the DataTree.
Definition: mitkDataNode.h:63