当前位置: 首页>>代码示例>>Java>>正文


Java IFormatReader.setSeries方法代码示例

本文整理汇总了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;
}
 
开发者ID:apgrgr,项目名称:SyntheticWSI,代码行数:19,代码来源:LociBackedImage.java

示例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;
}
 
开发者ID:scifio,项目名称:scifio-bf-compat,代码行数:25,代码来源:BioFormatsFormat.java

示例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);
}
 
开发者ID:Strachu,项目名称:VirtualSlideViewer,代码行数:8,代码来源:OmeTiffVirtualSlideImage.java

示例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);
	}
}
 
开发者ID:Strachu,项目名称:VirtualSlideViewer,代码行数:31,代码来源:OmeTiffLoader.java


注:本文中的loci.formats.IFormatReader.setSeries方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。