if (yd != null && yd.unit().isConvertible(UNITS.MICROMETER)) ycal = yd.value(UNITS.MICROMETER).doubleValue(); Length zd = meta.getPixelsPhysicalSizeZ(series); if (zd != null && zd.unit().isConvertible(UNITS.MICROMETER)) zcal = zd.value(UNITS.MICROMETER).doubleValue();
if (yd != null && yd.unit().isConvertible(UNITS.MICROMETER)) ycal = yd.value(UNITS.MICROMETER).doubleValue(); Length zd = meta.getPixelsPhysicalSizeZ(series); if (zd != null && zd.unit().isConvertible(UNITS.MICROMETER)) zcal = zd.value(UNITS.MICROMETER).doubleValue();
@Test(groups = {"all", "fast", "automated"}) public void testPhysicalSizeZ() { if (config == null) throw new SkipException("No config tree"); String testName = "PhysicalSizeZ"; if (!initFile()) result(testName, false, "initFile"); IMetadata retrieve = (IMetadata) reader.getMetadataStore(); for (int i=0; i<reader.getSeriesCount(); i++) { config.setSeries(i); Length expectedSize = config.getPhysicalSizeZ(); Length realSize = retrieve.getPixelsPhysicalSizeZ(i); if (!isAlmostEqual(realSize,expectedSize)) { result(testName, false, "Series " + i + " (expected " + expectedSize + ", actual " + realSize + ")"); } } result(testName, true); }
dest.setPixelsPhysicalSizeY(physicalSizeY, image); Length physicalSizeZ = src.getPixelsPhysicalSizeZ(image); if (physicalSizeZ != null && physicalSizeZ.value() != null) { physicalSizeZ = FormatTools.getPhysicalSize(physicalSizeZ.value().doubleValue(), physicalSizeZ.unit().getSymbol());
dest.setPixelsPhysicalSizeY(physicalSizeY, image); Length physicalSizeZ = src.getPixelsPhysicalSizeZ(image); if (physicalSizeZ != null && physicalSizeZ.value() != null) { physicalSizeZ = FormatTools.getPhysicalSize(physicalSizeZ.value().doubleValue(), physicalSizeZ.unit().getSymbol());
seriesTable.put(PHYSICAL_SIZE_Y_UNIT, physicalY.unit().getSymbol()); Length physicalZ = retrieve.getPixelsPhysicalSizeZ(index); if (physicalZ != null) { seriesTable.put(PHYSICAL_SIZE_Z, physicalZ.value().toString());