Refine search
public int setup(String arg, ImagePlus imp) { this.arg = arg; this.imp = imp; if (imp!=null && imp.getStackSize()>1 && arg.equals("demo")) {IJ.error("This demo does not work with stacks."); return DONE;} return IJ.setupDialog(imp, DOES_ALL+SUPPORTS_MASKING); }
public int setup(String arg, ImagePlus imp) { this.arg = arg; this.imp = imp; if (imp!=null && imp.getStackSize()>1 && arg.equals("demo")) {IJ.error("This demo does not work with stacks."); return DONE;} return IJ.setupDialog(imp, DOES_ALL+SUPPORTS_MASKING); }
@Override public void run(String foo) { ImagePlus currentImage = WindowManager.getCurrentImage(); if( currentImage == null ) { IJ.error( "There's no current image to crop." ); return; } if( currentImage.getStackSize() <= 1 ) { IJ.error( "This plugin is only for image stacks of more than one slice." ); return; } if( currentImage.getType() != ImagePlus.GRAY8 ) { IJ.error("This plugin only works on 8 bit images at the moment."); return; } threePaneContainer = new ThreePaneContainer( currentImage ); }
public void run(String arg) { ImagePlus imp = IJ.getImage(); if (imp.getStackSize()==1) { IJ.error("Flip Z", "This command requires a stack"); return; } if (imp.isHyperStack()) { IJ.error("Flip Z", "This command does not currently work with hyperstacks."); return; } flipStack(imp); }
public void run(String arg) { ImagePlus imp = IJ.getImage(); if (imp.getStackSize()==1) { IJ.error("Flip Z", "This command requires a stack"); return; } if (imp.isHyperStack()) { IJ.error("Flip Z", "This command does not currently work with hyperstacks."); return; } flipStack(imp); }
public int setup(String arg, ImagePlus imp) { this.imp = imp; if (imp==null) {IJ.noImage(); return DONE;} stackSize = imp.getStackSize(); if (imp.getProperty("FHT")!=null) { IJ.error("FFT Custom Filter", "Spatial domain (non-FFT) image required"); return DONE; } else return processStack?DOES_ALL+DOES_STACKS:DOES_ALL; }
public int setup(String arg, ImagePlus imp) { this.imp = imp; if (imp==null) {IJ.noImage(); return DONE;} stackSize = imp.getStackSize(); if (imp.getProperty("FHT")!=null) { IJ.error("FFT Custom Filter", "Spatial domain (non-FFT) image required"); return DONE; } else return processStack?DOES_ALL+DOES_STACKS:DOES_ALL; }
public void checkMemory( ImagePlus imagePlus, int memoryMultipleNeeded ) { long sizeOfImagePlus = imagePlus.getWidth() * imagePlus.getHeight() * imagePlus.getStackSize() * ( imagePlus.getBitDepth() / 8 ); long bytesNeededEstimate = (memoryMultipleNeeded + 1) * sizeOfImagePlus; System.gc(); long maxMemory = Runtime.getRuntime().maxMemory(); if( bytesNeededEstimate > maxMemory ) { IJ.error("Warning", "It looks as if the amount of memory required for the " + "three pane view (" + (bytesNeededEstimate / (1024 * 1024)) + "MiB) exceeds the maximum memory available (" + (maxMemory / (1024 * 1024)) + "MiB)"); } }
public int setup(String arg, ImagePlus imp) { this.arg = arg; this.imp = imp; if (imp==null) {IJ.noImage(); return DONE;} stackSize = imp.getStackSize(); fht = (FHT)imp.getProperty("FHT"); if (fht!=null) { IJ.error("FFT Filter", "Spatial domain image required"); return DONE; } if (!showBandpassDialog(imp)) return DONE; else return processStack?DOES_ALL+DOES_STACKS+PARALLELIZE_STACKS:DOES_ALL; }
public int setup(String arg, ImagePlus imp) { this.arg = arg; this.imp = imp; if (imp==null) {IJ.noImage(); return DONE;} stackSize = imp.getStackSize(); fht = (FHT)imp.getProperty("FHT"); if (fht!=null) { IJ.error("FFT Filter", "Spatial domain image required"); return DONE; } if (!showBandpassDialog(imp)) return DONE; else return processStack?DOES_ALL+DOES_STACKS+PARALLELIZE_STACKS:DOES_ALL; }
private void removeStackLabels() { ImagePlus imp = IJ.getImage(); int size = imp.getStackSize(); if (size==1) IJ.error("Stack required"); else { ImageStack stack = imp.getStack(); for (int i=1; i<=size; i++) stack.setSliceLabel(null, i); imp.repaintWindow(); } }
private void removeStackLabels() { ImagePlus imp = IJ.getImage(); int size = imp.getStackSize(); if (size==1) IJ.error("Stack required"); else { ImageStack stack = imp.getStack(); for (int i=1; i<=size; i++) stack.setSliceLabel(null, i); imp.repaintWindow(); } }
@Override public void run(final String arg0) { final ImagePlus image = IJ.getImage(); if (image == null) { IJ.error("No current image for automatic tracing."); return; } final long width = image.getWidth(); final long height = image.getHeight(); final long depth = image.getStackSize(); final long pointsInImage = width * height * depth; if (pointsInImage >= Integer.MAX_VALUE) { IJ.error("This plugin currently only works with images with less that " + Integer.MAX_VALUE + " points."); return; } final String macroOptions = Macro.getOptions(); if (macroOptions != null) { final String liveValue = Macro.getValue(macroOptions, "live", ""); final String lower = liveValue.toLowerCase(); if (lower.length() > 0 && (lower.equals("no") || lower.equals("f") || lower.equals("false") || lower.equals("n"))) liveDisplay = false; } single_pane = true; if (liveDisplay) { initialize(image); canvas = (AutoTracerCanvas) xy_canvas; } autoTrace(image); }
public void run(String arg) { imp = IJ.getImage(); if (imp.getStackSize()<2) { IJ.error("ZAxisProfiler", "This command requires a stack."); return; } isPlotMaker = true; Plot plot = getPlot(); if (plot!=null) { if (isPlotMaker) plot.setPlotMaker(this); plot.show(); } }
public void showPoint(BenesNamedPoint p) { if(imp.getWindow() == null) return; if(!p.set){ IJ.error("Point is not set yet"); return; } int slice = (int)(p.z / cal.pixelDepth); if(slice < 0) slice = 0; if(slice > imp.getStackSize()) slice = imp.getStackSize()-1; imp.setSlice(slice+1); Roi roi = new PointRoi((int)(p.x / cal.pixelWidth), (int)(p.y / cal.pixelHeight), imp); imp.setRoi(roi); }
public void run(String arg) { imp = IJ.getImage(); if (imp.getStackSize()<2) { IJ.error("ZAxisProfiler", "This command requires a stack."); return; } isPlotMaker = true; Plot plot = getPlot(); if (plot!=null) { if (isPlotMaker) plot.setPlotMaker(this); plot.show(); } }
public void run(String args) { ImagePlus imagePlus = IJ.getImage(); if (imagePlus.getStackSize() == 1) { IJ.error("Requires a Stack"); return; } ResultsTable table = new BoundingBox3D().computeTable(imagePlus); // create string for indexing results String tableName = imagePlus.getShortTitle() + "-bbox"; // show result table.show(tableName); }
/** * Main method, called when the plugin is launched from ImageJ menu. */ @Override public void run(final String arg) { if (imp == null) { IJ.noImage(); return; } final int stackSize = imp.getStackSize(); final Roi roi = imp.getRoi(); final int roiType = roi != null ? roi.getType() : 0; // stack required except for ROI = none or RECT if (stackSize < 2 && roi != null && roiType != Roi.RECTANGLE) { IJ.error("Dynamic Reslice...", "Stack required"); return; } // permissible ROI types: none,*LINE if (roi == null || (roiType != Roi.LINE && roiType != Roi.POLYLINE && roiType != Roi.FREELINE)) { IJ.error("Dynamic Reslice...", "Line selection required"); return; } // Show dialog (and quit if it was canceled). setup(); if (!showDialog()) return; start(); }
return; ImagePlus imp = IJ.getImage(); if (imp.isComposite() && imp.getNChannels()==imp.getStackSize()) { IJ.error(name, "Composite color images not supported"); return; imp.startTiming(); run(imp, filter, xradius, yradius, zradius); IJ.showTime(imp, imp.getStartTime(), "", imp.getStackSize());
public void run(String arg) { ImagePlus imp = IJ.getImage(); if (imp.isComposite() && imp.getNChannels()==imp.getStackSize()) { IJ.error("3D Gaussian Blur", "Composite color images not supported"); return; } if (!showDialog()) return; imp.startTiming(); blur(imp, xsigma, ysigma, zsigma); IJ.showTime(imp, imp.getStartTime(), "", imp.getStackSize()); }