Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitknnInteractiveVersion.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 mitknnInteractiveVersion_h
14 #define mitknnInteractiveVersion_h
15 
17 
18 #include <string>
19 
20 namespace mitk
21 {
22  class PythonContext;
23 
24  namespace nnInteractive
25  {
31  enum class VersionStatus
32  {
33  Unknown,
34  BelowMinimum,
36  UpToDate
37  };
38 
43  {
45  std::string Installed;
46  std::string Latest;
47  };
48 
55  inline constexpr const char* MINIMUM_VERSION = "2.5.0";
56 
60  inline constexpr const char* MAXIMUM_VERSION_EXCLUSIVE = "3.0.0";
61 
99  MITKPYTHONSEGMENTATION_EXPORT VersionCheckResult CheckInstalledVersion(PythonContext& context, bool checkForUpdate = true, const std::string& distributionName = "nnInteractive");
100 
117  MITKPYTHONSEGMENTATION_EXPORT VersionCheckResult CheckInstalledVersion(bool checkForUpdate = true, const std::string& distributionName = "nnInteractive");
118  }
119 }
120 
121 #endif
#define MITKPYTHONSEGMENTATION_EXPORT
Provides a Python interpreter context for executing Python code and interacting with MITK data like i...
constexpr const char * MAXIMUM_VERSION_EXCLUSIVE
Exclusive upper bound on the supported nnInteractive version (the next major release is assumed to br...
MITKPYTHONSEGMENTATION_EXPORT VersionCheckResult CheckInstalledVersion(PythonContext &context, bool checkForUpdate=true, const std::string &distributionName="nnInteractive")
Compares the installed nnInteractive package against the supported version range, using the given Pyt...
constexpr const char * MINIMUM_VERSION
Minimum nnInteractive version this MITK build supports.
VersionStatus
Outcome of comparing the installed nnInteractive package against the version range this MITK build su...
@ UpdateAvailable
A newer in-range release exists on PyPI than the one installed.
@ BelowMinimum
Installed version is older than MINIMUM_VERSION (incompatible).
@ UpToDate
Installed version is supported and no newer in-range release is known.
@ Unknown
The installed or latest version could not be determined.
Find image slices visible on a given plane.
Result of CheckInstalledVersion(): the verdict plus the version strings it was derived from (empty wh...