Skip to content

Commit

Permalink
ngff spec 0.2: default to nested storage
Browse files Browse the repository at this point in the history
This also updates the version added to the metadata
based on the nested flag. In the future, this logic
will need to be more sophisticated.

see: ome/ngff#40
  • Loading branch information
joshmoore committed Mar 29, 2021
1 parent 6ce2f8a commit bfcc47d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ This option is not present in 0.3.0 and later, as only Zarr output is supported.

Versions 0.2.6 and prior used the input file's dimension order to determine the output
dimension order, unless `--dimension-order` was specified.
Version 0.3.0 uses the `TCZYX` order by default, for compatibility with https://ngff.openmicroscopy.org/0.1/#image-layout.
Version 0.3.0 uses the `TCZYX` order by default, for compatibility with https://ngff.openmicroscopy.org/0.2/#image-layout.
The `--dimension-order` option can still be used to set a specific output dimension order, e.g.:

bioformats2raw /path/to/file.mrxs /path/to/zarr-pyramid --dimension-order XYCZT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ public class Converter implements Callable<Void> {
description = "Whether to use '/' as the chunk path seprator " +
"(false by default)"
)
private volatile boolean nested = false;
private volatile boolean nested = true;

@Option(
names = "--pyramid-name",
Expand Down Expand Up @@ -1308,7 +1308,7 @@ private void setSeriesLevelMetadata(int series, int resolutions)
multiscale.put("type", downsampling.getName());
}
multiscale.put("metadata", metadata);
multiscale.put("version", "0.1");
multiscale.put("version", nested ? "0.2" : "0.1");
multiscales.add(multiscale);
List<Map<String, String>> datasets = new ArrayList<Map<String, String>>();
for (int r = 0; r < resolutions; r++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ public void testMultiscalesMetadata() throws Exception {
z.getAttributes().get("multiscales");
assertEquals(1, multiscales.size());
Map<String, Object> multiscale = multiscales.get(0);
assertEquals("0.1", multiscale.get("version"));
assertEquals("0.2", multiscale.get("version"));
List<Map<String, Object>> datasets =
(List<Map<String, Object>>) multiscale.get("datasets");
assertTrue(datasets.size() > 0);
Expand Down Expand Up @@ -725,7 +725,7 @@ public void testDownsampleTypes(Downsampling type) throws IOException {
(List<Map<String, Object>>) z.getAttributes().get("multiscales");
assertEquals(1, multiscales.size());
Map<String, Object> multiscale = multiscales.get(0);
assertEquals("0.1", multiscale.get("version"));
assertEquals("0.2", multiscale.get("version"));

Map<String, String> metadata =
(Map<String, String>) multiscale.get("metadata");
Expand Down

0 comments on commit bfcc47d

Please sign in to comment.