You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Converts a predicted pseudo-CT into a reconstructed ACPET image using [STIR](http://stir.sourceforge.net/) (Software for Tomographic Image Reconstruction). The pipeline:
125
125
126
126
1. Validates CT shape, affine, and HU range
127
-
2. Converts HU → linear attenuation coefficients (μ-map) at 511 keV using the Carney et al. (2006) bilinear model
128
-
3. Smooths the μ-map (4mm FWHM Gaussian)
129
-
4. Resamples the μ-map to STIR sinogram format
130
-
5. Computes the ACF (attenuation correction factor) sinogram
131
-
6. Applies ACF to multiplicative/additive sinograms
132
-
7. Reconstructs using OSEM (ordered subsets expectation maximisation)
133
-
8. Applies 4mm post-reconstruction filter
134
-
9. Converts to NIfTI with correct bed/gantry offset origin
127
+
2. Swaps face and scanner bed region back from ground-truth CT (to avoid evaluating face/bed prediction)
128
+
3. Converts HU → linear attenuation coefficients (μ-map) at 511 keV using the Carney et al. (2006) bilinear model
129
+
4. Smooths the μ-map (4mm FWHM Gaussian)
130
+
5. Resamples the μ-map to STIR format (ring spacing 3.29114 mm)
131
+
6. Computes the ACF (attenuation correction factor) sinogram
132
+
7. Applies ACF to the additive sinogram
133
+
8. Applies ACF to the multiplicative sinogram
134
+
9. Reconstructs using OSEM (ordered subsets expectation maximisation, with post-filter)
135
+
10. Converts to NIfTI with correct bed/gantry offset origin
135
136
136
137
### Option 1: Docker (recommended)
137
138
@@ -147,26 +148,29 @@ docker run --rm \
147
148
ghcr.io/bic-mac-challenge/recon:latest
148
149
```
149
150
150
-
The reconstructed PET is written to `/data/output/pet.nii.gz`.
151
+
The reconstructed PET is written to `/data/output/pet.nii.gz`. Intermediate files (mu-map, ACF sinogram, etc.) are written to `/data/output/intermediates/` and a full debug log to `/data/output/intermediates/recon.log`.
151
152
152
-
Optionally mount a local directory to `/data/intermediates` to persist intermediate files (mu-map, ACF sinogram, etc.). When mounted, the pipeline resumes from any existing intermediates rather than recomputing them; set `OVERWRITE=1` to forcefully restart from scratch instead.
153
+
The pipeline resumes from any existing intermediates automatically; set `OVERWRITE=1` to forcefully restart from scratch:
153
154
154
155
```bash
155
156
docker run --rm \
157
+
-e OVERWRITE=1 \
156
158
-v /path/to/sub-000/recon:/data/recon \
157
159
-v /path/to/ct_pred.nii.gz:/data/ct/ct.nii.gz \
158
160
-v /path/to/output:/data/output \
159
-
-v /path/to/intermediates:/data/intermediates \
160
161
ghcr.io/bic-mac-challenge/recon:latest
161
162
```
162
163
164
+
Set `VERBOSE=1` to stream STIR subprocess output to the terminal in addition to the log file.
`pet.nii.gz` and `intermediates/` are written inside `output_dir`. Use `-w`/`--overwrite` to rerun from scratch and `-v`/`--verbose` to stream STIR output to the terminal.
0 commit comments