gpt4 book ai didi

ij.plugin.ZProjector.doProjection()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-15 03:41:31 27 4
gpt4 key购买 nike

本文整理了Java中ij.plugin.ZProjector.doProjection()方法的一些代码示例,展示了ZProjector.doProjection()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZProjector.doProjection()方法的具体详情如下:
包路径:ij.plugin.ZProjector
类名称:ZProjector
方法名:doProjection

ZProjector.doProjection介绍

[英]Performs actual projection using specified method.
[中]使用指定的方法执行实际投影。

代码示例

代码示例来源:origin: net.imagej/ij

/** Performs projection using the specified method and stack range, and returns
   the result, where 'method' is "avg", "min", "max", "sum", "sd" or "median".
  Add " all" to 'method' to project all hyperstack time points. <br>
  Example: http://imagej.nih.gov/ij/macros/js/ProjectionDemo.js
*/
 public static ImagePlus run(ImagePlus imp, String method, int startSlice, int stopSlice) {
  ZProjector zp = new ZProjector(imp);
  zp.setStartSlice(startSlice);
  zp.setStopSlice(stopSlice);
  zp.isHyperstack = imp.isHyperStack();
  if (zp.isHyperstack && startSlice==1 && stopSlice==imp.getStackSize())
    zp.setDefaultBounds();
  if (method==null) return null;
  method = method.toLowerCase();
  int m = -1;
  if (method.startsWith("av")) m = AVG_METHOD;
  else if (method.startsWith("max")) m = MAX_METHOD;
  else if (method.startsWith("min")) m = MIN_METHOD;
  else if (method.startsWith("sum")) m = SUM_METHOD;
  else if (method.startsWith("sd")) m = SD_METHOD;
  else if (method.startsWith("median")) m = MEDIAN_METHOD;
  if (m<0)
    throw new IllegalArgumentException("Invalid projection method: "+method);
  zp.allTimeFrames = method.contains("all");
  zp.setMethod(m);
  zp.doProjection(true);
  return zp.getProjection();
}

代码示例来源:origin: imagej/ImageJA

/** Performs projection using the specified method and stack range, and returns
   the result, where 'method' is "avg", "min", "max", "sum", "sd" or "median".
  Add " all" to 'method' to project all hyperstack time points. <br>
  Example: http://imagej.nih.gov/ij/macros/js/ProjectionDemo.js
*/
 public static ImagePlus run(ImagePlus imp, String method, int startSlice, int stopSlice) {
  ZProjector zp = new ZProjector(imp);
  zp.setStartSlice(startSlice);
  zp.setStopSlice(stopSlice);
  zp.isHyperstack = imp.isHyperStack();
  if (zp.isHyperstack && startSlice==1 && stopSlice==imp.getStackSize())
    zp.setDefaultBounds();
  if (method==null) return null;
  method = method.toLowerCase();
  int m = -1;
  if (method.startsWith("av")) m = AVG_METHOD;
  else if (method.startsWith("max")) m = MAX_METHOD;
  else if (method.startsWith("min")) m = MIN_METHOD;
  else if (method.startsWith("sum")) m = SUM_METHOD;
  else if (method.startsWith("sd")) m = SD_METHOD;
  else if (method.startsWith("median")) m = MEDIAN_METHOD;
  if (m<0)
    throw new IllegalArgumentException("Invalid projection method: "+method);
  zp.allTimeFrames = method.contains("all");
  zp.setMethod(m);
  zp.doProjection(true);
  return zp.getProjection();
}

代码示例来源:origin: sc.fiji/Simple_Neurite_Tracer

zp.setImage(imagePlus);
zp.setMethod(ZProjector.MAX_METHOD);
zp.doProjection();
final ImagePlus overlay = zp.getProjection();

代码示例来源:origin: net.imagej/ij

/** Performs actual projection using specified method.
  If handleOverlay, adds stack overlay 
  elements from startSlice to stopSlice to projection. */
public void doProjection(boolean handleOverlay) {
  if (isHyperstack)
    doHyperStackProjection(allTimeFrames);
  else if (imp.getType()==ImagePlus.COLOR_RGB)
    doRGBProjection(handleOverlay);
  else {
    doProjection();
    Overlay overlay = imp.getOverlay();
    if (handleOverlay && overlay!=null)
      projImage.setOverlay(projectStackRois(overlay));
  }
  if (projImage!=null)
    projImage.setCalibration(imp.getCalibration());
}

代码示例来源:origin: imagej/ImageJA

/** Performs actual projection using specified method.
  If handleOverlay, adds stack overlay 
  elements from startSlice to stopSlice to projection. */
public void doProjection(boolean handleOverlay) {
  if (isHyperstack)
    doHyperStackProjection(allTimeFrames);
  else if (imp.getType()==ImagePlus.COLOR_RGB)
    doRGBProjection(handleOverlay);
  else {
    doProjection();
    Overlay overlay = imp.getOverlay();
    if (handleOverlay && overlay!=null)
      projImage.setOverlay(projectStackRois(overlay));
  }
  if (projImage!=null)
    projImage.setCalibration(imp.getCalibration());
}

代码示例来源:origin: ca.mcgill/Sholl_Analysis

private ImageProcessor projImp() {
  ImageProcessor ip;
  final ZProjector zp = new ZProjector(imp);
  zp.setMethod(ZProjector.MAX_METHOD);
  zp.setStartSlice(minZ);
  zp.setStopSlice(maxZ);
  if (imp.isComposite()) {
    zp.doHyperStackProjection(false);
    final ImagePlus projImp = zp.getProjection();
    projImp.setC(channel);
    ip = projImp.getChannelProcessor();
  } else {
    zp.doProjection();
    ip = zp.getProjection().getProcessor();
  }
  return ip;
}

代码示例来源:origin: sc.fiji/Trainable_Segmentation

zp.doProjection();
resultStack.addSlice(availableFeatures[GABOR] + "_" + i 
    +"_"+sigma+"_" + gamma + "_"+ (int) (psi / (Math.PI/4) ) +"_"+frequency,

代码示例来源:origin: fiji/Trainable_Segmentation

zp.doProjection();
resultStack.addSlice(availableFeatures[GABOR] + "_" + i 
    +"_"+sigma+"_" + gamma + "_"+ (int) (psi / (Math.PI/4) ) +"_"+frequency,

代码示例来源:origin: net.imagej/ij

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();

代码示例来源:origin: imagej/ImageJA

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();

代码示例来源:origin: fiji/Trainable_Segmentation

for (int i=0;i<6; i++){
  zp.setMethod(i);
  zp.doProjection();
  membraneStack.addSlice(availableFeatures[MEMBRANE] + "_" +i+"_"+patchSize+"_"+membraneSize, zp.getProjection().getChannelProcessor());

代码示例来源:origin: sc.fiji/Trainable_Segmentation

for (int i=0;i<6; i++){
  zp.setMethod(i);
  zp.doProjection();
  membraneStack.addSlice(availableFeatures[MEMBRANE] + "_" +i+"_"+patchSize+"_"+membraneSize, zp.getProjection().getChannelProcessor());

代码示例来源:origin: fiji/Trainable_Segmentation

for (int i=0;i<6; i++){
  zp.setMethod(i);
  zp.doProjection();
  membraneStack.addSlice(availableFeatures[MEMBRANE] + "_" +i+"_"+patchSize+"_"+membraneSize, zp.getProjection().getChannelProcessor());

代码示例来源:origin: sc.fiji/Trainable_Segmentation

for (int i=0;i<6; i++){
  zp.setMethod(i);
  zp.doProjection();
  membraneStack.addSlice(availableFeatures[MEMBRANE] + "_" +i+"_"+patchSize+"_"+membraneSize, zp.getProjection().getChannelProcessor());

代码示例来源:origin: imagej/ImageJA

if (isHyperstack)
  allTimeFrames = imp.getNFrames()>1&&imp.getNSlices()>1?gd.getNextBoolean():false;
doProjection(true);

代码示例来源:origin: net.imagej/ij

if (isHyperstack)
  allTimeFrames = imp.getNFrames()>1&&imp.getNSlices()>1?gd.getNextBoolean():false;
doProjection(true);

代码示例来源:origin: imagej/ImageJA

doHSRGBProjection(imp);
else
  doProjection();
stack.addSlice(null, projImage.getProcessor());

代码示例来源:origin: net.imagej/ij

doHSRGBProjection(imp);
else
  doProjection();
stack.addSlice(null, projImage.getProcessor());

代码示例来源:origin: sc.fiji/Image_5D

zp.setStopSlice(stopSlice);
zp.setMethod(method);
zp.doProjection();
final ImagePlus proj = zp.getProjection();

代码示例来源:origin: sc.fiji/Image_5D

zp.setStopSlice(stopSlice);
zp.setMethod(method);
zp.doProjection();
final ImagePlus proj = zp.getProjection();
if (bDoScaling) {

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com