diff --git a/_testdata/testdata_index.py b/_testdata/testdata_index.py index 2b9668d..04939e9 100755 --- a/_testdata/testdata_index.py +++ b/_testdata/testdata_index.py @@ -43,7 +43,7 @@ 'sha256', ) ) -OPTIONAL_FIELDS = frozenset(('credit',)) +OPTIONAL_FIELDS = frozenset(('credit', 'deprecated')) INDEX_TEMPLATE = """ @@ -59,6 +59,10 @@ padding-left: 10px; padding-right: 10px; } +tr.deprecated { + color: #888888; + background: #f4e8e8; +} td { padding-top: 0.5em; padding-bottom: 0.5em; @@ -88,14 +92,17 @@ Credit {% macro row(icon, href, name, size='', description='', license='', - credit='') %} - + credit='', deprecated=false) %} + {{ name }} {{ size }} - {{ description }} + + {{ description }} + {% if deprecated %}(deprecated){% endif %} + {% if license == 'distributable' %} Free to use and distribute, with or without modification @@ -122,7 +129,7 @@ {% for name, info in (files or {}).items()|sort %} {{ row('fa-file-archive-o' if name.endswith('.zip') else 'fa-file-image-o', name, name, info.size|file_size_units, info.description, - info.license, info.credit) }} + info.license, info.credit, info.deprecated) }} {% endfor %} {% for extra in extras %} {{ row('fa-file-code-o', extra.name, extra.name, diff --git a/demo/_synctiles.py b/demo/_synctiles.py index 4cb5bb4..1a9a7a0 100755 --- a/demo/_synctiles.py +++ b/demo/_synctiles.py @@ -114,6 +114,7 @@ class TestDataSlide(TypedDict): """One openslide-testdata slide from index.json.""" credit: NotRequired[str] + deprecated: NotRequired[bool] description: str format: str license: str @@ -577,6 +578,11 @@ def start_retile( r = requests.get(urljoin(DOWNLOAD_BASE_URL, DOWNLOAD_INDEX)) r.raise_for_status() slides: TestDataIndex = r.json() + slides = { + slide_relpath: slide_info + for slide_relpath, slide_info in slides.items() + if not slide_info.get('deprecated', False) + } # Initialize context for the run context: Context = { diff --git a/docs/newformat/index.md b/docs/newformat/index.md index 9fd8b13..dd54136 100644 --- a/docs/newformat/index.md +++ b/docs/newformat/index.md @@ -16,8 +16,9 @@ Your driver can use the *grid* module to map pixel coordinates to tile addresses: - The `simple` grid is suitable for slide formats that have non-overlapping, - regularly-spaced, equal-sized tiles, and do not need to record individual - information about each tile. (TIFF images often have this property.) + regularly-spaced, equal-sized tiles, possibly sparse, and do not need to + record additional information about each tile. (TIFF images often have + this property.) - The `tilemap` grid is suitable for formats in which each tile is assigned a row and column on a regular grid, but the tiles may be offset from their @@ -139,10 +140,11 @@ Your driver is also responsible for setting some `openslide.background-color` should be set with `_openslide_set_background_color_prop()`. -The `openslide.bounds-*` properties should be set for formats that do not -store image data for every pixel in the level. Drivers that use a single -`tilemap` or `range` grid per level can set these properties with -`_openslide_set_bounds_props_from_grid()`. +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 +`_openslide_set_bounds_props_from_grid()`, which automatically omits the +properties if the bounding box entirely covers level 0. `openslide.mpp-x`, `openslide.mpp-y`, and `openslide.objective-power` should be a copy of, or otherwise derived from, another vendor-specific property. diff --git a/formats/aperio/index.md b/formats/aperio/index.md index 9b39d3b..719fc13 100644 --- a/formats/aperio/index.md +++ b/formats/aperio/index.md @@ -75,9 +75,9 @@ page 14: Some Aperio files use compression type 33003 or 33005. Images using this compression need to be decoded as a JPEG 2000 codestream. For -33003: YCbCr format, possibly with a chroma subsampling of 4:2:2. For -33005: RGB format. Note that the TIFF file may not encode the -colorspace or subsampling parameters in the +33003: YCbCr format with no MCT, possibly with a chroma subsampling of +4:2:2. For 33005: MCT, which OpenJPEG decodes into RGB. Note that the TIFF +file may not encode the colorspace or subsampling parameters in the `PhotometricInterpretation` field, nor the `YCbCrSubsampling` field, even though the TIFF standard seems to require this. The correct subsampling can be found in the JPEG 2000 codestream. diff --git a/formats/dicom/index.md b/formats/dicom/index.md index aef2297..6c552b8 100644 --- a/formats/dicom/index.md +++ b/formats/dicom/index.md @@ -35,15 +35,19 @@ to parse and load DICOM files. OpenSlide non-recursively scans the containing directory for other DICOM files with the same _Series Instance UID_ attribute value as the specified -file. It uses the _Image Type_ attribute of each matching file to determine -the file's role within the whole slide image: +file. It uses the _Image Flavor_ (value 3 of the _Image Type_ attribute) +of each matching file to determine the file's role within the whole slide +image: -| Role | Allowed _Image Type_ values | +| Role | _Image Flavor_ values | | - | - | - | -| Slide level | `ORIGINAL\PRIMARY\VOLUME\NONE`
`DERIVED\PRIMARY\VOLUME\NONE`
`DERIVED\PRIMARY\VOLUME\RESAMPLED` | -| Associated image | `ORIGINAL\PRIMARY\LABEL\NONE`
`ORIGINAL\PRIMARY\OVERVIEW\NONE`
`ORIGINAL\PRIMARY\THUMBNAIL\RESAMPLED`
`DERIVED\PRIMARY\LABEL\NONE`
`DERIVED\PRIMARY\OVERVIEW\NONE`
`DERIVED\PRIMARY\THUMBNAIL\RESAMPLED` | +| Slide level | `VOLUME` | +| Associated image | `LABEL`
`OVERVIEW`
`THUMBNAIL` | | Ignored | All others | +A slide level can be spread across multiple files that share a +_Concatenation UID_. + If multiple files in the directory have the same _SOP Instance UID_, the extra copies are ignored. @@ -55,8 +59,8 @@ supported: | - | - | - | | Uncompressed little-endian | `1.2.840.10008.1.2.1` | `RGB` | | JPEG baseline | `1.2.840.10008.1.2.4.50` | `RGB`
`YBR_FULL_422` | -| JPEG 2000 | `1.2.840.10008.1.2.4.91` | `RGB`
`YBR_ICT` | -| JPEG 2000 lossless | `1.2.840.10008.1.2.4.90` | `RGB`
`YBR_ICT` | +| JPEG 2000 | `1.2.840.10008.1.2.4.91` | `RGB`
`YBR_ICT`
`YBR_RCT` | +| JPEG 2000 (lossless only) | `1.2.840.10008.1.2.4.90` | `RGB`
`YBR_RCT` | ## ICC Profiles @@ -68,11 +72,11 @@ _ICC Profile_ of the associated image. ## Associated Images -| Associated image | Allowed _Image Type_ values | +| Associated image | _Image Flavor_ | | - | - | - | -| `label` | `ORIGINAL\PRIMARY\LABEL\NONE`
`DERIVED\PRIMARY\LABEL\NONE` | -| `macro` | `ORIGINAL\PRIMARY\OVERVIEW\NONE`
`DERIVED\PRIMARY\OVERVIEW\NONE` | -| `thumbnail` | `ORIGINAL\PRIMARY\THUMBNAIL\RESAMPLED`
`DERIVED\PRIMARY\THUMBNAIL\RESAMPLED` | +| `label` | `LABEL` | +| `macro` | `OVERVIEW` | +| `thumbnail` | `THUMBNAIL` | ## Known Properties