validate.gui.worker#

Background threads (ensures installing AI models, running segmentation and evaluating dosimetric models never blocks the GUI thread.

Functions

killChildProcesses([timeout])

Terminate this process's child processes and their children (AI model inference, git, uv, weights downloads), killing any still running after timeout s.

Classes

DeriveWorker(*args, **kwargs)

Derives the modelled structures only, without NTCP (run.deriveStructuresForCohort).

InstallWorker(*args, **kwargs)

Runs installMissingModels off the GUI thread.

ModelWorker(*args, **kwargs)

Derives modelled structures and computes NTCP (run.applyModelToCohort).

RunWorker(*args, **kwargs)

Applies a selected method (Segment/Model) to the entire cohort, maintaining a distinct error log, progress, and a stop request that takes effect before the next patient.

SegmentWorker(*args, **kwargs)

Runs selected AI models (run.applyAutoSegToCohort).

validate.gui.worker.killChildProcesses(timeout=3)[source]#

Terminate this process’s child processes and their children (AI model inference, git, uv, weights downloads), killing any still running after timeout s.

class validate.gui.worker.InstallWorker(*args, **kwargs)[source]#

Bases: QThread

Runs installMissingModels off the GUI thread. Supports AI model installation (git clone + weights download + env creation) without blocking the window.

stage#

alias of str

finishedOk#

alias of list

failed#

alias of str

abort()[source]#

Stop the install now: kill its processes. Unfinished weights downloads are deleted once it stops (see run).

run()[source]#

Install the models, then emit finishedOk with each model’s result, or failed with the error message. After an abort, unfinished weights downloads are deleted first.

class validate.gui.worker.RunWorker(*args, **kwargs)[source]#

Bases: QThread

Applies a selected method (Segment/Model) to the entire cohort, maintaining a distinct error log, progress, and a stop request that takes effect before the next patient.

stage#

alias of str

progress#

alias of int

finishedOk#

alias of object

failed#

alias of str

requestStop()[source]#

Ask the run to stop before the next patient.

abort()[source]#

Stop the run now: kill its processes (AI model inference). The patient being run is recorded as aborted, and the run stops there.

run()[source]#

Run over the cohort with a new error log, then emit finishedOk with the results and the error log’s path, or failed with the error message and path.

class validate.gui.worker.SegmentWorker(*args, **kwargs)[source]#

Bases: RunWorker

Runs selected AI models (run.applyAutoSegToCohort).

class validate.gui.worker.ModelWorker(*args, **kwargs)[source]#

Bases: RunWorker

Derives modelled structures and computes NTCP (run.applyModelToCohort).

class validate.gui.worker.DeriveWorker(*args, **kwargs)[source]#

Bases: RunWorker

Derives the modelled structures only, without NTCP (run.deriveStructuresForCohort).