Skip to content

Commit

Permalink
Update handling and parsing of acquisition metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
dgault committed Jan 11, 2024
1 parent 4deea8d commit edb04b6
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions 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 @@ -752,14 +753,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 (maximumfieldcount != null) {
if (acqName != null) {
store.setPlateAcquisitionName(acqName, 0, a);
}
if (acqDescription != null) {
store.setPlateAcquisitionDescription(acqDescription, 0, a);
}
if (acqDescription != 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 edb04b6

Please sign in to comment.