Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitk::PipInstallSpec Struct Reference

Full specification for a pip installation run. More...

#include <mitkPipPackageInfo.h>

Collaboration diagram for mitk::PipInstallSpec:

Public Member Functions

void SaveToFile (const std::string &path) const
 Save this PipInstallSpec to a JSON file. More...
 

Static Public Member Functions

static PipInstallSpec FromFile (const std::string &path)
 Load a PipInstallSpec from a JSON file. More...
 
static PipInstallSpec FromResource (const std::string &resourcePath)
 Load a PipInstallSpec from a Qt resource path. More...
 

Public Attributes

std::string name
 
std::string venvName
 
std::vector< PipInstallGroup > groups
 
bool upgradePipFirst
 
std::vector< PostInstallStep > postInstallSteps
 

Detailed Description

Full specification for a pip installation run.

Contains one or more install groups that are processed sequentially, plus global options like whether to upgrade pip first, plus an optional list of Python commands to run after pip install completes.

Definition at line 101 of file mitkPipPackageInfo.h.

Member Function Documentation

◆ FromFile()

static PipInstallSpec mitk::PipInstallSpec::FromFile ( const std::string &  path)
static

Load a PipInstallSpec from a JSON file.

Parameters
[in]pathFile system path to a .json file.
Returns
The deserialized install spec.
Exceptions
std::runtime_errorIf the file cannot be read or parsed.

◆ FromResource()

static PipInstallSpec mitk::PipInstallSpec::FromResource ( const std::string &  resourcePath)
static

Load a PipInstallSpec from a Qt resource path.

Parameters
[in]resourcePathQt resource path, e.g. ":/nnInteractive/install_spec.json".
Returns
The deserialized install spec.
Exceptions
std::runtime_errorIf the resource cannot be read or parsed.

◆ SaveToFile()

void mitk::PipInstallSpec::SaveToFile ( const std::string &  path) const

Save this PipInstallSpec to a JSON file.

Parameters
[in]pathFile system path to write.
Exceptions
std::runtime_errorIf the file cannot be written.

Member Data Documentation

◆ groups

std::vector<PipInstallGroup> mitk::PipInstallSpec::groups

Install groups, processed in order.

Definition at line 105 of file mitkPipPackageInfo.h.

◆ name

std::string mitk::PipInstallSpec::name

Human-readable display name, e.g. "nnInteractive".

Definition at line 103 of file mitkPipPackageInfo.h.

◆ postInstallSteps

std::vector<PostInstallStep> mitk::PipInstallSpec::postInstallSteps

Python commands to run after pip install.

Definition at line 107 of file mitkPipPackageInfo.h.

◆ upgradePipFirst

bool mitk::PipInstallSpec::upgradePipFirst

Whether to upgrade pip before installing.

Definition at line 106 of file mitkPipPackageInfo.h.

◆ venvName

std::string mitk::PipInstallSpec::venvName

If set, create and activate this venv before installing.

Definition at line 104 of file mitkPipPackageInfo.h.


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