Skip to content

Commit

Permalink
Merge pull request #75 from dgault/acquisition-parsing
Browse files Browse the repository at this point in the history
Update handling and parsing of acquisition metadata
  • Loading branch information
dgault committed Jun 7, 2024
2 parents 750b7ce + e29d069 commit cc97439
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/loci/formats/in/ZarrReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
import ome.xml.model.StructuredAnnotations;
import ome.xml.model.primitives.NonNegativeInteger;
import ome.xml.model.primitives.PositiveInteger;
import ome.xml.model.primitives.Timestamp;
import loci.formats.services.OMEXMLService;
import loci.formats.services.ZarrService;

Expand Down Expand Up @@ -759,14 +760,28 @@ private void parsePlate(Map<String, Object> attr, String root, String key, Metad
Map<String, Object> acquistion = (Map<String, Object>) acquisitions.get(a);
Integer acqId = (Integer) acquistion.get("id");
String acqName = (String) acquistion.get("name");
String acqStartTime = (String) acquistion.get("starttime");
String acqDescription = (String) acquistion.get("description");
Integer acqStartTime = (Integer) acquistion.get("starttime");
Integer acqEndTime = (Integer) acquistion.get("endtime");
Integer maximumfieldcount = (Integer) acquistion.get("maximumfieldcount");
acqIdsIndexMap.put(acqId, a);
store.setPlateAcquisitionID(
MetadataTools.createLSID("PlateAcquisition", 0, acqId), 0, a);
if (acqName != null) {
store.setPlateAcquisitionName(acqName, 0, a);
}
if (acqDescription != null) {
store.setPlateAcquisitionDescription(acqDescription, 0, a);
}
if (maximumfieldcount != null) {
store.setPlateAcquisitionMaximumFieldCount(new PositiveInteger(maximumfieldcount), 0, a);
}
if (acqStartTime != null) {
store.setPlateAcquisitionStartTime(new Timestamp(acqStartTime.toString()), 0, a);
}
if (acqEndTime != null) {
store.setPlateAcquisitionEndTime(new Timestamp(acqEndTime.toString()), 0, a);
}
}
}

Expand Down

0 comments on commit cc97439

Please sign in to comment.