@Override public boolean isRGB() { FormatTools.assertId(getCurrentFile(), true, 2); return isIndexed() && !isFalseColor() && getSizeC() > 1; }
@Override public boolean isRGB() { FormatTools.assertId(getCurrentFile(), true, 2); return isIndexed() && !isFalseColor() && getSizeC() > 1; }
/** * @see loci.formats.IFormatReader#openBytes(int, byte[], int, int, int, int) */ @Override public byte[] openBytes(int no, byte[] buf, int x, int y, int w, int h) throws FormatException, IOException { FormatTools.checkPlaneParameters(this, no, buf.length, x, y, w, h); int[] zct = getZCTCoords(no); int channel = zct[1]; readers[channel].setId(ndpiFiles[channel]); readers[channel].setCoreIndex(getCoreIndex()); int cIndex = (bandUsed[channel] < readers[channel].getSizeC()) ? bandUsed[channel] : 0; int plane = readers[channel].getIndex(zct[0], cIndex, zct[2]); readers[channel].openBytes(plane, buf, x, y, w, h); return buf; }
/** * @see loci.formats.IFormatReader#openBytes(int, byte[], int, int, int, int) */ @Override public byte[] openBytes(int no, byte[] buf, int x, int y, int w, int h) throws FormatException, IOException { FormatTools.checkPlaneParameters(this, no, buf.length, x, y, w, h); int[] zct = getZCTCoords(no); int channel = zct[1]; readers[channel].setId(ndpiFiles[channel]); readers[channel].setCoreIndex(getCoreIndex()); int cIndex = (bandUsed[channel] < readers[channel].getSizeC()) ? bandUsed[channel] : 0; int plane = readers[channel].getIndex(zct[0], cIndex, zct[2]); readers[channel].openBytes(plane, buf, x, y, w, h); return buf; }
@Override public byte[] openThumbBytes(int no) throws FormatException, IOException { FormatTools.assertId(getCurrentFile(), true, 2); int source = getOriginalIndex(no); byte[] thumb = reader.openThumbBytes(source); int c = getSizeC() / reader.getEffectiveSizeC(); int channel = no % c; int bpp = FormatTools.getBytesPerPixel(getPixelType()); return ImageTools.splitChannels(thumb, channel, c, bpp, false, reader.isInterleaved()); }
@Override public byte[] openThumbBytes(int no) throws FormatException, IOException { FormatTools.assertId(getCurrentFile(), true, 2); int source = getOriginalIndex(no); byte[] thumb = reader.openThumbBytes(source); int c = getSizeC() / reader.getEffectiveSizeC(); int channel = no % c; int bpp = FormatTools.getBytesPerPixel(getPixelType()); return ImageTools.splitChannels(thumb, channel, c, bpp, false, reader.isInterleaved()); }
int c = getSizeC() / reader.getEffectiveSizeC(); int source = getOriginalIndex(no); int channel = no % c;
int c = getSizeC() / reader.getEffectiveSizeC(); int source = getOriginalIndex(no); int channel = no % c;
for (int s=0; s<getSeriesCount(); s++) { setSeries(s); int rgbChannels = getSizeC() / reader.getEffectiveSizeC(); if (rgbChannels == 1) { continue;
for (int s=0; s<getSeriesCount(); s++) { setSeries(s); int rgbChannels = getSizeC() / reader.getEffectiveSizeC(); if (rgbChannels == 1) { continue;