CBCT (Cone Beam Computed Tomography) generates pseudo CT images, which are essential for applications where traditional CT scans are unavailable or difficult to acquire.
Data structure
Brain_Pelvis
-train
|-brain
|-1BA001
|-ct.nii.gz
|-cbct.nii.gz
|-mask.nii.gz
|- ...
|-1BA005
|-ct.nii.gz
|-cbct.nii.gz
|-mask.nii.gz
|-pelvis
|-1PA001
|-ct.nii.gz
|-cbct.nii.gz
|-mask.nii.gz
|- ...
|-1PA004
|-ct.nii.gz
|-cbct.nii.gz
|-mask.nii.gz
-test
|-brain
|- ...
|-pelvis
|- ...
python data_split.pypython make_dataset.pypython train.py
python test.py
python predict.pyconda env create -f env.ymlconda activate cbct2ctconda env export --no-builds > env.ymlconda create --name cbct2ct python=3.9conda activate cbct2ctpip install -i https://pypi.tuna.tsinghua.edu.cn/simple pyinstaller
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple SimpleITK
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple onnxruntime
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple tqdmpyinstaller --name CBCT2CT --onefile --icon=cbct2ct.ico CBCT2CT.pypyinstaller --clean CBCT2CT.specOnce the build is complete, you can run the generated CBCT2CT.exe with the required parameters:
CBCT2CT.exe --cbct_path ./test_data/brain/cbct.nii.gz --mask_path ./test_data/brain/mask.nii.gz --result_path ./result --anatomy brainCBCT2CT.exe --cbct_path ./test_data/pelvis/cbct.nii.gz --mask_path ./test_data/pelvis/mask.nii.gz --result_path ./result --anatomy pelvis--cbct_path: Path to the input CBCT image file.--mask_path: Path to the input mask file.--result_path: Path where the results will be saved.--anatomy: Choose a model based on anatomical region.
conda deactivate
conda remove --name cbct2ct --all