Bio-Rad Image Lab .scn
Bio-Rad Image Lab (desktop, and Image Lab Touch on ChemiDoc and Gel Doc imagers) saves gel and blot scans as .scn files. OpenReadout returns the 16-bit image of each scan with its pixel size, imager, exposure, filters, user, dates and audit log.
Derived from public files of many depositors (Image Lab 3.0.1 to 6.1.0), with Bio-Formats 8.5.0 run as a black box for ground truth. Provenance: docs/provenance/biorad-scn.md. Crate: openreadout-gel.
| format id | files | reads | confidence |
|---|---|---|---|
biorad-scn |
.scn written by Bio-Rad Image Lab (desktop and the imagers’ Image Lab Touch) |
the 16-bit image of each scan, pixel size, imager, application, exposure, filters, user, dates, audit log | high (evidence rubric, docs/assurance.md) |
Leica SCN whole-slide files share the extension; they are TIFF and the TIFF reader takes them.
Layout
A MIME document (RFC 2046): header lines MIME-Version: 1.0 (Generated by Image Lab <version>),
Content-Type: multipart/mixed; boundary="<b>", Content-Description: Image Lab Image File, a
blank line, then parts separated by --<b> lines. Image Lab writes a delimiter after every part
and no --<b>-- closing marker: a multipart ends where the enclosing multipart’s delimiter (or the
end of the file) follows its last delimiter. Leaf parts carry Content-Length; the reader uses it
to skip binary bodies (a body may contain anything) and never loads an image to parse the file.
Parts seen, in order:
part (Content-Description) |
type | holds |
|---|---|---|
ItemHeaderTag |
text/xml | authoring application and version, item name, scan id, description, user, channel count, display settings (per scan transform low/high fraction, gamma, invert) |
ScanImageTag<n> |
multipart | one scan: ImageData and ImageHeader |
ImageData |
application/octet-stream | width × height little-endian unsigned 16-bit samples, row-major from the top left (8-bit when the length is width × height) |
ImageHeader |
text/xml | name, creation_date (Unix time), endian, size_pix, org_size_pix (size before cropping), size_mm (known true/false), scanner (data_ceiling, max_value), image/@zero_is, scan_attributes and extended_scan_attributes (name/value/type triples), units, history, scaler |
ItemProtocolSettingsTag |
text/xml | imager type, exposure settings, band-detection and molecular-weight settings, the audit log ListLogEntries/LogEntry (Timestamp, FullName, User, Type, Data) |
An XML part starts <!DOCTYPE XML>. Any other part is listed by info --view structure and, when XML, kept in the
vendor tree. No file seen stores lane or band analysis.
What the reader returns
- Images: one per
ScanImageTagholdingImageData+ImageHeader;uint16(oruint8), one channel, one plane. A scan whose data length is neither width × height × 2 nor × 1, or whose byte order is not little, is refused (the file still opens;checkreports it). - Pixel size (µm):
size_mm× 1000 /size_pixwhensize_mm/@knownistrue; none when it isfalse(an imported TIFF gets an 88.9 mm, 300-dpi default that is not a measurement; Bio-Formats uses it, we do not). - Channel: name = the
Applicationattribute (Chemiluminescence,Chemi,Chemi+Marker,Colorimetric,Coomassie Blue,Ethidium Bromide,IRDye 800CW, …;signalwhen absent),exposure_msfromExposure Time (sec), andemission_nm/emission_range_nmfrom an emission filter written<centre>/<width> Filter(835/50 Filter→ 835 nm, 810-860 nm). - Image
extra:zero_isanddisplay_inverted(truewhenzero_isiswhite: Image Lab shows the image dark-on-light; values are as stored, higher = more signal),size_mm,original_size_px(before cropping),data_ceiling,max_value,excitation_source,emission_filter,creation_date,history,gel_scaling(mode,real_scaleof a Molecular Dynamics.gelimport: the stored values are the square-root-encoded counts and are not linearized),scan_attributes(every attribute as the file names it). - Table 0
log(when the file has an audit log):time(s, Unix time),userandentryas category codes (the full name, or the user id; the logged action: rotation, crop, “saved as”). - Experiment: instrument vendor Bio-Rad, model (the
Imagerattribute without™), serial number, software Image Lab and its version (FileAuthoringInfo/version);sample.name= the item name;acquisition.started_at=Image Date,operator= the item’s user,comment= its description; method parametersexposure_time(s),application,excitation_source,emission_filter,binning; the measurement names western blot (OBI:0000854) for chemiluminescence and IRDye applications and gel electrophoresis (CHMO:0001021) for stains and gel dyes, nothing otherwise.
Validation
cargo test -p openreadout-corpus-tests --features corpus compares every development file with
Bio-Formats 8.5.0 (oracle/gen.py biorad_scn): image size, pixel type, physical size (where
Image Lab marks it known) and the plane, bit for bit (xxh3-128): 14 of 14 match. One further
depositor’s file is held out.
Vocabulary (public API of openreadout-gel)
| identifier | meaning |
|---|---|
ImageLabReader |
reader of Bio-Rad Image Lab .scn files |
IMAGE_LAB_FORMAT_ID |
biorad-scn |
ScnDataset |
the dataset the reader returns |
How this reader was derived, file by file: provenance log.