Medical Imaging Interaction Toolkit  2025.12.02
Medical Imaging Interaction Toolkit
QmitkTransferFunctionGeneratorWidget.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 QmitkTransferFunctionGeneratorWidget_h
14 #define QmitkTransferFunctionGeneratorWidget_h
15 
17 #include "ui_QmitkTransferFunctionGeneratorWidget.h"
18 
19 #include <mitkCommon.h>
20 
21 #include <QWidget>
22 
23 #include <mitkDataNode.h>
25 
27  public Ui::QmitkTransferFunctionGeneratorWidget
28 {
29  Q_OBJECT
30 
31 public:
32  QmitkTransferFunctionGeneratorWidget(QWidget *parent = nullptr, Qt::WindowFlags f = {});
34 
35  void SetDataNode(mitk::DataNode *node, mitk::TimeStepType timestep = 0);
36 
37  int AddPreset(const QString &presetName);
38 
39  void SetPresetsTabEnabled(bool enable);
40  void SetThresholdTabEnabled(bool enable);
41  void SetBellTabEnabled(bool enable);
42 
43 public slots:
44 
45  void OnSavePreset();
46  void OnLoadPreset();
47 
48  void OnDeltaLevelWindow(int dx, int dy);
49  void OnDeltaThreshold(int dx, int dy);
50 
51 signals:
52 
55 
56 protected slots:
57 
58  void OnPreset(int mode);
59 
60 protected:
62 
63  double histoMinimum;
64  double histoMaximum;
65 
66  double thPos;
67  double thDelta;
68 
69  double deltaScale;
70  double deltaMax;
71  double deltaMin;
72 
74 
75  QString presetFileName;
76 
77  double ScaleDelta(int d) const;
78 };
79 
80 #endif
#define MITKQTWIDGETSEXT_EXPORT
void SetThresholdTabEnabled(bool enable)
mitk::TransferFunctionProperty::Pointer tfpToChange
void SetDataNode(mitk::DataNode *node, mitk::TimeStepType timestep=0)
QmitkTransferFunctionGeneratorWidget(QWidget *parent=nullptr, Qt::WindowFlags f={})
int AddPreset(const QString &presetName)
void OnDeltaThreshold(int dx, int dy)
void OnDeltaLevelWindow(int dx, int dy)
Class for nodes of the DataTree.
Definition: mitkDataNode.h:64
itk::Statistics::Histogram< double > HistogramType
Definition: mitkImage.h:88
std::size_t TimeStepType