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.
A.ics
trying to find out where the other exception with that is coming from
io.scif.TypedReader
, there are various openPlane
and readPlane
methods
history extents
metadata. Dasong may need some pointers on how best to update the ICSFormat
of SCIFIO to handle this properly.
@ctrueden Thanks Curtis. @hinerm Hi Mark, in Paul Barber's ICS file, he specifies the axis information by putting e.g. a history Labels t x y
and a history Extents 1.000000e-08 128 128
entry to denote the dimensions of each axis. This information doesn't seem to be recognized by SCIFIO. My current workaround to find the time axis dimension is:
// while parsing ics ImgPlus in FLIMJ
PlaneSeparatorMetadata scifioGlobalProperty = (PlaneSeparatorMetadata) imp.getProperties().get("scifio.metadata.global");
String[] extVals = ((String) scifioGlobalProperty.getTable().get("history extents")).split("\\s+");
// find the decimal string that corresponds to "t" in "history labels"
Can you give me some instructions as to how I can add to SCIFIO's ICS parser to handle this?
ICSFormat
does parse history extents
to some extent (*ba dum ching*).
getPhysicalPixelSizes()
method at all.
getPhysicalPixelSizes()
, no?
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.