From 82ac198fd3c5cc80f6ada1bdb03509fa0294ebb7 Mon Sep 17 00:00:00 2001 From: David Gault Date: Wed, 4 Oct 2023 14:50:47 +0100 Subject: [PATCH] Revert "Remove unused listPixels option" This reverts commit 0f3fcdda1cd046f5bfa5311baa8e899e5e7a87b3. --- src/loci/formats/in/ZarrReader.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/loci/formats/in/ZarrReader.java b/src/loci/formats/in/ZarrReader.java index 9d3c733..c77d582 100644 --- a/src/loci/formats/in/ZarrReader.java +++ b/src/loci/formats/in/ZarrReader.java @@ -44,6 +44,7 @@ import java.util.Hashtable; import java.util.List; import java.util.Map; +import java.util.Set; import java.util.stream.Stream; import javax.xml.parsers.ParserConfigurationException; @@ -91,6 +92,8 @@ public class ZarrReader extends FormatReader { public static final boolean QUICK_READ_DEFAULT = true; public static final String SAVE_ANNOTATIONS_KEY = "zarrreader.save_annotations"; public static final boolean SAVE_ANNOTATIONS_DEFAULT = false; + public static final String LIST_PIXELS_KEY = "omezarr.list_pixels"; + public static final boolean LIST_PIXELS_DEFAULT = false; protected transient ZarrService zarrService; private ArrayList arrayPaths = new ArrayList(); private ArrayList groupKeys = new ArrayList(); @@ -1111,7 +1114,7 @@ public String[] getDomains() { protected ArrayList getAvailableOptions() { ArrayList optionsList = super.getAvailableOptions(); optionsList.add(SAVE_ANNOTATIONS_KEY); - optionsList.add(QUICK_READ_KEY); + optionsList.add(LIST_PIXELS_KEY); return optionsList; } @@ -1124,6 +1127,15 @@ public boolean saveAnnotations() { return SAVE_ANNOTATIONS_DEFAULT; } + public boolean listPixels() { + MetadataOptions options = getMetadataOptions(); + if (options instanceof DynamicMetadataOptions) { + return ((DynamicMetadataOptions) options).getBoolean( + LIST_PIXELS_KEY, LIST_PIXELS_DEFAULT); + } + return LIST_PIXELS_DEFAULT; + } + public boolean quickRead() { MetadataOptions options = getMetadataOptions(); if (options instanceof DynamicMetadataOptions) {