@Override public int[] getZCTCoords(int no) { return FormatTools.getZCTCoords(this, no); }
@Override public int[] getZCTCoords(int index) { return FormatTools.getZCTCoords(this, index); }
@Override public int[] getZCTCoords(int index) { return FormatTools.getZCTCoords(this, index); }
@Override public int[] getZCTCoords(int no) { return FormatTools.getZCTCoords(this, no); }
@Override public int[] getZCTCoords(int index) { return FormatTools.getZCTCoords(this, index); }
@Override public int[] getZCTCoords(int index) { return FormatTools.getZCTCoords(this, index); }
@Override public int[] getZCTCoords(int index) { FormatTools.assertId(currentId, true, 1); return FormatTools.getZCTCoords(this, index); }
@Override public int[] getZCTCoords(int index) { FormatTools.assertId(currentId, true, 1); return FormatTools.getZCTCoords(this, index); }
public String getFile(String order, int z, int c, int t, int count, int no) { int[] zct = FormatTools.getZCTCoords(order, z, c, t, count, no); for (Index key : fileNameMap.keySet()) { if (key.z == zct[0] && key.c == zct[1] && key.t == zct[2]) { String file = fileNameMap.get(key); if (tiffs != null) { for (String tiff : tiffs) { if (tiff.endsWith(File.separator + file)) { return tiff; } } } } } return fileNameMap.size() == 0 ? tiffs.get(no) : null; } }
public String getFile(String order, int z, int c, int t, int count, int no) { int[] zct = FormatTools.getZCTCoords(order, z, c, t, count, no); for (Index key : fileNameMap.keySet()) { if (key.z == zct[0] && key.c == zct[1] && key.t == zct[2]) { String file = fileNameMap.get(key); if (tiffs != null) { for (String tiff : tiffs) { if (tiff.endsWith(File.separator + file)) { return tiff; } } } } } return fileNameMap.size() == 0 ? tiffs.get(no) : null; } }
/** * Converts index from one dimension order to another. * This method is useful for shuffling the planar order around * (rather than eassigning ZCT sizes as {@link DimensionSwapper} does). * * @param origOrder Original dimension order. * @param newOrder New dimension order. * @param zSize Total number of focal planes (real size). * @param cSize Total number of channels (real size). * @param tSize Total number of time points (real size). * @param num Total number of image planes (zSize * cSize * tSize), * specified as a consistency check. * @param newIndex 1D (rasterized) index according to new dimension order. * @return rasterized index according to original dimension order. */ public static int getReorderedIndex(String origOrder, String newOrder, int zSize, int cSize, int tSize, int num, int newIndex) { int[] zct = getZCTCoords(newOrder, zSize, cSize, tSize, num, newIndex); return getIndex(origOrder, zSize, cSize, tSize, num, zct[0], zct[1], zct[2]); }
/** * Converts index from one dimension order to another. * This method is useful for shuffling the planar order around * (rather than eassigning ZCT sizes as {@link DimensionSwapper} does). * * @param origOrder Original dimension order. * @param newOrder New dimension order. * @param zSize Total number of focal planes (real size). * @param cSize Total number of channels (real size). * @param tSize Total number of time points (real size). * @param num Total number of image planes (zSize * cSize * tSize), * specified as a consistency check. * @param newIndex 1D (rasterized) index according to new dimension order. * @return rasterized index according to original dimension order. */ public static int getReorderedIndex(String origOrder, String newOrder, int zSize, int cSize, int tSize, int num, int newIndex) { int[] zct = getZCTCoords(newOrder, zSize, cSize, tSize, num, newIndex); return getIndex(origOrder, zSize, cSize, tSize, num, zct[0], zct[1], zct[2]); }
/** * Gets the Z, C and T coordinates corresponding * to the given rasterized index value (real sizes). */ public static int[] getZCTCoords(IFormatReader reader, int index) { String order = reader.getDimensionOrder(); int zSize = reader.getSizeZ(); int cSize = reader.getEffectiveSizeC(); int tSize = reader.getSizeT(); int num = reader.getImageCount(); return getZCTCoords(order, zSize, cSize, tSize, num, index); }
/** * Gets the Z, C and T coordinates corresponding * to the given rasterized index value (real sizes). */ public static int[] getZCTCoords(IFormatReader reader, int index) { String order = reader.getDimensionOrder(); int zSize = reader.getSizeZ(); int cSize = reader.getEffectiveSizeC(); int tSize = reader.getSizeT(); int num = reader.getImageCount(); return getZCTCoords(order, zSize, cSize, tSize, num, index); }
@Override public int[] getZCTCoords(int index) { FormatTools.assertId(getCurrentFile(), true, 2); return noStitch ? reader.getZCTCoords(index) : FormatTools.getZCTCoords(core.get(getCoreIndex()).dimensionOrder, getSizeZ(), getEffectiveSizeC(), getSizeT(), getImageCount(), index); }
@Override public int[] getZCTCoords(int index) { FormatTools.assertId(getCurrentFile(), true, 2); return noStitch ? reader.getZCTCoords(index) : FormatTools.getZCTCoords(core.get(getCoreIndex()).dimensionOrder, getSizeZ(), getEffectiveSizeC(), getSizeT(), getImageCount(), index); }
@Override public int[] getZCTModuloCoords(int index) { FormatTools.assertId(getCurrentFile(), true, 2); return noStitch ? reader.getZCTModuloCoords(index) : FormatTools.getZCTCoords(core.get(getCoreIndex()).dimensionOrder, getSizeZ(), getEffectiveSizeC(), getSizeT(), getModuloZ().length(), getModuloC().length(), getModuloT().length(), getImageCount(), index); }
@Override public int[] getZCTModuloCoords(int index) { FormatTools.assertId(getCurrentFile(), true, 2); return noStitch ? reader.getZCTModuloCoords(index) : FormatTools.getZCTCoords(core.get(getCoreIndex()).dimensionOrder, getSizeZ(), getEffectiveSizeC(), getSizeT(), getModuloZ().length(), getModuloC().length(), getModuloT().length(), getImageCount(), index); }
/** * Gets the Z, C, T, ModuloZ, ModuloC and ModuloZ coordinates * corresponding to the given rasterized index value (effective * sizes). Note that the Z, C and T coordinates are not the same as * those returned by getZCTCoords(IFormatReader, int) because the * size of the modulo dimensions is taken into account. The * effective size for each of these dimensions is limited to the * total size of the dimension divided by the modulo size. */ public static int[] getZCTModuloCoords(IFormatReader reader, int index) { String order = reader.getDimensionOrder(); int zSize = reader.getSizeZ(); int cSize = reader.getEffectiveSizeC(); int tSize = reader.getSizeT(); int moduloZSize = reader.getModuloZ().length(); int moduloCSize = reader.getModuloC().length(); int moduloTSize = reader.getModuloT().length(); int num = reader.getImageCount(); return getZCTCoords(order, zSize, cSize, tSize, moduloZSize, moduloCSize, moduloTSize, num, index); }
/** * Gets the Z, C, T, ModuloZ, ModuloC and ModuloZ coordinates * corresponding to the given rasterized index value (effective * sizes). Note that the Z, C and T coordinates are not the same as * those returned by getZCTCoords(IFormatReader, int) because the * size of the modulo dimensions is taken into account. The * effective size for each of these dimensions is limited to the * total size of the dimension divided by the modulo size. */ public static int[] getZCTModuloCoords(IFormatReader reader, int index) { String order = reader.getDimensionOrder(); int zSize = reader.getSizeZ(); int cSize = reader.getEffectiveSizeC(); int tSize = reader.getSizeT(); int moduloZSize = reader.getModuloZ().length(); int moduloCSize = reader.getModuloC().length(); int moduloTSize = reader.getModuloT().length(); int num = reader.getImageCount(); return getZCTCoords(order, zSize, cSize, tSize, moduloZSize, moduloCSize, moduloTSize, num, index); }