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


Java RGBStackMerge类代码示例

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


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

示例1: doRGBProjection

import ij.plugin.RGBStackMerge; //导入依赖的package包/类
private void doRGBProjection(ImageStack stack) {
    ImageStack[] channels = ChannelSplitter.splitRGB(stack, true);
    ImagePlus red = new ImagePlus("Red", channels[0]);
    ImagePlus green = new ImagePlus("Green", channels[1]);
    ImagePlus blue = new ImagePlus("Blue", channels[2]);
    imp.unlock();
    ImagePlus saveImp = imp;
    imp = red;
    color = "(red)"; doProjection();
    ImagePlus red2 = projImage;
    imp = green;
    color = "(green)"; doProjection();
    ImagePlus green2 = projImage;
    imp = blue;
    color = "(blue)"; doProjection();
    ImagePlus blue2 = projImage;
    int w = red2.getWidth(), h = red2.getHeight(), d = red2.getStackSize();
    if (method==SD_METHOD) {
        ImageProcessor r = red2.getProcessor();
        ImageProcessor g = green2.getProcessor();
        ImageProcessor b = blue2.getProcessor();
        double max = 0;
        double rmax = r.getStatistics().max; if (rmax>max) max=rmax;
        double gmax = g.getStatistics().max; if (gmax>max) max=gmax;
        double bmax = b.getStatistics().max; if (bmax>max) max=bmax;
        double scale = 255/max;
        r.multiply(scale); g.multiply(scale); b.multiply(scale);
        red2.setProcessor(r.convertToByte(false));
        green2.setProcessor(g.convertToByte(false));
        blue2.setProcessor(b.convertToByte(false));
    }
    RGBStackMerge merge = new RGBStackMerge();
    ImageStack stack2 = merge.mergeStacks(w, h, d, red2.getStack(), green2.getStack(), blue2.getStack(), true);
    imp = saveImp;
    projImage = new ImagePlus("Test", stack2);
}
 
开发者ID:biocompibens,项目名称:SME,代码行数:37,代码来源:SME_ENS_Projection_COLOURS.java

示例2: doRGBProjection

import ij.plugin.RGBStackMerge; //导入依赖的package包/类
private void doRGBProjection(ImageStack stack) {
      ImageStack[] channels = ChannelSplitter.splitRGB(stack, true);
      ImagePlus red = new ImagePlus("Red", channels[0]);
      ImagePlus green = new ImagePlus("Green", channels[1]);
      ImagePlus blue = new ImagePlus("Blue", channels[2]);
      imp.unlock();
      ImagePlus saveImp = imp;
      imp = red;
color = "(red)"; doProjection();
ImagePlus red2 = projImage;
      imp = green;
color = "(green)"; doProjection();
ImagePlus green2 = projImage;
      imp = blue;
color = "(blue)"; doProjection();
ImagePlus blue2 = projImage;
      int w = red2.getWidth(), h = red2.getHeight(), d = red2.getStackSize();
      if (method==SD_METHOD) {
      	ImageProcessor r = red2.getProcessor();
      	ImageProcessor g = green2.getProcessor();
      	ImageProcessor b = blue2.getProcessor();
      	double max = 0;
      	double rmax = r.getStatistics().max; if (rmax>max) max=rmax;
      	double gmax = g.getStatistics().max; if (gmax>max) max=gmax;
      	double bmax = b.getStatistics().max; if (bmax>max) max=bmax;
      	double scale = 255/max;
      	r.multiply(scale); g.multiply(scale); b.multiply(scale);
      	red2.setProcessor(r.convertToByte(false));
      	green2.setProcessor(g.convertToByte(false));
      	blue2.setProcessor(b.convertToByte(false));
      }
      RGBStackMerge merge = new RGBStackMerge();
      ImageStack stack2 = merge.mergeStacks(w, h, d, red2.getStack(), green2.getStack(), blue2.getStack(), true);
      imp = saveImp;
      projImage = new ImagePlus(makeTitle(), stack2);
  }
 
开发者ID:biocompibens,项目名称:SME,代码行数:37,代码来源:ZProjector.java


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