本文整理汇总了Java中loci.formats.IFormatReader.setSeries方法的典型用法代码示例。如果您正苦于以下问题:Java IFormatReader.setSeries方法的具体用法?Java IFormatReader.setSeries怎么用?Java IFormatReader.setSeries使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类loci.formats.IFormatReader
的用法示例。
在下文中一共展示了IFormatReader.setSeries方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: newImageReader
import loci.formats.IFormatReader; //导入方法依赖的package包/类
public static final IFormatReader newImageReader(final String id) {
final IFormatReader reader = new ImageReader();
try {
reader.setId(id);
} catch (final Exception exception) {
throw unchecked(exception);
}
if ("portable gray map".equals(reader.getFormat().toLowerCase(Locale.ENGLISH))) {
// XXX This fixes a defect in Bio-Formats PPM loading, but is it always OK?
reader.getCoreMetadata()[0].interleaved = true;
}
reader.setSeries(0);
return reader;
}
示例2: openPlane
import loci.formats.IFormatReader; //导入方法依赖的package包/类
@Override
public ByteArrayPlane openPlane(final int imageIndex,
final long planeIndex, final ByteArrayPlane plane, final long[] offsets,
final long[] lengths, final SCIFIOConfig config) throws FormatException,
IOException
{
final IFormatReader reader = getMetadata().getReader();
reader.setSeries(imageIndex);
try {
Metadata meta = getMetadata();
final int xIndex = meta.get(imageIndex).getAxisIndex(Axes.X), yIndex =
meta.get(imageIndex).getAxisIndex(Axes.Y);
final int x = (int) offsets[xIndex], y = (int) offsets[yIndex], w =
(int) lengths[xIndex], h = (int) lengths[yIndex];
reader.openBytes((int)planeIndex, plane.getBytes(), x, y, w, h);
plane.setColorTable(getMetadata().getColorTable(imageIndex, planeIndex));
}
catch (final loci.formats.FormatException e) {
throw new FormatException(e);
}
return plane;
}
示例3: configureReader
import loci.formats.IFormatReader; //导入方法依赖的package包/类
@Override
protected void configureReader(IFormatReader reader, int resIndex)
{
int resolutionIndexInReader = super.getResolutionCount() - 1 - resIndex;
reader.setSeries(super.getSeriesIndex() + resolutionIndexInReader);
}
示例4: loadImages
import loci.formats.IFormatReader; //导入方法依赖的package包/类
@Override
protected void loadImages(BioformatsVirtualSlide slide, ReaderPool readerPool) throws UncheckedInterruptedException
{
IFormatReader reader = readerPool.borrow();
try
{
List<Integer> seriesResolutionCount = getSeriesResolutionCount(slide.getBioformatsMetadata());
int readerSeriesIndex = 0;
for(int seriesIndex = 0; seriesIndex < seriesResolutionCount.size(); seriesIndex++)
{
reader.setSeries(readerSeriesIndex);
String imageName = slide.getBioformatsMetadata().getImageName(readerSeriesIndex);
int resCount = seriesResolutionCount.get(seriesIndex);
OmeTiffVirtualSlideImage image = new OmeTiffVirtualSlideImage(imageName, readerSeriesIndex, resCount, readerPool);
computePaddingForEveryResolutionOfImage(image);
slide.addImage(seriesIndex, image);
readerSeriesIndex += seriesResolutionCount.get(seriesIndex);
}
}
finally
{
readerPool.putBack(reader);
}
}