Skip to content

Commit

Permalink
Merge pull request #52 from melissalinkert/simplify-hierarchy
Browse files Browse the repository at this point in the history
Remove data.zarr from expected hierarchy
  • Loading branch information
chris-allan authored Mar 24, 2021
2 parents c751229 + 7eb833e commit ba224d7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
3 changes: 3 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ repositories {
maven {
url 'https://repo.glencoesoftware.com/repository/n5-zarr-snapshots/'
}
maven {
url 'https://repo.glencoesoftware.com/repository/jzarr-snapshots'
}
maven {
url 'https://maven.scijava.org/content/groups/public'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,6 @@ public class PyramidFromDirectoryWriter implements Callable<Void> {
/** Name of OME-XML metadata file. */
private static final String OMEXML_FILE = "METADATA.ome.xml";

/** Name of root Zarr directory. */
private static final String ZARR = "data.zarr";

private static final Logger LOG =
LoggerFactory.getLogger(PyramidFromDirectoryWriter.class);

Expand Down Expand Up @@ -270,7 +267,7 @@ private Path getOMEXMLFile() {
* @return Path representing the root Zarr directory
*/
private Path getZarr() {
return inputDirectory.resolve(ZARR);
return inputDirectory;
}

/**
Expand Down Expand Up @@ -486,8 +483,7 @@ private PixelType getPixelType(DataType type) {
}

private ZarrGroup getZarrGroup(String path) throws IOException {
return ZarrGroup.open(
inputDirectory.resolve("data.zarr/" + path).toString());
return ZarrGroup.open(inputDirectory.resolve(path).toString());
}

private int getSubgroupCount(String path) throws IOException {
Expand Down Expand Up @@ -1136,7 +1132,7 @@ private void writeIFD(

/**
* Create a reader for the chosen input directory.
* If the input directory contains "data.zarr", a Zarr reader is used.
* If the input directory contains a Zarr group, a Zarr reader is used.
* If an appropriate reader cannot be found, the reader will remain null.
*/
private void createReader() throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,8 @@ void assertBioFormats2Raw(String...additionalArgs) throws IOException {
try {
converter = new Converter();
CommandLine.call(converter, args.toArray(new String[]{}));
Path zarr = output.resolve("data.zarr");
Assert.assertTrue(Files.exists(zarr));
Assert.assertTrue(Files.exists(zarr.resolve("METADATA.ome.xml")));
Assert.assertTrue(Files.exists(output.resolve(".zattrs")));
Assert.assertTrue(Files.exists(output.resolve("METADATA.ome.xml")));
}
catch (RuntimeException rt) {
throw rt;
Expand Down

0 comments on commit ba224d7

Please sign in to comment.