Skip to content

Commit

Permalink
Newer openslide and vips libraries read dicom.
Browse files Browse the repository at this point in the history
  • Loading branch information
manthey committed Jun 29, 2023
1 parent 8c2f5c6 commit 232f658
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion large_image/tilesource/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ def isGeospatial(path):
"""
if not len(AvailableTileSources):
loadTileSources()
for source in AvailableTileSources.values():
for sourceName in sorted(AvailableTileSources):
source = AvailableTileSources[sourceName]
if hasattr(source, 'isGeospatial'):
result = None
try:
Expand Down
1 change: 1 addition & 0 deletions sources/dicom/large_image_source_dicom/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ class DICOMFileTileSource(FileTileSource, metaclass=LruCacheMetaclass):
}
nameMatches = {
r'DCM_\d+$': SourcePriority.MEDIUM,
r'\d+(\.\d+){3,20}$': SourcePriority.MEDIUM,
}

_minTileSize = 64
Expand Down
4 changes: 2 additions & 2 deletions test/test_source_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
'ometiff': {'read': r'\.(ome\.tif.*)$'},
'openjpeg': {'read': r'\.(jp2)$'},
'openslide': {
'read': r'\.(ptif|svs|tif.*|qptiff)$',
'read': r'\.(ptif|svs|tif.*|qptiff|dcm)$',
'noread': r'(oahu|DDX58_AXL|huron\.image2_jpeg2k|landcover_sample|d042-353\.crop|US_Geo\.|extraoverview|imagej)', # noqa
'skipTiles': r'one_layer_missing',
},
Expand Down Expand Up @@ -87,7 +87,7 @@
},
'vips': {
'read': r'',
'noread': r'\.(nc|nd2|yml|yaml|json|czi|png|svs|scn|dcm)$',
'noread': r'\.(nc|nd2|yml|yaml|json|czi|png|svs|scn)$',
'skipTiles': r'(sample_image\.ptif|one_layer_missing_tiles|JK-kidney_B-gal_H3_4C_1-500sec\.jp2|extraoverview)' # noqa
},
}
Expand Down

0 comments on commit 232f658

Please sign in to comment.