Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
QmitkFitPlotDataWidget Class Reference

Widget that displays model fit plot data in a table and supports CSV export. More...

#include <QmitkFitPlotDataWidget.h>

Inheritance diagram for QmitkFitPlotDataWidget:
Collaboration diagram for QmitkFitPlotDataWidget:

Public Types

using FitVectorType = std::vector< mitk::modelFit::ModelFitInfo::ConstPointer >
 Vector type holding const pointers to ModelFitInfo instances. More...
 

Public Slots

void SetPlotData (const mitk::ModelFitPlotData *data)
 Sets the plot data to display in the table. More...
 
void SetXName (const std::string &xName)
 Sets the display name for the x-axis column header. More...
 

Public Member Functions

 QmitkFitPlotDataWidget (QWidget *parent=nullptr)
 Constructs a QmitkFitPlotDataWidget. More...
 
 ~QmitkFitPlotDataWidget () override
 Destructor. More...
 
const mitk::ModelFitPlotData * GetPlotData () const
 Returns a pointer to the currently stored plot data. More...
 
const std::string & GetXName () const
 Returns the display name for the x-axis. More...
 

Protected Slots

void OnExportClicked () const
 Exports the table data to a user-selected CSV file. More...
 
void OnClipboardResultsButtonClicked () const
 Copies the table contents as CSV text to the system clipboard. More...
 

Protected Member Functions

std::string StreamModelToString () const
 Serializes the internal model data to a CSV-formatted string. More...
 

Protected Attributes

std::unique_ptr< Ui::QmitkFitPlotDataWidget > m_Controls
 
QmitkFitPlotDataModel * m_InternalModel
 

Detailed Description

Widget that displays model fit plot data in a table and supports CSV export.

This widget wraps a QmitkFitPlotDataModel in a table view, presenting the numerical curve data of a ModelFitPlotData instance. It provides buttons to copy the table contents to the system clipboard or to export them to a CSV file.

See also
QmitkFitPlotDataModel
mitk::ModelFitPlotData

Definition at line 43 of file QmitkFitPlotDataWidget.h.

Member Typedef Documentation

◆ FitVectorType

using QmitkFitPlotDataWidget::FitVectorType = std::vector<mitk::modelFit::ModelFitInfo::ConstPointer>

Vector type holding const pointers to ModelFitInfo instances.

Definition at line 49 of file QmitkFitPlotDataWidget.h.

Constructor & Destructor Documentation

◆ QmitkFitPlotDataWidget()

QmitkFitPlotDataWidget::QmitkFitPlotDataWidget ( QWidget *  parent = nullptr)

Constructs a QmitkFitPlotDataWidget.

Parameters
[in]parentOptional parent widget.

◆ ~QmitkFitPlotDataWidget()

QmitkFitPlotDataWidget::~QmitkFitPlotDataWidget ( )
override

Destructor.

Member Function Documentation

◆ GetPlotData()

const mitk::ModelFitPlotData* QmitkFitPlotDataWidget::GetPlotData ( ) const

Returns a pointer to the currently stored plot data.

Returns
Pointer to the internal ModelFitPlotData instance.

◆ GetXName()

const std::string& QmitkFitPlotDataWidget::GetXName ( ) const

Returns the display name for the x-axis.

Returns
Const reference to the x-axis name string.

◆ OnClipboardResultsButtonClicked

void QmitkFitPlotDataWidget::OnClipboardResultsButtonClicked ( ) const
protectedslot

Copies the table contents as CSV text to the system clipboard.

◆ OnExportClicked

void QmitkFitPlotDataWidget::OnExportClicked ( ) const
protectedslot

Exports the table data to a user-selected CSV file.

Opens a file dialog for the user to choose a destination. Displays an error message if the file cannot be created or opened.

◆ SetPlotData

void QmitkFitPlotDataWidget::SetPlotData ( const mitk::ModelFitPlotData *  data)
slot

Sets the plot data to display in the table.

Parameters
[in]dataPointer to the ModelFitPlotData to display.

◆ SetXName

void QmitkFitPlotDataWidget::SetXName ( const std::string &  xName)
slot

Sets the display name for the x-axis column header.

Parameters
[in]xNameThe name for the x-axis.

◆ StreamModelToString()

std::string QmitkFitPlotDataWidget::StreamModelToString ( ) const
protected

Serializes the internal model data to a CSV-formatted string.

Returns
The model content as a CSV string.

Member Data Documentation

◆ m_Controls

std::unique_ptr<Ui::QmitkFitPlotDataWidget> QmitkFitPlotDataWidget::m_Controls
protected

Definition at line 107 of file QmitkFitPlotDataWidget.h.

◆ m_InternalModel

QmitkFitPlotDataModel* QmitkFitPlotDataWidget::m_InternalModel
protected

Definition at line 108 of file QmitkFitPlotDataWidget.h.


The documentation for this class was generated from the following file: