Tools to read Rapiscan proprietary .RCF X-ray scans (Rapiscan 618XR) and compare devices.
| File | Purpose |
|---|---|
rcf-viewer.html |
Self-contained browser viewer: folder explorer, dual-energy views, region measurements. Works offline. |
rcf_decode.py |
Batch decoder: exports both energy channels to .npz plus a preview PNG. |
Open rcf-viewer.html in a recent browser (Chrome, Edge, Firefox, Safari). No server and no network access are needed; files are decoded locally and never leave the machine.
- Open folder loads a folder tree; only
.RCFfiles are listed. - Files are grouped by folder or by acquisition date, parsed from the file name
<device>_<YYYYMMDDhhmmssSSS>_<tag>.RCF(e.g.6201219_20261028162201833_SCREENER.RCF= 2026-10-28 16:22:01.833). - ↑ / ↓ step through scans; the next scans are decoded in advance.
- Views: channel A, channel B, attenuation −ln(I/I₀) of each, and the attenuation ratio A/B.
- Select region measures mean and standard deviation in a rectangle; the region and the contrast window are kept across scans. Measurements can be copied as TSV.
Folder selection is not available on iOS and not always on Android; use Open files there.
pip install numpy pillow
python rcf_decode.py path/to/*.RCF --out decodedPrints a smoothness score per file; a high score means the encoding differs from the validated one.
Validated on a single file from one machine. Re-check on new machines or software versions.
- Sequence of chunks, each starting with
11 11 FF FF, followed by a 28-byte header of 7 little-endianuint32:[marker, type, ?, ?, ?, first_record_index, records_in_chunk]. - Type 3 chunks hold the image. Payloads concatenated in file order form the scan.
- 944 detector pixels per line; one pixel = one
uint32= twouint16channels:- channel A = bits 0–15 (lower noise, higher contrast, likely low energy),
- channel B = bits 16–31 (likely high energy).
- The high byte of each channel is bit-rotated: rotate left by 5 (A) and by 7 (B) to decode. The low byte looks like noise and its encoding is unconfirmed, so only 8 bits per channel are used.
- Values are transmitted intensity (air ≈ 227). Linearity is unknown; calibrate with a step wedge before quantitative work.
- Other chunk types (metadata, likely obfuscated strings) are not decoded.
Scans are excluded by .gitignore. Do not commit .RCF files, exports, or measurement tables that identify devices.