/** Retrieve the number of samples per pixel for given series. */ protected int getSamplesPerPixel(int series) { MetadataRetrieve r = getMetadataRetrieve(); PositiveInteger samples = r.getChannelSamplesPerPixel(series, 0); if (samples == null) { LOGGER.warn("SamplesPerPixel #0 is null. It is assumed to be 1."); } return samples == null ? 1 : samples.getValue(); }
/** Retrieve the number of samples per pixel for given series. */ protected int getSamplesPerPixel(int series) { MetadataRetrieve r = getMetadataRetrieve(); PositiveInteger samples = r.getChannelSamplesPerPixel(series, 0); if (samples == null) { LOGGER.warn("SamplesPerPixel #0 is null. It is assumed to be 1."); } return samples == null ? 1 : samples.getValue(); }
/** Retrieve the total number of planes in given series. */ protected int getPlaneCount(int series) { MetadataRetrieve r = getMetadataRetrieve(); int z = r.getPixelsSizeZ(series).getValue().intValue(); int t = r.getPixelsSizeT(series).getValue().intValue(); int c = r.getPixelsSizeC(series).getValue().intValue(); c /= r.getChannelSamplesPerPixel(series, 0).getValue().intValue(); return z * c * t; }
/** Retrieve the total number of planes in given series. */ protected int getPlaneCount(int series) { MetadataRetrieve r = getMetadataRetrieve(); int z = r.getPixelsSizeZ(series).getValue().intValue(); int t = r.getPixelsSizeT(series).getValue().intValue(); int c = r.getPixelsSizeC(series).getValue().intValue(); c /= r.getChannelSamplesPerPixel(series, 0).getValue().intValue(); return z * c * t; }
private int planeCount(final int imageIndex) { final MetadataRetrieve r = getMetadata().getOmeMeta().getRoot(); final int z = Math.max(1, // r.getPixelsSizeZ(imageIndex).getValue().intValue()); final int t = Math.max(1, // r.getPixelsSizeT(imageIndex).getValue().intValue()); int c = r.getChannelCount(imageIndex); final String pixelType = r.getPixelsType(imageIndex).getValue(); final int bytes = FormatTools.getBytesPerPixel(pixelType); if (bytes > 1 && c == 1) { c = r.getChannelSamplesPerPixel(imageIndex, 0).getValue(); } c = Math.max(1, c); return z * c * t; }
private int planeCount() { MetadataRetrieve r = getMetadataRetrieve(); int z = r.getPixelsSizeZ(series).getValue().intValue(); int t = r.getPixelsSizeT(series).getValue().intValue(); int c = r.getChannelCount(series); String pixelType = r.getPixelsType(series).getValue(); int bytes = FormatTools.getBytesPerPixel(pixelType); if (bytes > 1 && c == 1) { c = r.getChannelSamplesPerPixel(series, 0).getValue(); } return z * c * t; }
private int planeCount() { MetadataRetrieve r = getMetadataRetrieve(); int z = r.getPixelsSizeZ(series).getValue().intValue(); int t = r.getPixelsSizeT(series).getValue().intValue(); int c = r.getChannelCount(series); String pixelType = r.getPixelsType(series).getValue(); int bytes = FormatTools.getBytesPerPixel(pixelType); if (bytes > 1 && c == 1) { c = r.getChannelSamplesPerPixel(series, 0).getValue(); } return z * c * t; }
String pixelType = meta.getPixelsType(series).toString(); int type = FormatTools.pixelTypeFromString(pixelType); PositiveInteger nChannels = meta.getChannelSamplesPerPixel(series, 0); if (nChannels == null) { LOGGER.warn("SamplesPerPixel is null; it is assumed to be 1.");
String pixelType = meta.getPixelsType(series).toString(); int type = FormatTools.pixelTypeFromString(pixelType); PositiveInteger nChannels = meta.getChannelSamplesPerPixel(series, 0); if (nChannels == null) { LOGGER.warn("SamplesPerPixel is null; it is assumed to be 1.");
FormatTools.pixelTypeFromString(r.getPixelsType(series).toString()); int bpp = FormatTools.getBytesPerPixel(pixelType); PositiveInteger samples = r.getChannelSamplesPerPixel(series, 0); if (samples == null) samples = new PositiveInteger(1); int minSize = bpp * w * h * samples.getValue();
FormatTools.pixelTypeFromString(r.getPixelsType(series).toString()); int bpp = FormatTools.getBytesPerPixel(pixelType); PositiveInteger samples = r.getChannelSamplesPerPixel(series, 0); if (samples == null) samples = new PositiveInteger(1); int minSize = bpp * w * h * samples.getValue();
retrieve.getPixelsDimensionOrder(imageIndex).getValue(); final PositiveInteger spp = retrieve.getChannelCount(imageIndex) <= 0 ? // null : retrieve.getChannelSamplesPerPixel(imageIndex, 0);
int nChannelComponents = retrieve.getChannelCount(i); int samplesPerPixel = retrieve.getChannelSamplesPerPixel(i, 0).getValue();