From 3dadf3bde6698a07fc2c960fca950e3a261a39ae Mon Sep 17 00:00:00 2001 From: David Manthey Date: Fri, 10 Sep 2021 15:50:24 -0400 Subject: [PATCH] Have bioformats ignore ndpi files. --- docs/source/config_options.rst | 4 ++-- sources/bioformats/large_image_source_bioformats/__init__.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/source/config_options.rst b/docs/source/config_options.rst index 344463f08..1e41193a6 100644 --- a/docs/source/config_options.rst +++ b/docs/source/config_options.rst @@ -25,7 +25,7 @@ Configuration parameters: - ``max_small_image_size``: The PIL tilesource is used for small images if they are no more than this many pixels along their maximum dimension. -- ``source_bioformats_ignored_extensions``: The bioformats tilesource can read some files that are better read by other tilesources or ignored. Since reading these files is suboptimal, by default files with particular extensions are ignored by the bioformats tilesource. This defaults to ``.jpg,.jpeg,.jpe,.png,.tif,.tiff``. +- ``source_bioformats_ignored_extensions``: The bioformats tilesource can read some files that are better read by other tilesources or ignored. Since reading these files is suboptimal, by default files with particular extensions are ignored by the bioformats tilesource. This defaults to ``.jpg,.jpeg,.jpe,.png,.tif,.tiff,.ndpi``. Configuration from Python @@ -60,7 +60,7 @@ For the Girder plugin, these can also be set in the ``girder.cfg`` file in a ``l max_small_image_size = 4096 # The bioformats tilesource won't read files that end in a comma-separated # list of extensions - source_bioformats_ignored_extensions = '.jpg,.jpeg,.jpe,.png,.tif,.tiff' + source_bioformats_ignored_extensions = '.jpg,.jpeg,.jpe,.png,.tif,.tiff,.ndpi' Logging from Python ------------------- diff --git a/sources/bioformats/large_image_source_bioformats/__init__.py b/sources/bioformats/large_image_source_bioformats/__init__.py index 46bf78277..4f99a2423 100644 --- a/sources/bioformats/large_image_source_bioformats/__init__.py +++ b/sources/bioformats/large_image_source_bioformats/__init__.py @@ -52,7 +52,8 @@ _openImages = [] -config.ConfigValues['source_bioformats_ignored_extensions'] = '.jpg,.jpeg,.jpe,.png,.tif,.tiff' +config.ConfigValues['source_bioformats_ignored_extensions'] = \ + '.jpg,.jpeg,.jpe,.png,.tif,.tiff,.ndpi' def _monitor_thread():