Skip to content

Commit

Permalink
Revert "Remove unused listPixels option"
Browse files Browse the repository at this point in the history
This reverts commit 0f3fcdd.
  • Loading branch information
dgault committed Oct 4, 2023
1 parent f2a2fb3 commit 82ac198
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/loci/formats/in/ZarrReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<String> arrayPaths = new ArrayList<String>();
private ArrayList<String> groupKeys = new ArrayList<String>();
Expand Down Expand Up @@ -1111,7 +1114,7 @@ public String[] getDomains() {
protected ArrayList<String> getAvailableOptions() {
ArrayList<String> optionsList = super.getAvailableOptions();
optionsList.add(SAVE_ANNOTATIONS_KEY);
optionsList.add(QUICK_READ_KEY);
optionsList.add(LIST_PIXELS_KEY);
return optionsList;
}

Expand All @@ -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) {
Expand Down

0 comments on commit 82ac198

Please sign in to comment.