Skip to content

BIF parity: carry source associated images (label/thumbnail) + Probability_Image; overview fidelity #13

Description

@cornish

convert --to bif currently emits only the overview (IFD 0 "Label_Image") — carried from the source overview/macro when present, else synthesized. It does not carry the source's separate label or thumbnail, nor emit a Probability_Image (DP 200 IFD 1). The TIFF-family writers carry associated images faithfully (faithfulStrippedSpec).

Goals:

  • Carry the source's real label (barcode) — emit it appropriately rather than relying solely on the reader's top-1/3 crop of the overview.
  • Carry/emit a thumbnail where the source has one.
  • Emit a Probability_Image (DP 200 IFD 1) — at minimum a valid tissue mask.
  • Fix overview orientation/fidelity heuristics: rotate90CW assumes the Aperio "label-on-left" convention (wrong-handed scanners land the label at the bottom); the synthesized overview is a letterbox-centered tissue + blank label band; the overview is always full 1251×3685 uncompressed (~13.8 MB) regardless of slide size.

Part of the BIF writer parity set (bringing convert --to bif to parity with the other write targets). Context: internal/tiff/bifwriter + cmd/wsitools/convert_bif.go; cleanup backlog in docs/superpowers/specs/2026-06-17-bif-writer-feasibility.md §10. Note: opentile-go mis-renders BIF output until opentile-go#57 lands, so verify with bio-formats/QuPath, not opentile.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions