private int getScanlinePad() { if (getSizeX() % 2 == 0) return 0; if (getSizeC() % 2 == 0) return 0; return 1; }
private int getScanlinePad() { if (getSizeX() % 2 == 0) return 0; if (getSizeC() % 2 == 0) return 0; return 1; }
lastChannel = split ? no % getSizeC() : 0; int planeIndex = split ? no / getSizeC() : no; in.seek(offsets[getSeries()][planeIndex]); if (split) pixel *= getSizeC(); int totalPlanes = split ? getImageCount() / getSizeC() : getImageCount(); else if (split && (getSizeC() <= 4 || scanlinePad == 0) && nXFields == 1) { byte[] pix = new byte[(getSizeX() + scanlinePad) * getSizeY() * pixel]; in.read(pix);
if (exposureTime.size() == 0 || handler.getExposureTimes().size() == 1 || exposureTime.size() % getSizeC() != 0) { exposureTime = handler.getExposureTimes(); if (backupHandler != null && backupHandler.getExposureTimes().size() > exposureTime.size()) { int zcPlanes = getImageCount() / ((split ? getSizeC() : 1) * getSizeT()); for (int i=0; i<getSeriesCount(); i++) { if (tsT.size() > 0) { int index = i * getSizeC() + coords[1]; if (exposureTime.size() >= getSizeC() && exposureTime.size() < getSizeC() * getSeriesCount()) { index = coords[1]; if (i * getSizeC() < temperature.size()) { Double temp = temperature.get(i * getSizeC()); store.setImagingEnvironmentTemperature( new Temperature(temp, UNITS.CELSIUS), i);
lastChannel = split ? no % getSizeC() : 0; int planeIndex = split ? no / getSizeC() : no; in.seek(offsets[getSeries()][planeIndex]); if (split) pixel *= getSizeC(); int totalPlanes = split ? getImageCount() / getSizeC() : getImageCount(); else if (split && (getSizeC() <= 4 || scanlinePad == 0) && nXFields == 1) { byte[] pix = new byte[(getSizeX() + scanlinePad) * getSizeY() * pixel]; in.read(pix);
if (exposureTime.size() == 0 || handler.getExposureTimes().size() == 1 || exposureTime.size() % getSizeC() != 0) { exposureTime = handler.getExposureTimes(); if (backupHandler != null && backupHandler.getExposureTimes().size() > exposureTime.size()) { int zcPlanes = getImageCount() / ((split ? getSizeC() : 1) * getSizeT()); for (int i=0; i<getSeriesCount(); i++) { if (tsT.size() > 0) { int index = i * getSizeC() + coords[1]; if (exposureTime.size() >= getSizeC() && exposureTime.size() < getSizeC() * getSeriesCount()) { index = coords[1]; if (i * getSizeC() < temperature.size()) { Double temp = temperature.get(i * getSizeC()); store.setImagingEnvironmentTemperature( new Temperature(temp, UNITS.CELSIUS), i);
if (getSizeC() == 0) { for (int i=0; i<getSeriesCount(); i++) { core.get(i, 0).sizeC = 1; if (positionCount != getSeriesCount() && (getSizeZ() == imageOffsets.size() || (extraZDataCount > 1 && getSizeZ() == 1 && (extraZDataCount == getSizeC())) || (handler.getXPositions().size() == 0 && (xOffset == 0 && getSizeZ() != getSeriesCount()))) && getSeriesCount() > 1) { CoreMetadata ms0 = core.get(0, 0); if (getSeriesCount() > ms0.sizeZ) { long planeSize = getSizeX() * getSizeY() * getSizeC() * FormatTools.getBytesPerPixel(getPixelType()); LOGGER.debug("Correcting SizeC: was {}", getSizeC()); LOGGER.debug("plane size = {}", planeSize); LOGGER.debug("available bytes = {}", availableBytes); core.get(0, 0).sizeC = (int) (availableBytes / (planeSize / getSizeC())); if (getSizeC() == 0) { core.get(0, 0).sizeC = 1; planeSize = getSizeX() * getSizeY() * getSizeC() * FormatTools.getBytesPerPixel(getPixelType()); getSizeC() > 3) && getPixelType() == FormatTools.INT8) if (getSizeC() > 3 && availableBytes % planeSize != 0 && planeSize > availableBytes) else if (getSizeC() == 2 && getPixelType() == FormatTools.INT8 && availableBytes >= planeSize * 2)
if (getSizeC() == 0) { for (int i=0; i<getSeriesCount(); i++) { core.get(i, 0).sizeC = 1; if (positionCount != getSeriesCount() && (getSizeZ() == imageOffsets.size() || (extraZDataCount > 1 && getSizeZ() == 1 && (extraZDataCount == getSizeC())) || (handler.getXPositions().size() == 0 && (xOffset == 0 && getSizeZ() != getSeriesCount()))) && getSeriesCount() > 1) { CoreMetadata ms0 = core.get(0, 0); if (getSeriesCount() > ms0.sizeZ) { long planeSize = getSizeX() * getSizeY() * getSizeC() * FormatTools.getBytesPerPixel(getPixelType()); LOGGER.debug("Correcting SizeC: was {}", getSizeC()); LOGGER.debug("plane size = {}", planeSize); LOGGER.debug("available bytes = {}", availableBytes); core.get(0, 0).sizeC = (int) (availableBytes / (planeSize / getSizeC())); if (getSizeC() == 0) { core.get(0, 0).sizeC = 1; planeSize = getSizeX() * getSizeY() * getSizeC() * FormatTools.getBytesPerPixel(getPixelType()); getSizeC() > 3) && getPixelType() == FormatTools.INT8) if (getSizeC() > 3 && availableBytes % planeSize != 0 && planeSize > availableBytes) else if (getSizeC() == 2 && getPixelType() == FormatTools.INT8 && availableBytes >= planeSize * 2)