Some time ago one of my problem got solved by using the core streaming mode to acquire images. However, my former colleagues only had use for it recently and realised that the metadata are mostly empty (or non-populated), compared to the
acqManager.runAcquisitionWithSettings type of acquisition.
The reason is that (beyond me forgetting to plug in the metadata at first), I built the metadata as follows:
core.startSequenceAcquisition(frames, interval, true); Metadata.Builder metadata = studio.data().getMetadataBuilder(); [...] TaggedImage tagged = core.popNextTaggedImage(); Image image = studio.data().convertTaggedImage(tagged, coord.build(), metadata.build()); store.putImage(image);
Now, the only ways I figured out how to get a metadata.txt closer to what I would get using
runAcquisitionWithSettings is by doing this very hacky and not pretty thing:
TaggedImage tagged = core.popNextTaggedImage(); // create image without metadata Image imageNoMetadata = studio.data().convertTaggedImage(tagged, coord.build(), null) // generate metadata using the acquisition manager Metadata metadata = acqManager.generateMetadata(imageNoMetadata, true); // convert again the tagged image, this time with metadata Image image = studio.data().convertTaggedImage(tagged, coord.build(), metadata); store.putImage(image);
or simply building the metadata from scratch (example here adapted from
Is there a more elegant way that I missed?
Thanks in advance!