public static Length getEmissionWavelength(Double value) { if (value != null && value - Constants.EPSILON > 0 && value < Double.POSITIVE_INFINITY) { return createLength(new PositiveFloat(value), UNITS.NANOMETER); } LOGGER.debug("Expected positive value for EmissionWavelength; got {}", value); return null; }
public static Length getExcitationWavelength(Double value) { if (value != null && value - Constants.EPSILON > 0 && value < Double.POSITIVE_INFINITY) { return createLength(new PositiveFloat(value), UNITS.NANOMETER); } LOGGER.debug("Expected positive value for ExcitationWavelength; got {}", value); return null; }
public static Length getExcitationWavelength(Double value) { if (value != null && value - Constants.EPSILON > 0 && value < Double.POSITIVE_INFINITY) { return createLength(new PositiveFloat(value), UNITS.NANOMETER); } LOGGER.debug("Expected positive value for ExcitationWavelength; got {}", value); return null; }
public static Length getEmissionWavelength(Double value) { if (value != null && value - Constants.EPSILON > 0 && value < Double.POSITIVE_INFINITY) { return createLength(new PositiveFloat(value), UNITS.NANOMETER); } LOGGER.debug("Expected positive value for EmissionWavelength; got {}", value); return null; }
store.setPixelsPhysicalSizeX(FormatTools.createLength(size, UNITS.MICROMETER), series); store.setPixelsPhysicalSizeY(FormatTools.createLength(size, UNITS.MICROMETER), series); zStep = FormatTools.createLength(size, UNITS.MICROMETER); for (int series=0; series<getSeriesCount(); series++) { store.setPixelsPhysicalSizeZ(zStep, series);
store.setPixelsPhysicalSizeX(FormatTools.createLength(size, UNITS.MICROMETER), series); store.setPixelsPhysicalSizeY(FormatTools.createLength(size, UNITS.MICROMETER), series); zStep = FormatTools.createLength(size, UNITS.MICROMETER); for (int series=0; series<getSeriesCount(); series++) { store.setPixelsPhysicalSizeZ(zStep, series);
dims_pixelSize[i] = readFloat32(); store.setPixelsPhysicalSizeX(FormatTools.createLength(dims_pixelSize[0], UNITS.MICROMETER), 0); store.setPixelsPhysicalSizeY(FormatTools.createLength(dims_pixelSize[1], UNITS.MICROMETER), 0); store.setPixelsPhysicalSizeZ(FormatTools.createLength(dims_pixelSize[2], UNITS.MICROMETER), 0);
dims_pixelSize[i] = readFloat32(); store.setPixelsPhysicalSizeX(FormatTools.createLength(dims_pixelSize[0], UNITS.MICROMETER), 0); store.setPixelsPhysicalSizeY(FormatTools.createLength(dims_pixelSize[1], UNITS.MICROMETER), 0); store.setPixelsPhysicalSizeZ(FormatTools.createLength(dims_pixelSize[2], UNITS.MICROMETER), 0);
store.setPixelsPhysicalSizeX(FormatTools.createLength(physicalSizeX, UNITS.MICROMETER), 0); store.setPixelsPhysicalSizeY(FormatTools.createLength(physicalSizeY, UNITS.MICROMETER), 0);
store.setPixelsPhysicalSizeX(FormatTools.createLength(physicalSizeX, UNITS.MICROMETER), 0); store.setPixelsPhysicalSizeY(FormatTools.createLength(physicalSizeY, UNITS.MICROMETER), 0);
Length size = FormatTools.createLength(physicalSize, UNITS.MICROMETER); store.setPixelsPhysicalSizeX(size, 0); store.setPixelsPhysicalSizeY(size, 0);
Length size = FormatTools.createLength(physicalSize, UNITS.MICROMETER); store.setPixelsPhysicalSizeX(size, 0); store.setPixelsPhysicalSizeY(size, 0);
@Test public void validateUpgrade() throws ServiceException { assertEquals(1, ome.sizeOfImageList()); Image image = ome.getImage(0); Pixels pixels = image.getPixels(); // Pixels physical sizes are restricted to positive values PositiveFloat positiveFloatValue = new PositiveFloat(10000.0); assertEquals(FormatTools.createLength(positiveFloatValue, UNITS.MICROMETER), pixels.getPhysicalSizeX()); assertEquals(FormatTools.createLength(positiveFloatValue, UNITS.MICROMETER), pixels.getPhysicalSizeY()); assertNull(pixels.getPhysicalSizeZ()); }
PositiveFloat y = new PositiveFloat(Math.abs(wlz.getVoxSzY())); PositiveFloat z = new PositiveFloat(Math.abs(wlz.getVoxSzZ())); store.setPixelsPhysicalSizeX(FormatTools.createLength(x, UNITS.MICROMETER), 0); store.setPixelsPhysicalSizeY(FormatTools.createLength(y, UNITS.MICROMETER), 0); store.setPixelsPhysicalSizeZ(FormatTools.createLength(z, UNITS.MICROMETER), 0); store.setStageLabelName(wlz.getWlzOrgLabelName(), 0); store.setStageLabelX(new Length(wlz.getOrgX(), UNITS.REFERENCEFRAME), 0);
PositiveFloat y = new PositiveFloat(Math.abs(wlz.getVoxSzY())); PositiveFloat z = new PositiveFloat(Math.abs(wlz.getVoxSzZ())); store.setPixelsPhysicalSizeX(FormatTools.createLength(x, UNITS.MICROMETER), 0); store.setPixelsPhysicalSizeY(FormatTools.createLength(y, UNITS.MICROMETER), 0); store.setPixelsPhysicalSizeZ(FormatTools.createLength(z, UNITS.MICROMETER), 0); store.setStageLabelName(wlz.getWlzOrgLabelName(), 0); store.setStageLabelX(new Length(wlz.getOrgX(), UNITS.REFERENCEFRAME), 0);
store.setPixelsPhysicalSizeX(FormatTools.createLength(pixelSizeX, UNITS.MICROMETER), 0); store.setPixelsPhysicalSizeY(FormatTools.createLength(pixelSizeY, UNITS.MICROMETER), 0);
for (int p=0; p<getImageCount(); p++) { if (p < zPosition.length && zPosition[p] != null) { store.setPlanePositionZ(FormatTools.createLength(zPosition[p], UNITS.REFERENCEFRAME), i, p);
for (int p=0; p<getImageCount(); p++) { if (p < zPosition.length && zPosition[p] != null) { store.setPlanePositionZ(FormatTools.createLength(zPosition[p], UNITS.REFERENCEFRAME), i, p);
pf(firstFrame.getMicronsPerPixelX(), "PhysicalSizeX"); if (physicalSizeX != null) { store.setPixelsPhysicalSizeX(FormatTools.createLength(physicalSizeX, UNITS.MICROMETER), s); pf(firstFrame.getMicronsPerPixelY(), "PhysicalSizeY"); if (physicalSizeY != null) { store.setPixelsPhysicalSizeY(FormatTools.createLength(physicalSizeY, UNITS.MICROMETER), s);
pf(firstFrame.getMicronsPerPixelX(), "PhysicalSizeX"); if (physicalSizeX != null) { store.setPixelsPhysicalSizeX(FormatTools.createLength(physicalSizeX, UNITS.MICROMETER), s); pf(firstFrame.getMicronsPerPixelY(), "PhysicalSizeY"); if (physicalSizeY != null) { store.setPixelsPhysicalSizeY(FormatTools.createLength(physicalSizeY, UNITS.MICROMETER), s);