Medical Imaging Interaction Toolkit  2024.12.99-0da743f6
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 = {});
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 UpdateStepSize();
67  void OnResetSlider();
68 
69  void OnSpanChanged(double lower, double upper);
70 
71 protected:
73 
75 };
76 
77 #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:91
mitkTransferFunctionProperty.h
QmitkTransferFunctionWidget
Definition: QmitkTransferFunctionWidget.h:36
mitkCommon.h
QmitkTransferFunctionWidget::histogramCache
mitk::SimpleHistogramCache histogramCache
Definition: QmitkTransferFunctionWidget.h:74
mitkDataNode.h
QmitkTransferFunctionWidget::tfpToChange
mitk::TransferFunctionProperty::Pointer tfpToChange
Definition: QmitkTransferFunctionWidget.h:72
mitk::TimeStepType
std::size_t TimeStepType
Definition: mitkTimeGeometry.h:27
MitkQtWidgetsExtExports.h
mitk::BaseRenderer
Definition: mitkBaseRenderer.h:56
QmitkTransferFunctionWidget.h
mitk::DataNode
Class for nodes of the DataTree.
Definition: mitkDataNode.h:63