Skip to content

Commit

Permalink
Also store NGFF_VERSION in plate metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
sbesson authored and melissalinkert committed May 17, 2022
1 parent 33d461b commit ba198b9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1523,6 +1523,7 @@ private void saveHCSMetadata(IMetadata meta) throws IOException {
plateMap.put("rows", rows);

plateMap.put("field_count", maxField + 1);
plateMap.put("version", NGFF_VERSION);

Map<String, Object> attributes = root.getAttributes();
attributes.put("plate", plateMap);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -956,6 +956,7 @@ public void testHCSMetadata() throws Exception {
Map<String, Object> plate =
(Map<String, Object>) z.getAttributes().get("plate");
assertEquals(fieldCount, ((Number) plate.get("field_count")).intValue());
assertEquals("0.4", plate.get("version"));

List<Map<String, Object>> acquisitions =
(List<Map<String, Object>>) plate.get("acquisitions");
Expand Down Expand Up @@ -1028,6 +1029,7 @@ public void testHCSMetadataNoAcquisitions() throws Exception {
Map<String, Object> plate =
(Map<String, Object>) z.getAttributes().get("plate");
assertEquals(fieldCount, ((Number) plate.get("field_count")).intValue());
assertEquals("0.4", plate.get("version"));

List<Map<String, Object>> rows =
(List<Map<String, Object>>) plate.get("rows");
Expand Down Expand Up @@ -1106,6 +1108,7 @@ public void testSingleWell() throws IOException {
Map<String, Object> plate =
(Map<String, Object>) z.getAttributes().get("plate");
assertEquals(fieldCount, ((Number) plate.get("field_count")).intValue());
assertEquals("0.4", plate.get("version"));

List<Map<String, Object>> acquisitions =
(List<Map<String, Object>>) plate.get("acquisitions");
Expand Down Expand Up @@ -1168,6 +1171,7 @@ public void testTwoWells(String resourceName) throws IOException {
Map<String, Object> plate =
(Map<String, Object>) z.getAttributes().get("plate");
assertEquals(fieldCount, ((Number) plate.get("field_count")).intValue());
assertEquals("0.4", plate.get("version"));

List<Map<String, Object>> acquisitions =
(List<Map<String, Object>>) plate.get("acquisitions");
Expand Down Expand Up @@ -1228,6 +1232,7 @@ public void testOnePlateRow() throws IOException {
Map<String, Object> plate =
(Map<String, Object>) z.getAttributes().get("plate");
assertEquals(fieldCount, ((Number) plate.get("field_count")).intValue());
assertEquals("0.4", plate.get("version"));

List<Map<String, Object>> acquisitions =
(List<Map<String, Object>>) plate.get("acquisitions");
Expand Down Expand Up @@ -1283,6 +1288,7 @@ public void testSingleWellTwoAcquisitions() throws IOException {
Map<String, Object> plate =
(Map<String, Object>) z.getAttributes().get("plate");
assertEquals(fieldCount, ((Number) plate.get("field_count")).intValue());
assertEquals("0.4", plate.get("version"));

List<Map<String, Object>> acquisitions =
(List<Map<String, Object>>) plate.get("acquisitions");
Expand Down

0 comments on commit ba198b9

Please sign in to comment.