|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
Qt table model for displaying parameter values of model fit results at various world positions. More...
#include <QmitkFitParameterModel.h>


Public Types | |
| using | FitVectorType = std::vector< mitk::modelFit::ModelFitInfo::ConstPointer > |
| Vector type holding const pointers to ModelFitInfo instances. More... | |
Public Slots | |
| void | setFits (const FitVectorType &fits) |
| Sets the model fit info instances to display. More... | |
| void | setCurrentPosition (const mitk::Point3D ¤tPos) |
| Sets the current world coordinate position for parameter value lookup. More... | |
| void | setPositionBookmarks (const mitk::PointSet *bookmarks) |
| Sets the point set used as position bookmarks. More... | |
Public Member Functions | |
| QmitkFitParameterModel (QObject *parent=nullptr) | |
| Constructs a QmitkFitParameterModel. More... | |
| ~QmitkFitParameterModel () override | |
| Destructor. More... | |
| const FitVectorType & | getFits () const |
| Returns the currently set model fit info instances. More... | |
| mitk::Point3D | getCurrentPosition () const |
| Returns the current world coordinate position used for value lookup. More... | |
| const mitk::PointSet * | getPositionBookmarks () const |
| Returns the point set used as position bookmarks. More... | |
| Qt::ItemFlags | flags (const QModelIndex &index) const override |
| Returns item flags for the given model index. More... | |
| QVariant | data (const QModelIndex &index, int role) const override |
| Returns data for the given index and role. More... | |
| QVariant | headerData (int section, Qt::Orientation orientation, int role) const override |
| Returns header data for the specified section, orientation, and role. More... | |
| int | rowCount (const QModelIndex &parent=QModelIndex()) const override |
| Returns the number of rows in the model. More... | |
| int | columnCount (const QModelIndex &parent=QModelIndex()) const override |
| Returns the number of columns in the model. More... | |
| bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override |
| Sets data for a given index (currently always returns false; model is read-only). More... | |
Protected Member Functions | |
| std::size_t | getBookmarksCount () const |
Qt table model for displaying parameter values of model fit results at various world positions.
This model presents the parameter values of one or more ModelFitInfo instances evaluated at the current world coordinate position and optional bookmark positions. When a single fit is provided, the model displays a flat list of parameters. When multiple fits are present, the model uses a tree hierarchy where the first level represents fits and the second level represents the parameters of each fit.
Columns are organized as: parameter name, parameter type, value at the current position, and one additional column per bookmark position.
Definition at line 40 of file QmitkFitParameterModel.h.
| using QmitkFitParameterModel::FitVectorType = std::vector<mitk::modelFit::ModelFitInfo::ConstPointer> |
Vector type holding const pointers to ModelFitInfo instances.
Definition at line 46 of file QmitkFitParameterModel.h.
| QmitkFitParameterModel::QmitkFitParameterModel | ( | QObject * | parent = nullptr | ) |
Constructs a QmitkFitParameterModel.
| [in] | parent | Optional parent QObject. |
|
inlineoverride |
Destructor.
Definition at line 55 of file QmitkFitParameterModel.h.
|
override |
Returns the number of columns in the model.
Always returns 3 (name, type, current value) plus the number of bookmark positions.
| [in] | parent | The parent model index. |
|
override |
Returns data for the given index and role.
Provides parameter names (column 0), parameter types (column 1), values at the current position (column 2), and values at bookmark positions (columns 3+). Static parameters are displayed with comma-separated values. When multiple fits are set, the top-level rows show fit name and UID.
| [in] | index | The model index to query. |
| [in] | role | The Qt item data role. |
|
override |
Returns item flags for the given model index.
| [in] | index | The model index to query. |
|
protected |
| mitk::Point3D QmitkFitParameterModel::getCurrentPosition | ( | ) | const |
Returns the current world coordinate position used for value lookup.
| const FitVectorType& QmitkFitParameterModel::getFits | ( | ) | const |
Returns the currently set model fit info instances.
| const mitk::PointSet* QmitkFitParameterModel::getPositionBookmarks | ( | ) | const |
Returns the point set used as position bookmarks.
|
override |
Returns header data for the specified section, orientation, and role.
Horizontal headers are: "Name", "Type", "Value", and positional headers for each bookmark showing coordinates.
| [in] | section | The column index. |
| [in] | orientation | The header orientation (horizontal or vertical). |
| [in] | role | The Qt item data role. |
|
override |
Returns the number of rows in the model.
For a single fit, returns the number of parameters plus static parameters. For multiple fits, the top-level row count equals the number of fits, and child row counts equal the parameter counts of each respective fit.
| [in] | parent | The parent model index. |
|
slot |
Sets the current world coordinate position for parameter value lookup.
Triggers a full model reset so that values are re-read at the new position.
| [in] | currentPos | The new 3D world position. |
|
override |
Sets data for a given index (currently always returns false; model is read-only).
| [in] | index | The model index. |
| [in] | value | The value to set. |
| [in] | role | The Qt item data role. |
|
slot |
Sets the model fit info instances to display.
Triggers a full model reset.
| [in] | fits | Vector of ModelFitInfo pointers to display. |
|
slot |
Sets the point set used as position bookmarks.
Each bookmark adds an additional column to the model showing parameter values at that position. Triggers a full model reset.
| [in] | bookmarks | Pointer to a PointSet of bookmark positions, or nullptr to clear. |