Batch#

zrad.batch contains save-to-disk workflows for processing many case folders with one configuration. Use these classes when you want the same operation that the GUI performs over a cohort of patients.

The batch API currently includes:

  • BatchPreprocessor for DICOM/NIfTI preprocessing and mask export.

  • BatchFilter for applying one image filter to every selected case.

  • BatchRadiomicsExtractor for writing one radiomics CSV from many cases.

The lower-level zrad.preprocessing, zrad.filtering, and zrad.radiomics modules remain the single-image or single-ROI APIs.

All batch workflows return BatchResult:

result = batch.run()

print(result.processed_count, result.skipped_count, result.failed_count)
for case in result.errors:
    print(case.case_name, case.error)

BatchFilter(input_directory, ...[, ...])

Run one image filter over many case folders and write NIfTI outputs.

FilteringCaseResult(case_name, status[, ...])

Per-case result returned by BatchFilter.

BatchPreprocessor(input_directory, ...[, ...])

Run preprocessing over many case folders and write NIfTI outputs.

PreprocessingCaseResult(case_name, status, ...)

Per-case result returned by BatchPreprocessor.

BatchRadiomicsExtractor(input_directory, ...)

Extract radiomics features for many case folders and write one CSV.

RadiomicsCaseResult(case_name, status, ...)

Per-case result returned by BatchRadiomicsExtractor.

BatchResult(workflow, case_results)

Summary returned by batch workflows.