You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(wsi): accept Ventana BIF and Hamamatsu NDPI slides - #789
HETA's normalization is adding BIF and NDPI support (aignostics/he-tme#482), but the SDK rejects those files before upload. This PR adds .bif and .ndpi to the supported extensions.
The SDK offers them only for HETA 2.2.0 and later (its release candidates included), based on the version the run targets. Older HETA versions keep the old set, because they would fail the run during processing instead of at submission.
The files go up as application/octet-stream, like .svs, which HETA accepts. CZI is left out because the bundled OpenSlide cannot decode JPEG XR CZIs. Without that, the SDK cannot read their metadata.
Add .bif and .ndpi to WSI_SUPPORTED_FILE_EXTENSIONS so HETA run
preparation reads their metadata with OpenSlide and uploads them as
application/octet-stream, like .svs. CZI stays out: the bundled
OpenSlide cannot decode JPEG XR compressed CZI files.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The inaccessible backend PR leaves required HETA BIF/NDPI deployment compatibility unverified, and a maintainer must also confirm the expansion is eligible under the SDK’s maintenance-only scope.
No open issues 🎉
What changed in this PR
This PR extends the SDK’s whole-slide image allowlist to accept Ventana BIF and Hamamatsu NDPI files, aligning SDK validation and QuPath imports with planned HETA support. Release remains dependent on deployment of the compatible HETA version.
Changes:
Add .bif and .ndpi to the SDK and QuPath supported extensions.
Add regression tests for case-insensitive extension acceptance, continued CZI rejection, and HETA’s extension set.
Update documentation and specifications to reflect the additional formats.
File
Description
tests/aignostics/wsi/service_test.py
Tests BIF/NDPI extension acceptance and CZI rejection.
tests/aignostics/application/utils_test.py
Asserts HETA’s complete supported extension set.
src/aignostics/wsi/CLAUDE.md
Updates the documented WSI allowlist.
src/aignostics/qupath/scripts/add.groovy
Allows BIF and NDPI in QuPath imports.
src/aignostics/constants.py
Adds BIF and NDPI to the shared allowlist.
src/aignostics/CLAUDE.md
Lists the additional OpenSlide formats.
specifications/SPEC-QUPATH-SERVICE.md
Expands documented QuPath input formats.
specifications/SPEC-APPLICATION-SERVICE.md
Updates application format support.
specifications/SPEC_WSI_SERVICE.md
Documents BIF/NDPI support and handler capabilities.
README.md
Adds BIF and NDPI to the platform format overview.
Older HETA versions do not reject BIF or NDPI at submission; the run
fails while processing, and 2.1.1 would even try to process a BIF.
Metadata generation now uses the resolved application version, so HETA
before 2.2.0 keeps the .dcm/.tiff/.tif/.svs set. The submit page lists
the formats of the selected version. Local WSI tooling keeps the full set.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
An optional application ID breaks the configured MyPy check, prepared metadata can bypass format-version compatibility checks, and successful BIF/NDPI metadata extraction lacks test coverage.
Validate prepared rows against the target version before upload and submit
src/aignostics/application/_service.py:373
The version gate only runs during metadata generation. A CSV prepared for HETA 2.2.0 can still be uploaded and submitted with --application-version 2.1.1, allowing BIF/NDPI slides to reach an unsupported processing version. Validate prepared rows against the resolved target version in both application_run_upload and application_run_submit_from_metadata before uploading or submitting them.
Add valid BIF and NDPI metadata extraction integration tests
tests/aignostics/wsi/service_test.py:494
These cases verify extension acceptance using invalid files, but do not verify successful BIF or NDPI metadata extraction. Decoder or metadata incompatibilities could therefore go undetected for the newly supported formats. Add integration cases with valid representative slides and assert the dimensions and resolution required for submission.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Reusing prepared CSV metadata bypasses version compatibility checks during upload and submission, allowing unsupported BIF/NDPI files to reach older application versions and fail during processing.
Enforce version compatibility for uploads and submissions
src/aignostics/application/_service.py:373
The version restriction is only applied while scanning a directory. A CSV prepared for HETA 2.2.0 can still be passed to run upload and run submit --application-version 2.1.1: application_run_upload and application_run_submit_from_metadata never check the supported extensions, so BIF/NDPI files are uploaded and submitted as application/octet-stream to the older version. Please also enforce compatibility against the actual upload/submission target, so reusing prepared metadata cannot bypass the restriction and cause a processing-time failure.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
HETA's normalization is adding BIF and NDPI support (aignostics/he-tme#482), but the SDK rejects those files before upload. This PR adds
.bifand.ndpito the supported extensions.The SDK offers them only for HETA 2.2.0 and later (its release candidates included), based on the version the run targets. Older HETA versions keep the old set, because they would fail the run during processing instead of at submission.
The files go up as
application/octet-stream, like.svs, which HETA accepts. CZI is left out because the bundled OpenSlide cannot decode JPEG XR CZIs. Without that, the SDK cannot read their metadata.🤖 Generated with Claude Code