Skip to content

Commit

Permalink
Merge pull request #1473 from girder/ndpi-test-file
Browse files Browse the repository at this point in the history
Add a synthetic ndpi test file
  • Loading branch information
manthey authored Mar 8, 2024
2 parents 8730233 + 8037060 commit dad17a8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions test/datastore.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@
'd4db7ae6-1344-467e-8380-4ce13cc3f59e.dcm': 'sha512:48cb562b94d0daf4060abd9eef150c851d3509d9abbff4bea11d00832955720bf1941073a51e6fb68fb5cc23704dec2659fc0c02360a8ac753dc523dca2c8c36', # noqa
'18f6378f-433c-42bf-9373-1ff9c808c118.dcm': 'sha512:36432183380eb7d44417a2210a19d550527abd1181255e19ed5c1d17695d8bb8ca42f5b426a63fa73b84e0e17b770401a377ae0c705d0ed7fdf30d571ef60e2d', # noqa
'a131592c-a069-4aa7-8031-398654aa8a3d.dcm': 'sha512:99bd3da4b8e11ce7b4f7ed8a294ed0c37437320667a06c40c383f4b29be85fe8e6094043e0600bee0ba879f2401de4c57285800a4a23da2caf2eb94e5b847ee0', # noqa
# Synthetic newer ndpi with binary data and nonblank image labelled as RGB
'synthetic_ndpi_2024.ndpi': 'sha512:192cdcf551a824277ef70358b8ed6225dca0c5b5d0817fe0d800b72638e0ad9416cd5bc40cb186219da60fd324b676d1b32cc05a276a33b71b485d665a31e42e', # noqa
}


Expand Down
12 changes: 6 additions & 6 deletions test/test_source_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# a download order.
SourceAndFiles = {
'bioformats': {
'read': r'(\.(czi|jp2|svs|scn|dcm|qptiff)|[0-9a-f].*\.dcm)$',
'read': r'(\.(czi|jp2|svs|scn|dcm|qptiff|ndppi)|[0-9a-f].*\.dcm)$',
'noread': r'JK-kidney_B',
'skip': r'TCGA-AA-A02O.*\.svs',
# We need to modify the bioformats reader similar to tiff's
Expand All @@ -36,13 +36,13 @@
},
'dummy': {'any': True, 'skipTiles': r''},
'gdal': {
'read': r'(\.(jpg|jpeg|jp2|ptif|scn|svs|tif.*|qptiff)|18[-0-9a-f]{34}\.dcm)$',
'read': r'(\.(jpg|jpeg|jp2|ptif|scn|svs|ndpi|tif.*|qptiff)|18[-0-9a-f]{34}\.dcm)$',
'noread': r'(huron\.image2_jpeg2k|sample_jp2k_33003|TCGA-DU-6399|\.(ome.tiff|nc)$)',
'skip': r'nokeyframe\.ome\.tiff$',
'skipTiles': r'\.*nc$',
},
'mapnik': {
'read': r'(\.(jpg|jpeg|jp2|ptif|nc|scn|svs|tif.*|qptiff)|18[-0-9a-f]{34}\.dcm)$',
'read': r'(\.(jpg|jpeg|jp2|ptif|nc|scn|svs|ndpi|tif.*|qptiff)|18[-0-9a-f]{34}\.dcm)$',
'noread': r'(huron\.image2_jpeg2k|sample_jp2k_33003|TCGA-DU-6399|\.(ome.tiff)$)',
'skip': r'nokeyframe\.ome\.tiff$',
# we should only test this with a projection
Expand All @@ -61,7 +61,7 @@
},
'openjpeg': {'read': r'\.(jp2)$'},
'openslide': {
'read': r'\.(ptif|svs|tif.*|qptiff|dcm)$',
'read': r'\.(ptif|svs|ndpi|tif.*|qptiff|dcm)$',
'noread': r'(oahu|DDX58_AXL|huron\.image2_jpeg2k|landcover_sample|d042-353\.crop|US_Geo\.|extraoverview|imagej|bad_axes)', # noqa
'skip': r'nokeyframe\.ome\.tiff$',
'skipTiles': r'one_layer_missing',
Expand All @@ -71,7 +71,7 @@
'noread': r'(G10-3|JK-kidney|d042-353.*tif|huron|one_layer_missing|US_Geo|extraoverview)', # noqa
},
'rasterio': {
'read': r'(\.(jpg|jpeg|jp2|ptif|scn|svs|tif.*|qptiff)|18[-0-9a-f]{34}\.dcm)$',
'read': r'(\.(jpg|jpeg|jp2|ptif|scn|svs|ndpi|tif.*|qptiff)|18[-0-9a-f]{34}\.dcm)$',
'noread': r'(huron\.image2_jpeg2k|sample_jp2k_33003|TCGA-DU-6399|\.(ome.tiff|nc)$)',
'skip': r'nokeyframe\.ome\.tiff$',
},
Expand All @@ -84,7 +84,7 @@
'skipTiles': r'(sample_image\.ptif|one_layer_missing_tiles)'},
'tifffile': {
'read': r'',
'noread': r'((\.(nc|nd2|yml|yaml|json|czi|png|jpg|jpeg|jp2|zarr\.db|zarr\.zip)|(nokeyframe\.ome\.tiff|XY01\.ome\.tif|level.*\.dcm)$)' + # noqa
'noread': r'((\.(nc|nd2|yml|yaml|json|czi|png|jpg|jpeg|jp2|ndpi|zarr\.db|zarr\.zip)|(nokeyframe\.ome\.tiff|XY01\.ome\.tif|level.*\.dcm)$)' + # noqa
(r'|bad_axes' if sys.version_info < (3, 9) else '') +
r')',
},
Expand Down

0 comments on commit dad17a8

Please sign in to comment.