private boolean showDialog() { GenericDialog gd = new GenericDialog("3D Gaussian Blur"); gd.addNumericField("X sigma:", xsigma, 1); gd.addNumericField("Y sigma:", ysigma, 1); gd.addNumericField("Z sigma:", zsigma, 1); gd.showDialog(); if (gd.wasCanceled()) return false; xsigma = gd.getNextNumber(); ysigma = gd.getNextNumber(); zsigma = gd.getNextNumber(); return true; }
/** Builds dialog to query users for projection parameters. @param start starting slice to display @param stop last slice */ protected GenericDialog buildControlDialog(int start, int stop) { GenericDialog gd = new GenericDialog("ZProjection"); gd.addNumericField("Start slice:",startSlice,0/*digits*/); gd.addNumericField("Stop slice:",stopSlice,0/*digits*/); gd.addChoice("Projection type", METHODS, METHODS[method]); if (isHyperstack && imp.getNFrames()>1&& imp.getNSlices()>1) gd.addCheckbox("All time frames", allTimeFrames); return gd; }
void getValue (String title, String prompt, double defaultValue, int digits) { int places = Analyzer.getPrecision(); if (digits>0 || (int)defaultValue!=defaultValue) digits = Math.max(places, 1); gd = new GenericDialog(title); gd.addNumericField(prompt, defaultValue, digits, 8, null); gd.addPreviewCheckbox(pfr); gd.addDialogListener(this); gd.showDialog(); }
protected static double[] getAdvancedDoGParameters( final double defaultSigma, final double defaultThreshold ) { final GenericDialog gd = new GenericDialog( "Select Difference-of-Gaussian parameters" ); gd.addNumericField( "Detection_sigma (approx. radius)", defaultSigma, 4 ); gd.addNumericField( "Threshold", defaultThreshold, 4 ); gd.showDialog(); if ( gd.wasCanceled() ) return null; else return new double[]{ gd.getNextNumber(), gd.getNextNumber() }; }
void getValue (String title, String prompt, double defaultValue, int digits) { int places = Analyzer.getPrecision(); if (digits>0 || (int)defaultValue!=defaultValue) digits = Math.max(places, 1); gd = new GenericDialog(title); gd.addNumericField(prompt, defaultValue, digits, 8, null); gd.addPreviewCheckbox(pfr); gd.addDialogListener(this); gd.showDialog(); }
/** Builds dialog to query users for projection parameters. @param start starting slice to display @param stop last slice */ protected GenericDialog buildControlDialog(int start, int stop) { GenericDialog gd = new GenericDialog("ZProjection"); gd.addNumericField("Start slice:",startSlice,0/*digits*/); gd.addNumericField("Stop slice:",stopSlice,0/*digits*/); gd.addChoice("Projection type", METHODS, METHODS[method]); if (isHyperstack && imp.getNFrames()>1&& imp.getNSlices()>1) gd.addCheckbox("All time frames", allTimeFrames); return gd; }
private boolean showDialog(String name) { GenericDialog gd = new GenericDialog(name); gd.addNumericField("X radius:", xradius, 1); gd.addNumericField("Y radius:", yradius, 1); gd.addNumericField("Z radius:", zradius, 1); gd.showDialog(); if (gd.wasCanceled()) { return false; } xradius = (float) gd.getNextNumber(); yradius = (float) gd.getNextNumber(); zradius = (float) gd.getNextNumber(); return true; }
private boolean showDialog() { GenericDialog gd = new GenericDialog("3D Gaussian Blur"); gd.addNumericField("X sigma:", xsigma, 1); gd.addNumericField("Y sigma:", ysigma, 1); gd.addNumericField("Z sigma:", zsigma, 1); gd.showDialog(); if (gd.wasCanceled()) return false; xsigma = gd.getNextNumber(); ysigma = gd.getNextNumber(); zsigma = gd.getNextNumber(); return true; }
private boolean showDialog(String name) { GenericDialog gd = new GenericDialog(name); gd.addNumericField("X radius:", xradius, 1); gd.addNumericField("Y radius:", yradius, 1); gd.addNumericField("Z radius:", zradius, 1); gd.showDialog(); if (gd.wasCanceled()) { return false; } xradius = (float) gd.getNextNumber(); yradius = (float) gd.getNextNumber(); zradius = (float) gd.getNextNumber(); return true; }
public boolean showDialogAskBaseline() { GenericDialog gd = new GenericDialog("Bleach Correction"); gd.addNumericField("Background Intensity", baselineInt, 1) ; gd.showDialog(); if (gd.wasCanceled()) return false; baselineInt = gd.getNextNumber(); return true; }
public boolean showDialog() { GenericDialog gd = new GenericDialog("Scale Selection"); gd.addNumericField("X scale factor:", defaultXScale, 2, 3, ""); gd.addNumericField("Y scale factor:", defaultYScale, 2, 3, ""); gd.addCheckbox("Centered", false); gd.showDialog(); if (gd.wasCanceled()) return false; xscale = gd.getNextNumber(); yscale = gd.getNextNumber(); centered = gd.getNextBoolean(); return true; }
@Override public void run(ImageProcessor ip) { GenericDialog gd = new GenericDialog("Replace value"); gd.addNumericField("Pattern: [0..255] ", 0, 0); gd.addNumericField("Replacement: [0.255] ", 0, 0); gd.showDialog(); if(gd.wasCanceled()) return; doit((int)gd.getNextNumber(), (int)gd.getNextNumber()); }
protected boolean getDebug() { if ( debugMode ) { GenericDialog gdDebug = new GenericDialog( "Debug options" ); gdDebug.addNumericField( "Show debug output every n'th frame, n = ", defaultDebugInterval, 0 ); gdDebug.showDialog(); if ( gdDebug.wasCanceled() ) return false; defaultDebugInterval = debugInterval = (int)Math.round( gdDebug.getNextNumber() ); } return true; }
public boolean showDialog() { GenericDialog gd = new GenericDialog("Scale Selection"); gd.addNumericField("X scale factor:", defaultXScale, 2, 3, ""); gd.addNumericField("Y scale factor:", defaultYScale, 2, 3, ""); gd.addCheckbox("Centered", false); gd.showDialog(); if (gd.wasCanceled()) return false; xscale = gd.getNextNumber(); yscale = gd.getNextNumber(); centered = gd.getNextBoolean(); return true; }
private boolean showDialog() { GenericDialog gd = new GenericDialog("RATS"); gd.addNumericField("Noise Threshold:", sigma, 0); gd.addNumericField("Lambda Factor:", lambda, 0); gd.addNumericField("Min Leaf Size (pixels):", minSzPx[0], 0); gd.addCheckbox("Verbose", bVerbose); gd.showDialog(); if (gd.wasCanceled()) {return false;} sigma = gd.getNextNumber(); lambda = gd.getNextNumber(); minSzPx[0] = gd.getNextNumber(); minSzPx[1] = minSzPx[0]; bVerbose = gd.getNextBoolean(); return true; }//showDialog
public boolean params() { GenericDialog gd = new GenericDialog("Nonlinear diffusion", imp.getWindow()); gd.addNumericField("lambda", lambda, 2); gd.addNumericField("iterations", (float) iterations, 0); gd.addNumericField("k", k, 2); gd.showDialog(); if (gd.wasCanceled()) return false; lambda = (float) gd.getNextNumber(); iterations = (int) gd.getNextNumber(); k = (float) gd.getNextNumber(); return true; } public void compute()
public boolean params(ImagePlus imp, VolumeFloat v) { this.v = v; GenericDialog gd = new GenericDialog("3D diffusion", imp.getWindow()); gd.addNumericField("lambda", lambda, 2); gd.addNumericField("iterations", (double) iterations, 0); gd.addNumericField("k", k, 2); gd.showDialog(); if (gd.wasCanceled()) return false; lambda = gd.getNextNumber(); iterations = (int) gd.getNextNumber(); k = gd.getNextNumber(); return true; } public void compute3D()
public void run(ImageProcessor ip) { int current = image.getCurrentSlice(); GenericDialog gd = new GenericDialog("Delete Frame"); gd.addNumericField("Slice", current, 0); gd.addNumericField("Number of slices", DEF_NUM_SLICES, 0); gd.showDialog(); if(gd.wasCanceled()) return; int slice = (int)gd.getNextNumber(); int num = (int)gd.getNextNumber(); deleteFrames(image, slice, num); }
boolean showDialog() { GenericDialog gd = new GenericDialog("Kuwahara Filter"); gd.addNumericField("Sampling window width (must be odd):", size, 0, 3, ""); if (isRGB) gd.addCheckbox("Filter all 3 channels (slower)", filterRGB); gd.showDialog(); if (gd.wasCanceled()) return false; size = (int) gd.getNextNumber(); if ((size&1)!=1) size--; if (size<3) size = 3; if (isRGB) filterRGB = gd.getNextBoolean(); return true; }
public void run(ImageProcessor ip) { int current = image.getCurrentSlice(); GenericDialog gd = new GenericDialog("Duplicate Frame"); gd.addNumericField("Slice number", current, 0); gd.addNumericField("Number of slices", DEF_NUM_SLICES, 0); gd.showDialog(); if(gd.wasCanceled()) return; int slice = (int)gd.getNextNumber(); int num = (int)gd.getNextNumber(); duplicateFrames(image, slice, num); }