Java:
ImageReader reader = new ImageReader();
IMetadata omeMetadata = MetadataTools.createOMEXMLMetadata();
reader.setMetadataStore(omeMetadata);
reader.setId("/PATH/TO/FILE");
for (int plane = 0; plane < reader.getImageCount(); plane++) {
byte[] image = reader.openBytes(plane);
Number timestamp = omeMetadata.getPlaneDeltaT(0, plane).value();
}
ImageJ macro:
run("Bio-Formats Macro Extensions");
Ext.setId("/PATH/TO/FILE");
Ext.getImageCount(imageCount);
timestamps = newArray(imageCount);
for (plane=0; plane < imageCount; plane++) {
Ext.openImage("image #" + plane, plane);
Ext.getPlaneTimingDeltaT(timestamps[plane], plane);
}
MATLAB:
r = bfGetReader("/PATH/TO/FILE");
imageCount = r.getImageCount();
omeMetadata = r.getMetadataStore();
for plane = 1:imageCount
image = bfGetPlane(r, plane, varargin{:});
timestamp = omeMetadata.getPlaneDeltaT(0, plane - 1).value().doubleValue();
end
Python:
reader = bioformats.get_image_reader(None, path="/PATH/TO/FILE")
imageCount = reader.rdr.getImageCount()
omeMetadata = javabridge.JWrapper(reader.rdr.getMetadataStore())
for plane in range(0, imageCount):
image = reader.read(series=0, index=plane, rescale=False)
timestamp = omeMetadata.getPlaneDeltaT(0, plane)
R:
reader = .jnew("loci.formats.ImageReader")
.jcall(reader, , "setId", file)
omeMetadata = .jcall(reader, "", "getMetadataStore")
image = .jcall(reader, "[B", "openBytes", 0)
timestamp = .jcall(omeMetadata, "", "getPlaneDeltaT", 0, 0)
IFormatReader reader = new Memoizer(new ImageReader());
reader.setId("/PATH/TO/FILE");
IFormatReader reader = new FileStitcher();
// reads 001.tiff, 002.tiff, ..., 010.tiff together
reader.setId("0< 01-10>.tiff");
IFormatReader grayscaleImageReader = new ChannelSeparator();
IFormatReader rgbImageReader = new ChannelMerger();
IFormatReader reader = new Memoizer(new FileStitcher(new ChannelSeparator()));
See the Bio-Formats version history
See the Bio-Formats version history
Breaking changes