Skip to content

Commit

Permalink
Merge pull request #142 from henrypinkard/main
Browse files Browse the repository at this point in the history
add method for reading metadata without reading image
  • Loading branch information
henrypinkard committed Nov 17, 2023
2 parents 4e893ad + ffbcb67 commit 18fc782
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.micro-manager.ndtiffstorage</groupId>
<artifactId>NDTiffStorage</artifactId>
<version>2.15.3</version>
<version>2.16.0</version>
<packaging>jar</packaging>
<name>NDTiff Storage file format</name>
<description>Java-based writer and reader used for NDTiffStorage format</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ public TaggedImage getImage(HashMap<String, Object> axes) {
return new TaggedImage(images_.get(axes), metadata_.get(axes));
}

@Override
public JSONObject getImageMetadata(HashMap<String, Object> axes) {
return metadata_.get(axes);
}

@Override
public TaggedImage getSubImage(HashMap<String, Object> axes, int xOffset, int yOffset, int width,
int height) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,14 @@ public Future<IndexEntryData> putImage(Object pixels, JSONObject metadata, HashM
*/
public TaggedImage getImage(HashMap<String, Object> axes);

/**
* Get the metadata for a single image
*
* @param axes
* @return
*/
public JSONObject getImageMetadata(HashMap<String, Object> axes);

/**
* Get a sub-image of the image with the specified axes
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -943,6 +943,14 @@ public TaggedImage getImage(HashMap<String, Object> axes) {
return getImage(axes, 0);
}

@Override
public JSONObject getImageMetadata(HashMap<String, Object> axes) {
if (fullResStorage_ == null) {
return null;
}
return fullResStorage_.getImageTags(IndexEntryData.serializeAxes(axes));
}

@Override
public TaggedImage getSubImage(HashMap<String, Object> axes, int xOffset, int yOffset, int width,
int height) {
Expand Down

0 comments on commit 18fc782

Please sign in to comment.