Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
QmitkC3Data.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 QmitkC3Data_h
18 #define QmitkC3Data_h
19 
20 #include <QmitkC3jsWidget.h>
21 
27 class QmitkC3Data : public QObject
28 {
29  Q_OBJECT
30 
31  typedef mitk::Image::HistogramType HistogramType;
32  Q_PROPERTY(QList<QVariant> m_YData READ GetYData WRITE SetYData NOTIFY SignalYDataChanged);
33  Q_PROPERTY(QList<QVariant> m_XData READ GetXData WRITE SetXData NOTIFY SignalXDataChanged);
35  Q_PROPERTY(QVariant m_ShowSubchart READ GetShowSubchart WRITE SetShowSubchart NOTIFY SignalShowSubchartChanged);
36 
37 public:
38  QmitkC3Data();
40 
41  void SetAppearance(bool useLineChart, bool showSubChart);
42  Q_INVOKABLE QList<QVariant> GetYData() { return m_YData; };
43  Q_INVOKABLE void SetYData(QList<QVariant> yData) { m_YData = yData; };
44 
45  Q_INVOKABLE QList<QVariant> GetXData() { return m_XData; };
46  Q_INVOKABLE void SetXData(QList<QVariant> xData) { m_XData = xData; };
47 
48  Q_INVOKABLE QVariant GetUseLineChart() { return m_UseLineChart; };
49  Q_INVOKABLE void SetUseLineChart(QVariant useLineChart) { m_UseLineChart = useLineChart; };
50 
51  Q_INVOKABLE QVariant GetShowSubchart() { return m_ShowSubchart; };
52  Q_INVOKABLE void SetShowSubchart(QVariant showSubchart) { m_ShowSubchart = showSubchart; };
58  void ClearData();
59 
60  HistogramType::ConstPointer GetHistogram() { return m_Histogram; };
61  void SetHistogram(HistogramType::ConstPointer histogram) { m_Histogram = histogram; };
62 
63  QList<QVariant>* GetYDataPointer() { return &m_YData; };
64 
65  QList<QVariant>* GetXDataPointer() { return &m_XData; };
66 
67 signals:
68  void SignalYDataChanged(const QList<QVariant> yData);
69  void SignalXDataChanged(const QList<QVariant> xData);
70  void SignalUseLineChartChanged(const QVariant useLineChart);
71  void SignalShowSubchartChanged(const QVariant showSubchart);
72 
73 private:
77  HistogramType::ConstPointer m_Histogram;
78 
85  QList<QVariant> m_YData;
86 
93  QList<QVariant> m_XData;
94 
95  QVariant m_UseLineChart;
96  QVariant m_ShowSubchart;
97 };
98 
99 #endif //QmitkC3Data_h
QList< QVariant > m_XData
List of measurements.
Definition: QmitkC3Data.h:32
void SignalXDataChanged(const QList< QVariant > xData)
Q_INVOKABLE QList< QVariant > GetYData()
Definition: QmitkC3Data.h:42
QVariant m_UseLineChart
Definition: QmitkC3Data.h:33
void SetHistogram(HistogramType::ConstPointer histogram)
Definition: QmitkC3Data.h:61
Q_INVOKABLE void SetYData(QList< QVariant > yData)
Definition: QmitkC3Data.h:43
Q_INVOKABLE void SetShowSubchart(QVariant showSubchart)
Definition: QmitkC3Data.h:52
void SetAppearance(bool useLineChart, bool showSubChart)
Definition: QmitkC3Data.cpp:30
QList< QVariant > * GetXDataPointer()
Definition: QmitkC3Data.h:65
QList< QVariant > m_YData
List of frequencies.
Definition: QmitkC3Data.h:32
Q_INVOKABLE void SetXData(QList< QVariant > xData)
Definition: QmitkC3Data.h:46
HistogramType::ConstPointer GetHistogram()
Definition: QmitkC3Data.h:60
Q_INVOKABLE void SetUseLineChart(QVariant useLineChart)
Definition: QmitkC3Data.h:49
void SignalShowSubchartChanged(const QVariant showSubchart)
itk::SmartPointer< const Self > ConstPointer
itk::Statistics::Histogram< double > HistogramType
Definition: mitkImage.h:94
void SignalYDataChanged(const QList< QVariant > yData)
QVariant m_ShowSubchart
Definition: QmitkC3Data.h:34
Q_INVOKABLE QList< QVariant > GetXData()
Definition: QmitkC3Data.h:45
void ClearData()
Clears the Data.
Definition: C3Data.cpp:19
Q_INVOKABLE QVariant GetUseLineChart()
Definition: QmitkC3Data.h:48
Q_INVOKABLE QVariant GetShowSubchart()
Definition: QmitkC3Data.h:51
QList< QVariant > * GetYDataPointer()
Definition: QmitkC3Data.h:63
void SignalUseLineChartChanged(const QVariant useLineChart)