validate.gui.main_window#

Main window: the shared settings (data folder, plan info, dosimetric model, analysis folder) above the Segment, Model and Review tabs.

The settings in the form are written to <analysis folder>/analysis.yaml only after the user confirms, in a pop-up shown before a run, a tab switch or closing the window whenever the form differs from the saved file (see ensureSaved).

An analysis holds one dosimetric model: changing the model of a saved analysis begins a new analysis in another folder (default <Data Dir>/analysis_<model>).

Classes

MainWindow(*args, **kwargs)

class validate.gui.main_window.MainWindow(*args, **kwargs)[source]#

Bases: QMainWindow

analysisDir()[source]#
fromPredictors()[source]#

True when starting from pre-computed predictors rather than images.

dataDir()[source]#

The cohort folder; None when starting from pre-computed predictors.

planInfo()[source]#

The plan info CSV; None when starting from pre-computed predictors.

modelName()[source]#
modelFile()[source]#
patients()[source]#

Patient IDs in the data folder ([] if there is none).

taskLog()[source]#

The analysis folder’s task log, or None if there is none (or it can’t be read).

runningTask()[source]#

(label, thread, tab) for the run or AI model install in progress, or None. Only one runs at a time, since each run rewrites task_log.yaml.

checkIdle()[source]#

True if nothing is running; otherwise say what is, and return False.

goToTab(name)[source]#
setCohortDir(cohortDir)[source]#

Pre-fill Data Dir (see __main__.py’s optional command-line argument).

onPredictorsCsvChanged()[source]#

Called by the Model tab: the predictors CSV sets the default analysis folder when starting from pre-computed predictors.

formSettings()[source]#

The settings in the form, in analysis.yaml’s layout.

ensureSaved(required=False, closing=False)[source]#

Make sure analysis.yaml holds the form’s settings, asking the user first.

If the form differs from the saved settings, a pop-up asks to save them (noting any results they will clear) with Save and continue / Cancel.

Parameters:
  • required (bool) – True before a run, which needs an analysis folder; False for a tab switch or closing, which go ahead without one.

  • closing (bool) – True when closing the window; the pop-up then also offers Close without saving.

Returns:

bool – True to continue, False if the user cancelled.

closeEvent(event)[source]#