Medical Imaging Interaction Toolkit  2016.11.0
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef QMITKTRANSFERFUNCTIONWIDGET_H
18 #define QMITKTRANSFERFUNCTIONWIDGET_H
19 
21 #include "ui_QmitkTransferFunctionWidget.h"
22 
23 #include <mitkCommon.h>
24 
25 #include <QWidget>
26 
27 #include <mitkDataNode.h>
29 
30 #include <QPushButton>
31 #include <QSlider>
32 
34 
35 namespace mitk
36 {
37  class BaseRenderer;
38 }
39 
40 class MITKQTWIDGETSEXT_EXPORT QmitkTransferFunctionWidget : public QWidget, public Ui::QmitkTransferFunctionWidget
41 {
42  Q_OBJECT
43 
44 public:
45  QmitkTransferFunctionWidget(QWidget *parent = nullptr, Qt::WindowFlags f = nullptr);
47 
48  void SetDataNode(mitk::DataNode *node, const mitk::BaseRenderer *renderer = nullptr);
49 
50  void SetScalarLabel(const QString &scalarLabel);
51 
52  void ShowScalarOpacityFunction(bool show);
53  void ShowColorFunction(bool show);
54  void ShowGradientOpacityFunction(bool show);
55 
56  void SetScalarOpacityFunctionEnabled(bool enable);
57  void SetColorFunctionEnabled(bool enable);
58  void SetGradientOpacityFunctionEnabled(bool enable);
59 
60 public slots:
61 
62  void SetXValueScalar(const QString text);
63  void SetYValueScalar(const QString text);
64  void SetXValueGradient(const QString text);
65  void SetYValueGradient(const QString text);
66  void SetXValueColor(const QString text);
67 
68  void OnUpdateCanvas();
69  void UpdateRanges();
70  void OnResetSlider();
71 
72  void OnSpanChanged(int lower, int upper);
73 
74 protected:
76 
79 
81 };
82 
83 #endif
#define MITKQTWIDGETSEXT_EXPORT
Organizes the rendering process.
DataCollection - Class to facilitate loading/accessing structured data.
mitk::SimpleHistogramCache histogramCache
mitk::TransferFunctionProperty::Pointer tfpToChange
virtual void SetDataNode(DataNode *dataNode) override
Class for nodes of the DataTree.
Definition: mitkDataNode.h:66