Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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,
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 QMITKTRANSFERFUNCTIONGENERATORWIDGET_H
18 #define QMITKTRANSFERFUNCTIONGENERATORWIDGET_H
19 
21 #include "ui_QmitkTransferFunctionGeneratorWidget.h"
22 
23 #include <mitkCommon.h>
24 
25 #include <QWidget>
26 
27 #include <mitkDataNode.h>
29 
31  public Ui::QmitkTransferFunctionGeneratorWidget
32 {
33  Q_OBJECT
34 
35 public:
36  QmitkTransferFunctionGeneratorWidget(QWidget *parent = nullptr, Qt::WindowFlags f = nullptr);
38 
39  void SetDataNode(mitk::DataNode *node);
40 
41  int AddPreset(const QString &presetName);
42 
43  void SetPresetsTabEnabled(bool enable);
44  void SetThresholdTabEnabled(bool enable);
45  void SetBellTabEnabled(bool enable);
46 
47 public slots:
48 
49  void OnSavePreset();
50  void OnLoadPreset();
51 
52  void OnDeltaLevelWindow(int dx, int dy);
53  void OnDeltaThreshold(int dx, int dy);
54 
55 signals:
56 
57  void SignalTransferFunctionModeChanged(int);
58  void SignalUpdateCanvas();
59 
60 protected slots:
61 
62  void OnPreset(int mode);
63 
64 protected:
66 
67  double histoMinimum;
68  double histoMaximum;
69 
70  double thPos;
71  double thDelta;
72 
73  double deltaScale;
74  double deltaMax;
75  double deltaMin;
76 
78 
79  QString presetFileName;
80 
81  double ScaleDelta(int d) const;
82 };
83 
84 #endif
#define MITKQTWIDGETSEXT_EXPORT
itk::Statistics::Histogram< double > HistogramType
Definition: mitkImage.h:94
mitk::TransferFunctionProperty::Pointer tfpToChange
virtual void SetDataNode(DataNode *dataNode) override
Class for nodes of the DataTree.
Definition: mitkDataNode.h:66