public ImagePlus run(String params, ImagePlus img1, ImagePlus img2) { if (img1==null || img2==null || params==null) return null; operator = getOperator(params); if (operator==-1) throw new IllegalArgumentException("No valid operator"); createWindow = params.indexOf("create")!=-1; floatResult= params.indexOf("32")!=-1 || params.indexOf("float")!=-1; processStack = params.indexOf("stack")!=-1; return calculate(img1, img2, true); }
public ImagePlus run(String params, ImagePlus img1, ImagePlus img2) { if (img1==null || img2==null || params==null) return null; operator = getOperator(params); if (operator==-1) throw new IllegalArgumentException("No valid operator"); createWindow = params.indexOf("create")!=-1; floatResult= params.indexOf("32")!=-1 || params.indexOf("float")!=-1; processStack = params.indexOf("stack")!=-1; return calculate(img1, img2, true); }
/** * @deprecated * replaced by run(String,ImagePlus,ImagePlus) */ public void calculate(String params, ImagePlus img1, ImagePlus img2) { if (img1==null || img2==null || params==null) return; operator = getOperator(params); if (operator==-1) {IJ.error("Image Calculator", "No valid operator"); return;} createWindow = params.indexOf("create")!=-1; floatResult= params.indexOf("32")!=-1 || params.indexOf("float")!=-1; processStack = params.indexOf("stack")!=-1; ImagePlus img3 = calculate(img1, img2, true); if (img3!=null) img3.show(); }
/** * @deprecated * replaced by run(String,ImagePlus,ImagePlus) */ public void calculate(String params, ImagePlus img1, ImagePlus img2) { if (img1==null || img2==null || params==null) return; operator = getOperator(params); if (operator==-1) {IJ.error("Image Calculator", "No valid operator"); return;} createWindow = params.indexOf("create")!=-1; floatResult= params.indexOf("32")!=-1 || params.indexOf("float")!=-1; processStack = params.indexOf("stack")!=-1; ImagePlus img3 = calculate(img1, img2, true); if (img3!=null) img3.show(); }
void imageCalculator() { String operator = getFirstString(); interp.getComma(); ImagePlus img1 = getImageArg(); interp.getComma(); ImagePlus img2 = getImageArg(); interp.getRightParen(); ImageCalculator ic = new ImageCalculator(); ic.calculate(operator, img1, img2); resetImage(); }
void imageCalculator() { String operator = getFirstString(); interp.getComma(); ImagePlus img1 = getImageArg(); interp.getComma(); ImagePlus img2 = getImageArg(); interp.getRightParen(); ImageCalculator ic = new ImageCalculator(); ic.calculate(operator, img1, img2); resetImage(); }
iCalc.calculate("Subtract stack", imagePlus, newImagePlus);
ImagePlus img1 = WindowManager.getImage(wList[index1]); ImagePlus img2 = WindowManager.getImage(wList[index2]); ImagePlus img3 = calculate(img1, img2, false); if (img3!=null) img3.show();
ImagePlus img1 = WindowManager.getImage(wList[index1]); ImagePlus img2 = WindowManager.getImage(wList[index2]); ImagePlus img3 = calculate(img1, img2, false); if (img3!=null) img3.show();