/** * Retrieves the maximum pixel value for the specified plane. * If each image plane contains more than one channel (i.e., * {@link #getRGBChannelCount()} > 1), returns the maximum value for each * embedded channel. Returns null if the plane has not already been read. * * @throws FormatException Not actually thrown. * @throws IOException Not actually thrown. */ public Double[] getPlaneMaximum(int no) throws FormatException, IOException { FormatTools.assertId(getCurrentFile(), true, 2); if (planeMax == null) return null; int numRGB = getRGBChannelCount(); int pBase = no * numRGB; int series = getCoreIndex(); if (Double.isNaN(planeMax[series][pBase])) return null; Double[] max = new Double[numRGB]; for (int c=0; c<numRGB; c++) { max[c] = new Double(planeMax[series][pBase + c]); } return max; }
/** * Retrieves the minimum pixel value for the specified plane. * If each image plane contains more than one channel (i.e., * {@link #getRGBChannelCount()} > 1), returns the maximum value for each * embedded channel. Returns null if the plane has not already been read. * * @throws FormatException Not actually thrown. * @throws IOException Not actually thrown. */ public Double[] getPlaneMinimum(int no) throws FormatException, IOException { FormatTools.assertId(getCurrentFile(), true, 2); if (planeMin == null) return null; int numRGB = getRGBChannelCount(); int pBase = no * numRGB; int series = getCoreIndex(); if (Double.isNaN(planeMin[series][pBase])) return null; Double[] min = new Double[numRGB]; for (int c=0; c<numRGB; c++) { min[c] = new Double(planeMin[series][pBase + c]); } return min; }
/** * Retrieves the maximum pixel value for the specified plane. * If each image plane contains more than one channel (i.e., * {@link #getRGBChannelCount()} > 1), returns the maximum value for each * embedded channel. Returns null if the plane has not already been read. * * @throws FormatException Not actually thrown. * @throws IOException Not actually thrown. */ public Double[] getPlaneMaximum(int no) throws FormatException, IOException { FormatTools.assertId(getCurrentFile(), true, 2); if (planeMax == null) return null; int numRGB = getRGBChannelCount(); int pBase = no * numRGB; int series = getCoreIndex(); if (Double.isNaN(planeMax[series][pBase])) return null; Double[] max = new Double[numRGB]; for (int c=0; c<numRGB; c++) { max[c] = new Double(planeMax[series][pBase + c]); } return max; }
/** * Retrieves the minimum pixel value for the specified plane. * If each image plane contains more than one channel (i.e., * {@link #getRGBChannelCount()} > 1), returns the maximum value for each * embedded channel. Returns null if the plane has not already been read. * * @throws FormatException Not actually thrown. * @throws IOException Not actually thrown. */ public Double[] getPlaneMinimum(int no) throws FormatException, IOException { FormatTools.assertId(getCurrentFile(), true, 2); if (planeMin == null) return null; int numRGB = getRGBChannelCount(); int pBase = no * numRGB; int series = getCoreIndex(); if (Double.isNaN(planeMin[series][pBase])) return null; Double[] min = new Double[numRGB]; for (int c=0; c<numRGB; c++) { min[c] = new Double(planeMin[series][pBase + c]); } return min; }
@Override public byte[] openBytes(int no, int x, int y, int w, int h) throws FormatException, IOException { byte[] buf = new byte[w * h * getRGBChannelCount() * FormatTools.getBytesPerPixel(getPixelType())]; return openBytes(no, buf, x, y, w, h); }
@Override public byte[] openBytes(int no, int x, int y, int w, int h) throws FormatException, IOException { byte[] buf = new byte[w * h * getRGBChannelCount() * FormatTools.getBytesPerPixel(getPixelType())]; return openBytes(no, buf, x, y, w, h); }
for (int i=0; i<seriesCount; i++) { setCoreIndex(i); int numRGB = getRGBChannelCount(); planeMin[i] = new double[getImageCount() * numRGB]; Arrays.fill(planeMin[i], Double.NaN); for (int i=0; i<seriesCount; i++) { setCoreIndex(i); int numRGB = getRGBChannelCount(); planeMax[i] = new double[getImageCount() * numRGB]; Arrays.fill(planeMax[i], Double.NaN);
for (int i=0; i<seriesCount; i++) { setCoreIndex(i); int numRGB = getRGBChannelCount(); planeMin[i] = new double[getImageCount() * numRGB]; Arrays.fill(planeMin[i], Double.NaN); for (int i=0; i<seriesCount; i++) { setCoreIndex(i); int numRGB = getRGBChannelCount(); planeMax[i] = new double[getImageCount() * numRGB]; Arrays.fill(planeMax[i], Double.NaN);
initMinMax(); int numRGB = getRGBChannelCount(); int series = getCoreIndex(); int pixelType = getPixelType();
initMinMax(); int numRGB = getRGBChannelCount(); int series = getCoreIndex(); int pixelType = getPixelType();