Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitknnInteractiveModel.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 #ifndef mitknnInteractiveModel_h
14 #define mitknnInteractiveModel_h
15 
17 
18 #include <string>
19 #include <vector>
20 
21 class QWidget;
22 
23 namespace mitk
24 {
25  namespace nnInteractive
26  {
32  struct ModelInfo
33  {
34  std::string Id;
35  std::string DisplayName;
36  bool IsDefault = false;
37  bool Downloaded = false;
38  };
39 
45  enum class ModelUpdateStatus
46  {
47  Unknown,
48  UpToDate,
50  };
51 
54  {
56  std::string CurrentId;
57  std::string RecommendedId;
58  };
59 
63  enum class ModelListStatus
64  {
65  Ok,
66  Empty,
67  Failed
68  };
69 
95  MITKPYTHONSEGMENTATIONUI_EXPORT std::vector<ModelInfo> ListModels(const std::string& venvName, ModelListStatus* status = nullptr, QWidget* parent = nullptr);
96 
120  MITKPYTHONSEGMENTATIONUI_EXPORT ModelCheckResult CheckModelUpdate(const std::string& venvName, const std::string& selectedModelId, QWidget* parent = nullptr);
121  }
122 }
123 
124 #endif
#define MITKPYTHONSEGMENTATIONUI_EXPORT
ModelUpdateStatus
Outcome of comparing the selected checkpoint against the library's recommended default.
@ UpdateAvailable
A different checkpoint is now recommended as the default.
@ UpToDate
The selection already matches the recommended default.
@ Unknown
Could not determine (offline, no model management, or empty list).
ModelListStatus
Outcome of a ListModels() query, distinguishing an empty manifest from a hard failure.
@ Ok
The query ran and returned at least one model.
@ Empty
The query ran but the manifest contains no models.
@ Failed
The query could not run (no environment, offline, no model management).
MITKPYTHONSEGMENTATIONUI_EXPORT std::vector< ModelInfo > ListModels(const std::string &venvName, ModelListStatus *status=nullptr, QWidget *parent=nullptr)
Lists the model checkpoints known to nnInteractive's model management.
MITKPYTHONSEGMENTATIONUI_EXPORT ModelCheckResult CheckModelUpdate(const std::string &venvName, const std::string &selectedModelId, QWidget *parent=nullptr)
Checks whether a checkpoint newer than the selected one is recommended.
Find image slices visible on a given plane.
std::string RecommendedId
The manifest's default model id (empty when unknown).
std::string CurrentId
The model id that was checked.
A model checkpoint entry as reported by nnInteractive's model management.
std::string DisplayName
Human-readable name (falls back to Id).
std::string Id
Model id, e.g. "nnInteractive_v1.0".
bool Downloaded
Whether the checkpoint is already available locally.
bool IsDefault
Whether this is the manifest's recommended default.