Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
QmitkFitPlotDataWidget.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 
14 #ifndef QmitkFitPlotDataWidget_h
15 #define QmitkFitPlotDataWidget_h
16 
18 
19 #include <MitkModelFitUIExports.h>
20 
21 #include <QWidget>
22 
23 #include <memory>
24 
26 
27 namespace Ui
28 {
30 }
31 
44 {
45  Q_OBJECT
46 
47 public:
49  using FitVectorType = std::vector<mitk::modelFit::ModelFitInfo::ConstPointer>;
50 
55  QmitkFitPlotDataWidget(QWidget* parent = nullptr);
56 
59 
65 
70  const std::string& GetXName() const;
71 
72 public Q_SLOTS:
73 
79 
84  void SetXName(const std::string& xName);
85 
86 protected Q_SLOTS:
93  void OnExportClicked() const;
94 
99 
100 protected:
105  std::string StreamModelToString() const;
106 
107  std::unique_ptr<Ui::QmitkFitPlotDataWidget> m_Controls;
109 };
110 
111 #endif
#define MITKMODELFITUI_EXPORT
Qt table model for displaying the curve values of a ModelFitPlotData instance.
Widget that displays model fit plot data in a table and supports CSV export.
std::vector< mitk::modelFit::ModelFitInfo::ConstPointer > FitVectorType
Vector type holding const pointers to ModelFitInfo instances.
~QmitkFitPlotDataWidget() override
Destructor.
const mitk::ModelFitPlotData * GetPlotData() const
Returns a pointer to the currently stored plot data.
std::unique_ptr< Ui::QmitkFitPlotDataWidget > m_Controls
void SetXName(const std::string &xName)
Sets the display name for the x-axis column header.
void OnClipboardResultsButtonClicked() const
Copies the table contents as CSV text to the system clipboard.
void OnExportClicked() const
Exports the table data to a user-selected CSV file.
const std::string & GetXName() const
Returns the display name for the x-axis.
std::string StreamModelToString() const
Serializes the internal model data to a CSV-formatted string.
QmitkFitPlotDataWidget(QWidget *parent=nullptr)
Constructs a QmitkFitPlotDataWidget.
QmitkFitPlotDataModel * m_InternalModel
void SetPlotData(const mitk::ModelFitPlotData *data)
Sets the plot data to display in the table.