Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
QmitkFitParameterWidget.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 QmitkFitParameterWidget_h
15 #define QmitkFitParameterWidget_h
16 
17 #include <mitkModelFitInfo.h>
18 #include <mitkPointSet.h>
19 
20 #include <MitkModelFitUIExports.h>
21 
22 #include <QWidget>
23 #include <memory>
24 
25 namespace Ui
26 {
28 }
29 
31 
46 {
47  Q_OBJECT
48 
49 public:
51  using FitVectorType = std::vector<mitk::modelFit::ModelFitInfo::ConstPointer>;
52 
57  QmitkFitParameterWidget(QWidget* parent = nullptr);
58 
61 
66  const FitVectorType& getFits() const;
67 
73 
79 
80 public Q_SLOTS:
81 
86  void setFits(const FitVectorType& fits);
87 
92  void setCurrentPosition(const mitk::Point3D& currentPos);
93 
98  void setPositionBookmarks(const mitk::PointSet* bookmarks);
99 
100 protected Q_SLOTS:
107  void OnExportClicked() const;
108 
113 
114 protected:
119  std::string streamModelToString() const;
120 
122 
123  std::unique_ptr<Ui::QmitkFitParameterWidget> m_Controls;
124 
125 };
126 
138 std::string SanatizeString(std::string str);
139 
140 #endif
#define MITKMODELFITUI_EXPORT
std::string SanatizeString(std::string str)
Sanitizes a string for safe use in CSV export.
Qt table model for displaying parameter values of model fit results at various world positions.
Widget that displays model fit parameter values at multiple world coordinate positions.
mitk::Point3D getCurrentPosition() const
Returns the current world coordinate position used for value lookup.
std::unique_ptr< Ui::QmitkFitParameterWidget > m_Controls
std::string streamModelToString() const
Serializes the internal model data to a CSV-formatted string.
~QmitkFitParameterWidget() override
Destructor.
void setCurrentPosition(const mitk::Point3D &currentPos)
Sets the current world coordinate position for parameter value lookup.
std::vector< mitk::modelFit::ModelFitInfo::ConstPointer > FitVectorType
Vector type holding const pointers to ModelFitInfo instances.
void OnExportClicked() const
Exports the parameter table to a user-selected CSV file.
void setFits(const FitVectorType &fits)
Sets the model fit info instances to display.
QmitkFitParameterWidget(QWidget *parent=nullptr)
Constructs a QmitkFitParameterWidget.
QmitkFitParameterModel * m_InternalModel
void setPositionBookmarks(const mitk::PointSet *bookmarks)
Sets the point set used as position bookmarks.
const FitVectorType & getFits() const
Returns the currently configured model fit info instances.
const mitk::PointSet * getPositionBookmarks() const
Returns the point set used as position bookmarks.
void OnClipboardResultsButtonClicked() const
Copies the parameter table contents as CSV text to the system clipboard.
Data structure which stores a set of points.
Definition: mitkPointSet.h:71