pyCERR documentation
pyCERR (Python-based Computational Environment for Radiological Research) stores
all data for a patient in a single PlanC container — scans, structures
(segmentations), dose, treatment plans (beams) and deformations — defined in
cerr.plan_container.
Features
Data import / export
DICOM import of CT/MR/PT/US/NM scans plus RTSTRUCT, RTDOSE and RTPLAN (
cerr.plan_container.loadDcmDir)NIfTI import/export of scans, segmentations and dose
Full-
PlanCHDF5 serialization (saveToH5/loadFromH5)DICOM RTSTRUCT export (
cerr.dcm_export.rtstruct_iod)
Segmentation & contours
Lazy polygon → binary-mask rasterization (
cerr.contour.rasterseg.getStrMask)Import label maps / binary masks as structures (
cerr.dataclasses.structure.importStructureMask)
Radiomics (IBSI-compliant)
Scalar features: morphology, first-order, GLCM / GLRLM / GLSZM / GLDZM / NGTDM / NGLDM (IBSI-1)
Convolutional texture / filter-response maps: mean, LoG, Laws, Gabor, wavelet (IBSI-2)
cerr.radiomics.ibsi1.computeScalarFeatures
Dosimetry & outcomes
Dose–volume histograms and metrics — Dx, Vx, MOHx, MOCx, mean dose (
cerr.dvh)Radiotherapy outcome models — NTCP/TCP: LKB, logistic, Cox, Appelt (
cerr.roe)IMRT planning / beamlet dose calculation (
cerr.imrtp)
Image processing
Deformable image registration via plastimatch / ANTs (
cerr.registration)Resampling, intensity preprocessing and masking (
cerr.utils)Semi-quantitative DCE-MRI features (
cerr.mri_metrics)Helpers for AI model training / inference (
cerr.utils.ai_pipeline)
Visualization — three interchangeable viewers driven by the same planC
(cerr.viewer):
pycerr_napari— napari 2D/3D viewerpycerr_gui— PyQt5 CERR-style desktop viewerpycerr_nbviewer— Jupyter / Colab notebook viewer
cerr and its sub-packages
- cerr package
- cerr.dataclasses package
- cerr.radiomics package
- Submodules
- cerr.radiomics.first_order module
- cerr.radiomics.gray_level_cooccurence module
- cerr.radiomics.ibsi1 module
- cerr.radiomics.neighbor_gray_level_dependence module
- cerr.radiomics.neighbor_gray_tone module
- cerr.radiomics.preprocess module
- cerr.radiomics.run_length module
- cerr.radiomics.shape module
- cerr.radiomics.size_zone module
- cerr.radiomics.texture_filters module
- cerr.radiomics.texture_utils module
- cerr.radiomics.vector_elasticity module
- Module contents
- cerr.registration package
- cerr.utils package
- cerr.viewer package
- cerr.imrtp package
- tests package