Skip to content
Ledger-DonjonPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

RCF tools

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.

Viewer

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 .RCF files 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.

Decoder

pip install numpy pillow
python rcf_decode.py path/to/*.RCF --out decoded

Prints a smoothness score per file; a high score means the encoding differs from the validated one.

RCF format (reverse-engineered)

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-endian uint32: [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 = two uint16 channels:
    • 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.

Data handling

Scans are excluded by .gitignore. Do not commit .RCF files, exports, or measurement tables that identify devices.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages