/** * Retrieves the specified channel's minimum based on the images that have * been read. Returns null if no image planes have been read yet. * * @throws FormatException Not actually thrown. * @throws IOException Not actually thrown. */ public Double getChannelKnownMinimum(int theC) throws FormatException, IOException { FormatTools.assertId(getCurrentFile(), true, 2); return chanMin == null ? null : new Double(chanMin[getCoreIndex()][theC]); }
/** * Retrieves the specified channel's maximum based on the images that * have been read. Returns null if no image planes have been read yet. * * @throws FormatException Not actually thrown. * @throws IOException Not actually thrown. */ public Double getChannelKnownMaximum(int theC) throws FormatException, IOException { FormatTools.assertId(getCurrentFile(), true, 2); return chanMax == null ? null : new Double(chanMax[getCoreIndex()][theC]); }
/** * Retrieves the specified channel's minimum based on the images that have * been read. Returns null if no image planes have been read yet. * * @throws FormatException Not actually thrown. * @throws IOException Not actually thrown. */ public Double getChannelKnownMinimum(int theC) throws FormatException, IOException { FormatTools.assertId(getCurrentFile(), true, 2); return chanMin == null ? null : new Double(chanMin[getCoreIndex()][theC]); }
/** * Retrieves the specified channel's maximum based on the images that * have been read. Returns null if no image planes have been read yet. * * @throws FormatException Not actually thrown. * @throws IOException Not actually thrown. */ public Double getChannelKnownMaximum(int theC) throws FormatException, IOException { FormatTools.assertId(getCurrentFile(), true, 2); return chanMax == null ? null : new Double(chanMax[getCoreIndex()][theC]); }
/** * Returns true if the values returned by * getChannelGlobalMinimum/Maximum can be trusted. * * @throws FormatException Not actually thrown. * @throws IOException Not actually thrown. */ public boolean isMinMaxPopulated() throws FormatException, IOException { FormatTools.assertId(getCurrentFile(), true, 2); return minMaxDone != null && minMaxDone[getCoreIndex()] == getImageCount(); }
/** * 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; }
/** * 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; }
/** * Returns true if the values returned by * getChannelGlobalMinimum/Maximum can be trusted. * * @throws FormatException Not actually thrown. * @throws IOException Not actually thrown. */ public boolean isMinMaxPopulated() throws FormatException, IOException { FormatTools.assertId(getCurrentFile(), true, 2); return minMaxDone != null && minMaxDone[getCoreIndex()] == getImageCount(); }
/** * Retrieves a specified channel's global maximum. * Returns null if some of the image planes have not been read. * @throws IOException Not actually thrown. */ public Double getChannelGlobalMaximum(int theC) throws FormatException, IOException { FormatTools.assertId(getCurrentFile(), true, 2); if (theC < 0 || theC >= getSizeC()) { throw new FormatException("Invalid channel index: " + theC); } int series = getCoreIndex(); // check that all planes have been read if (minMaxDone == null || minMaxDone[series] < getImageCount()) { return null; } return new Double(chanMax[series][theC]); }
/** * Retrieves a specified channel's global minimum. * Returns null if some of the image planes have not been read. * * @throws IOException Not actually thrown. */ public Double getChannelGlobalMinimum(int theC) throws FormatException, IOException { FormatTools.assertId(getCurrentFile(), true, 2); if (theC < 0 || theC >= getSizeC()) { throw new FormatException("Invalid channel index: " + theC); } int series = getCoreIndex(); // check that all planes have been read if (minMaxDone == null || minMaxDone[series] < getImageCount()) { return null; } return new Double(chanMin[series][theC]); }
/** * Retrieves a specified channel's global maximum. * Returns null if some of the image planes have not been read. * @throws IOException Not actually thrown. */ public Double getChannelGlobalMaximum(int theC) throws FormatException, IOException { FormatTools.assertId(getCurrentFile(), true, 2); if (theC < 0 || theC >= getSizeC()) { throw new FormatException("Invalid channel index: " + theC); } int series = getCoreIndex(); // check that all planes have been read if (minMaxDone == null || minMaxDone[series] < getImageCount()) { return null; } return new Double(chanMax[series][theC]); }
/** * Retrieves a specified channel's global minimum. * Returns null if some of the image planes have not been read. * * @throws IOException Not actually thrown. */ public Double getChannelGlobalMinimum(int theC) throws FormatException, IOException { FormatTools.assertId(getCurrentFile(), true, 2); if (theC < 0 || theC >= getSizeC()) { throw new FormatException("Invalid channel index: " + theC); } int series = getCoreIndex(); // check that all planes have been read if (minMaxDone == null || minMaxDone[series] < getImageCount()) { return null; } return new Double(chanMin[series][theC]); }
int series = getCoreIndex(); int pixelType = getPixelType(); int bpp = FormatTools.getBytesPerPixel(pixelType); if (minMaxDone[getCoreIndex()] == getImageCount() && minMaxStore != null) { for (int c=0; c<getSizeC(); c++) { minMaxStore.setChannelGlobalMinMax(c, chanMin[getCoreIndex()][c], chanMax[getCoreIndex()][c], getSeries());
int series = getCoreIndex(); int pixelType = getPixelType(); int bpp = FormatTools.getBytesPerPixel(pixelType); if (minMaxDone[getCoreIndex()] == getImageCount() && minMaxStore != null) { for (int c=0; c<getSizeC(); c++) { minMaxStore.setChannelGlobalMinMax(c, chanMin[getCoreIndex()][c], chanMax[getCoreIndex()][c], getSeries());
int oldSeries = getCoreIndex();
int oldSeries = getCoreIndex();
List<List<double[]>> seriesGlobalMinimaMaxima = minMaxStore.seriesGlobalMinimaMaxima; assertEquals(minMaxCalculator.getCoreIndex() + 1, seriesGlobalMinimaMaxima.size()); List<double[]> channelGlobalMinimaMaxima = seriesGlobalMinimaMaxima.get(0);