Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
import dev.zarr.zarrjava.ZarrException;
import dev.zarr.zarrjava.core.Node;
import dev.zarr.zarrjava.experimental.ome.metadata.MultiscalesEntry;
import dev.zarr.zarrjava.experimental.ome.metadata.OmeroMetadata;
import dev.zarr.zarrjava.store.StoreHandle;
import dev.zarr.zarrjava.utils.Utils;

import javax.annotation.Nullable;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
Expand Down Expand Up @@ -37,6 +39,18 @@ public interface MultiscaleImage {
*/
int getScaleLevelCount() throws ZarrException;

/**
* Returns the OmeroMetadata if present, or null if not.
*/
@Nullable
OmeroMetadata getOmeroMetadata();

/**
* Returns the bioformats2raw.layout property if present, or null if not
*/
@Nullable
Integer getBioformats2rawLayout();

/**
* Returns the axis names of the first multiscale entry.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public final class MultiscaleImage extends OmeV2Group implements MultiscalesMeta
@Nullable
private OmeroMetadata omeroMetadata;
@Nullable
private Integer bioformats2rawLayout;
private final Integer bioformats2rawLayout;

private MultiscaleImage(
@Nonnull StoreHandle storeHandle,
Expand Down Expand Up @@ -83,6 +83,7 @@ public dev.zarr.zarrjava.store.StoreHandle getStoreHandle() {
return this.storeHandle;
}

@Override
@Nullable
public OmeroMetadata getOmeroMetadata() {
return omeroMetadata;
Expand All @@ -93,6 +94,7 @@ public void setOmeroMetadata(@Nullable OmeroMetadata omeroMetadata) throws IOExc
persistAttributes();
}

@Override
@Nullable
public Integer getBioformats2rawLayout() {
return bioformats2rawLayout;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import dev.zarr.zarrjava.v3.GroupMetadata;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.io.IOException;
import java.util.Collections;
import java.util.List;
Expand Down Expand Up @@ -68,12 +69,14 @@ public MultiscalesEntry getMultiscalesEntry(int i) throws ZarrException {
return omeMetadata.multiscales.get(i);
}

@javax.annotation.Nullable
@Override
@Nullable
public dev.zarr.zarrjava.experimental.ome.metadata.OmeroMetadata getOmeroMetadata() {
return omeMetadata.omero;
}

@javax.annotation.Nullable
@Override
@Nullable
public Integer getBioformats2rawLayout() {
return omeMetadata.bioformats2rawLayout;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import dev.zarr.zarrjava.v3.GroupMetadata;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
Expand Down Expand Up @@ -85,12 +86,14 @@ public MultiscalesEntry getMultiscalesEntry(int i) throws ZarrException {
return omeMetadata.multiscales.get(i);
}

@javax.annotation.Nullable
@Override
@Nullable
public dev.zarr.zarrjava.experimental.ome.metadata.OmeroMetadata getOmeroMetadata() {
return omeMetadata.omero;
}

@javax.annotation.Nullable
@Override
@Nullable
public Integer getBioformats2rawLayout() {
return omeMetadata.bioformats2rawLayout;
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/dev/zarr/zarrjava/v3/GroupMetadata.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public final class GroupMetadata extends dev.zarr.zarrjava.core.GroupMetadata {
@JsonProperty("node_type")
public final String nodeType = "group";
@JsonProperty("consolidated_metadata")
public final String consolidatedMetadata = null;
public final Object consolidatedMetadata = null;

@Nullable
public final Attributes attributes;
Expand Down
Loading