diff --git a/_includes/links.md b/_includes/links.md index 7adb9d8..f9f76dd 100644 --- a/_includes/links.md +++ b/_includes/links.md @@ -29,6 +29,7 @@ [formats]: /formats/ [format-aperio]: /formats/aperio/ +[format-argos]: /formats/argos/ [format-dicom]: /formats/dicom/ [format-generic-tiff]: /formats/generic-tiff/ [format-hamamatsu]: /formats/hamamatsu/ diff --git a/demo/_synctiles.py b/demo/_synctiles.py index 1a9a7a0..14c1037 100755 --- a/demo/_synctiles.py +++ b/demo/_synctiles.py @@ -72,6 +72,7 @@ OVERLAP = 1 LIMIT_BOUNDS = True GROUP_NAME_MAP = { + 'Argos': 'ARGOS', 'Generic-TIFF': 'Generic TIFF', 'Hamamatsu': 'Hamamatsu NDPI', 'Hamamatsu-vms': 'Hamamatsu VMS', diff --git a/docs/newformat/index.md b/docs/newformat/index.md index dd54136..335277a 100644 --- a/docs/newformat/index.md +++ b/docs/newformat/index.md @@ -124,6 +124,7 @@ Your driver is also responsible for setting some [standard properties][doc-properties], when they apply to your format: - `openslide.background-color` +- `openslide.barcode` - `openslide.bounds-height` (must be an integer) - `openslide.bounds-width` (must be an integer) - `openslide.bounds-x` (must be an integer) @@ -140,6 +141,9 @@ Your driver is also responsible for setting some `openslide.background-color` should be set with `_openslide_set_background_color_prop()`. +`openslide.barcode` should be set to the decoded value of the label's +barcode if included in the slide metadata. + The `openslide.bounds-*` properties should be set for slides that omit image data along an entire edge of level 0. Drivers that use a single grid per level can set these properties with diff --git a/docs/properties/index.md b/docs/properties/index.md index a277e48..72845f0 100644 --- a/docs/properties/index.md +++ b/docs/properties/index.md @@ -15,6 +15,9 @@ redirect_from: : The background color of the slide, given as an RGB hex triplet. This property is not always present. +`openslide.barcode` +: The contents of the slide's barcode. This property is not always present. + `openslide.bounds-height` : The height of the rectangle bounding the non-empty region of the slide. This property is not always present. diff --git a/formats/argos/index.md b/formats/argos/index.md new file mode 100644 index 0000000..5fbf9fa --- /dev/null +++ b/formats/argos/index.md @@ -0,0 +1,93 @@ +--- +title: ARGOS format +permalink: /formats/argos/ +--- + +Format +: single-file pyramidal tiled BigTIFF with non-standard metadata + +File extensions +: `.avs` + +OpenSlide vendor backend +: `argos` + + +## Vendor Documentation + +[Documentation PDF](https://github.com/user-attachments/files/15580286/ARGOS.AVS.File.Format.pdf) + + +## Detection + +ARGOS slides are stored in single-file BigTIFF format. OpenSlide will detect +a file as ARGOS if: + + 1. The file is TIFF. + 2. The initial image is tiled. + 3. Tag 65000 contains valid XML whose root element is `Argos.Scan.Metadata`. + + +## Relevant TIFF tags + +Tag | Description | +--------------------|--------------------------------| +65000 | Metadata XML | + + +## Metadata XML + +The first TIFF directory includes metadata XML in TIFF tag 65000. The +field type is ASCII, but in our samples the value is not NUL-terminated +as required by TIFF, causing libtiff to warn about it. + +Value | Description | +--------------------|--------------------------------| +`MaxZ` | Integer identifier for highest focal plane | +`MinZ` | Integer identifier for lowest focal plane | +`ScanArea` | Coordinates of scanned portion of the slide (cm) | +`ZRange` | Distance between outermost focal planes (μm) | + + +## TIFF Image Directory Organization + +The TIFF file contains the image pyramid of the lowest focal plane, +followed by each higher plane in succession. Images are sparse, with +missing tiles represented by a zero `TileOffset` and a zero `TileByteCount`. + +The last two TIFF directories are the thumbnail and macro images, which are +both stripped. + + +## Associated Images + +`thumbnail` +: second-to-last image in the file, non-tiled + +`macro` +: last image in the file, non-tiled + + +## Known Properties + +All simple key-value data encoded in the metadata XML is represented as +properties prefixed with "`argos.`". + +`openslide.barcode` +: `argos.Barcode` + +`openslide.mpp-x` +: calculated as `10000/tiff.XResolution`, if `tiff.ResolutionUnit` is +`centimeter` + +`openslide.mpp-y` +: calculated as `10000/tiff.YResolution`, if `tiff.ResolutionUnit` is +`centimeter` + +`openslide.objective-power` +: normalized `argos.ObjectiveMagnification` + + +## Test Data + + diff --git a/formats/dicom/index.md b/formats/dicom/index.md index 6c552b8..871c709 100644 --- a/formats/dicom/index.md +++ b/formats/dicom/index.md @@ -84,6 +84,9 @@ _ICC Profile_ of the associated image. Many DICOM attributes are represented hierarchically as properties prefixed with "`dicom.`". +`openslide.barcode` +: _Barcode Value_ from highest-resolution level + `openslide.mpp-x` : normalized X component of _Pixel Spacing_ from highest-resolution level diff --git a/formats/index.md b/formats/index.md index 5c9c53a..3afe16c 100644 --- a/formats/index.md +++ b/formats/index.md @@ -26,6 +26,20 @@ More info : [Aperio format][format-aperio] +## ARGOS + +Single-file pyramidal tiled BigTIFF with non-standard metadata. + +File extensions +: `.avs` + +OpenSlide vendor backend +: `argos` + +More info +: [ARGOS format][format-argos] + + ## DICOM International standard multi-file medical imaging format. diff --git a/formats/leica/index.md b/formats/leica/index.md index bbdd13c..421f53e 100644 --- a/formats/leica/index.md +++ b/formats/leica/index.md @@ -104,6 +104,9 @@ OpenSlide mailing list.)* `leica.objective` : the `objective` of the main image +`openslide.barcode` +: `leica.barcode` + `openslide.mpp-x` : calculated as `10000/tiff.XResolution`, if `tiff.ResolutionUnit` is `centimeter` diff --git a/formats/philips/index.md b/formats/philips/index.md index e5e58e0..a5c0b39 100644 --- a/formats/philips/index.md +++ b/formats/philips/index.md @@ -84,6 +84,9 @@ All key-value data encoded in the `DPUfsImport` object, in the first object's `PixelDataRepresentation` objects is represented as properties prefixed with "`philips.`". +`openslide.barcode` +: Base64-decoded `philips.PIM_DP_UFS_BARCODE` + `openslide.mpp-x` : calculated as `1000 * philips.DICOM_PIXEL_SPACING[1]` diff --git a/formats/zeiss/index.md b/formats/zeiss/index.md index 5a0fbe2..c115c66 100644 --- a/formats/zeiss/index.md +++ b/formats/zeiss/index.md @@ -100,6 +100,11 @@ properties prefixed with "`zeiss.`". The available properties are those from the `AttachmentInfos`, `DisplaySetting`, `Information`, and `Scaling` elements of `ImageDocument.Metadata`. +`openslide.barcode` +: the value of the property matching + `zeiss.AttachmentInfos.*.Label.Barcodes.*.Content` that occurs earliest + in the XML metadata + `openslide.mpp-x` : calculated as 1000000 times `zeiss.Scaling.Items.X.Value` diff --git a/index.md b/index.md index e696327..78c9bde 100644 --- a/index.md +++ b/index.md @@ -44,6 +44,7 @@ terms of the [GNU Lesser General Public License, version 2.1][license]. The library can read virtual slides in the following formats: * [Aperio (.svs, .tif)][format-aperio] + * [ARGOS (.avs)][format-argos] * [DICOM (.dcm)][format-dicom] * [Hamamatsu (.vms, .vmu, .ndpi)][format-hamamatsu] * [Huron (.tif)][format-huron]