SCientific Image Format Input & Output: a flexible, extensible framework for image I/O. *EXPERIMENTAL* All API is subject to change, so depend at your own risk! See also @openmicroscopy/bioformats.
CalibratedAxis
is what I used to extract scales from other formats such as SDT. The ICS in question does have a parameter scale
tag with 3 1.000000
s, which are currently (supposedly) interpreted as the physical separation between pixels/layers. Though they are not because of a potential bug in the line reading stage, which causes this key not to be recognized and the default value of all 1.0's are used. I can supply more details if you are interested.
parameter scale
is meant to be the default place to define the physical sizes in the original paper, page 9, I see Bio-Formats uses history extent
(overall dimensions of the dataset) to infer the physical pixel sizes if parameter scale
is not present.
if (scales != null) {
// ...
for (int i = 0; i < scales.length; i++) {
Double scale = scales[i];
// ...
if (axis.equals("x")) {
if (checkUnit(unit, "um", "microns", "micrometers")) {
Length x = FormatTools.getPhysicalSizeX(scale);
if (x != null) {
store.setPixelsPhysicalSizeX(x, 0);
}
}
}
// process y and z axis in the same way
// ...
else if (axis.equals("t") && scale != null) {
if (checkUnit(unit, "ms")) {
store.setPixelsTimeIncrement(new Time(scale, UNITS.MILLISECOND), 0);
} else if (checkUnit(unit, "seconds") || checkUnit(unit, "s")) {
store.setPixelsTimeIncrement(new Time(scale, UNITS.SECOND), 0);
}
}
}
} else if (sizes != null) {
if (sizes.length > 0) {
Length x = FormatTools.getPhysicalSizeX(sizes[0]);
if (x != null) {
store.setPixelsPhysicalSizeX(x, 0);
}
}
if (sizes.length > 1) {
// process y axis
}
}
from here, where scales
are parsed from parameter scale
and sizes
are parsed from history extents
.
ICSFormat
, do you think we should use history extents
and parameter scale
interchangeably?
1
and unit undefined
for each axis and puts calibration in history extents
, which has no units attached. BioFormats and the current SCIFIO assumes the default units (seconds, um, etc.) in this case.
String
and File
-based methods in FilePatternService
that were present in 0.37.3 but got lost when SCIFIO was changing to DataHandle
with https://github.com/scifio/scifio/commit/5c11f00f519fd73ea09be6724e8543a73028d745#diff-09fdb44bddc5a27ef1f3c369ea067e9d ?
imagej-server
code compatible to pom-scijava 29
and need some advice. It's e.g. calling locationService.mapFile
here from io.scif.services.LocationService
which does not exist any more. It maps files to e.g. ByteArrayHandle
, another gone class. There does not seem to be a similar feature available in org.scijava.io.location.LocationService
so I was wondering where that went / how it could be addressed.
LocationService
knows how to resolve strings to Location
objects using LocationResolver
plugins. The DataHandleService
knows how to wrap Location
objects in DataHandle
s. (In case it wasn't already clear: a location is just an indicator of data source/destination, whereas a data handle knows how to do random/direct access byte extraction from a location.)
Location
you want, and then open it (for reading or writing) with the DataHandleService
.
BytesLocation
. No need for mapFile
or mapId
or any of that hacky stuff.
scifio
served by the latest update is lacking the FormatService.getFormat(String)
method in favor of the DataHandle
-based methods. I didn't notice so far, but have a script using that method. I can update my script of course, but I guess we should also bring back that method signature (deprecated) for backwards compatibility, no?
images
folder. The data itself is served from samples.scif.io
which is not hosted on GitHub Pages, because some of the samples are too large for GitHub. I can put the image in place in response to your PR. Coincidentally, I'm working on the SCIFIO samples page today anyway, adding some FLIM image data. I will also look into adding a "License" column to clarify the license of each image, since it will no longer be CC0/PD for everything anymore.
imagej-server
- with the new Location API, how does one handle an InputStream
? I can't figure out a way to wrap it with a Location
, which I would need to call datasetIOService.open(..)
. Differently formulated - how to use SCIFIO to open an image from an InputStream
?
imagej-server
using IOService
(that only forwards to DatasetIOService
in case of images)?