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


Java BufferedImageReader类代码示例

本文整理汇总了Java中loci.formats.gui.BufferedImageReader的典型用法代码示例。如果您正苦于以下问题:Java BufferedImageReader类的具体用法?Java BufferedImageReader怎么用?Java BufferedImageReader使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


BufferedImageReader类属于loci.formats.gui包,在下文中一共展示了BufferedImageReader类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: MultiplexImageReader

import loci.formats.gui.BufferedImageReader; //导入依赖的package包/类
public MultiplexImageReader(final BufferedImageReader r, final MihcConfig mihcConfig, double[] gains) {
    super(r);
    if (r.getCurrentFile()!=null) throw new IllegalStateException("reader r must be closed, call setId after wrapping");
    this.matrix = mihcConfig.getMatrix();
    this.gainsNorm = mihcConfig.getNormalGains();
    this.matrixChannelNames = mihcConfig.getMatrixChannelNames();
    this.gains = gains;
}
 
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:9,代码来源:MultiplexImageReader.java

示例2: main

import loci.formats.gui.BufferedImageReader; //导入依赖的package包/类
public static void main(String[] args) throws Exception {
        String fn = "D:\\pic\\Hamamatsu\\fl8\\6188205.ndpis";
        fn = "D:\\pic\\Hamamatsu\\fl5ome\\test3.ndpis";
        int tx = 0;
        int ty = 0;
        NDPISReaderOrbit reader = new NDPISReaderOrbit();
        reader.setFlattenedResolutions(false);
        BufferedImageReader bir = new BufferedImageReader(reader);
        MihcConfigData confData = new MihcConfigData();
        reader.setId(fn);
        double[] gains = NDPIUtils.getExposureTimesGain(reader);
        logger.info("gains: "+ Arrays.toString(gains));
        reader.close();
        MihcConfig mihcConfig = new MihcConfig(confData.channelNames4HT,confData.Asn4,confData.normGain4);
        mihcConfig.saveConfig("d:/conf.xml");
     //   MultiplexImageReader mir = new MultiplexImageReader(bir,conf.channelNames6, conf.filterNewXeon6, conf.normGain6, gains);
        MultiplexImageReader mir = new MultiplexImageReader(bir,mihcConfig,gains);

        ServiceFactory factory = new ServiceFactory();
        OMEXMLService service = factory.getInstance(OMEXMLService.class);
        IMetadata meta = service.createOMEXMLMetadata();
        mir.setMetadataStore(meta);

        mir.setId(fn);
        System.out.println("image dimensions: "+reader.getSizeX()+","+reader.getSizeY());
        System.out.println("channel name: "+meta.getChannelName(mir.getSeries(),0));

//        for (int c=0; c<reader.getSizeC(); c++) {
//            long startt = System.currentTimeMillis();
//            BufferedImage img = mir.openImage(c, 100, 300, 2000, 2000);
//            long usedt = System.currentTimeMillis()-startt;
//            System.out.println("used time for channel "+c+": "+usedt);
//        }
        BufferedImage img = mir.openImage(2, 1000, 1000, 1000, 1000);
        ImageIO.write(img,"png",new File("d:/test.png"));
        reader.close();
    }
 
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:38,代码来源:MihcTest.java

示例3: getReader

import loci.formats.gui.BufferedImageReader; //导入依赖的package包/类
public ThreadLocal<BufferedImageReader> getReader() {
    return reader;
}
 
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:4,代码来源:OrbitImageBioformats.java


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