Skip to content

Commit

Permalink
Force ZarrReader to read bfoptions file
Browse files Browse the repository at this point in the history
  • Loading branch information
dgault committed Oct 30, 2023
1 parent f51ae44 commit a7ec0c4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/loci/formats/in/ZarrReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ protected void initFile(String id) throws FormatException, IOException {
String canonicalPath = new Location(zarrRootPath).getCanonicalPath();

initializeZarrService(canonicalPath);
reloadOptionsFile(zarrRootPath+".bfoptions");

ArrayList<String> omeSeriesOrder = new ArrayList<String>();
if(omeMetaFile.exists()) {
Expand Down Expand Up @@ -1094,6 +1095,7 @@ public String[] getUsedFiles(boolean noPixels) {
FormatTools.assertId(currentId, true, 1);
String zarrRootPath = currentId.substring(0, currentId.indexOf(".zarr") + 5);
ArrayList<String> usedFiles = new ArrayList<String>();
reloadOptionsFile(zarrRootPath+".bfoptions");

boolean skipPixels = noPixels || !listPixels() || !systemEnvListPixels();
boolean includeLabels = includeLabels();
Expand Down Expand Up @@ -1181,6 +1183,7 @@ private boolean systemEnvListPixels() {
private void reloadOptionsFile(String id) {
String optionsFile = DynamicMetadataOptions.getMetadataOptionsFile(id);
if (optionsFile != null) {
LOGGER.error("ZarrReader loaded options file from: {}", id);
MetadataOptions options = getMetadataOptions();
if (options != null && options instanceof DynamicMetadataOptions) {
try {
Expand Down

0 comments on commit a7ec0c4

Please sign in to comment.