void showAngleDialog() { GenericDialog gd = new GenericDialog("Angle Tool"); gd.addCheckbox("Measure reflex angle", Prefs.reflexAngle); gd.showDialog(); if (!gd.wasCanceled()) Prefs.reflexAngle = gd.getNextBoolean(); }
private void createSettingsDialog(final String[] titles) { settingsDialog = new GenericDialog("Watershed from markers"); settingsDialog.addChoice("Seeds", titles, titles[0]); settingsDialog.addCheckbox("Show class indices", showIndices); settingsDialog.addCheckbox("Show mean intensities", showIntensities); settingsDialog.addCheckbox("Show results table", showResults); settingsDialog.addHelp("http://imagej.net/3D_Binary_Filters"); }
/** 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; }
public GenericDialog showDialog() { // Create a new generic dialog with appropriate options GenericDialog gd = new GenericDialog("Set Label Map"); gd.addChoice("Colormap", CommonLabelMaps.getAllLabels(), CommonLabelMaps.GOLDEN_ANGLE.getLabel()); gd.addChoice("Background", CommonColors.getAllLabels(), CommonColors.WHITE.toString()); gd.addCheckbox("Shuffle", true); gd.addPreviewCheckbox(null); gd.addDialogListener(this); parseDialogParameters(gd); gd.showDialog(); return gd; }
void showAngleDialog() { GenericDialog gd = new GenericDialog("Angle Tool"); gd.addCheckbox("Measure reflex angle", Prefs.reflexAngle); gd.showDialog(); if (!gd.wasCanceled()) Prefs.reflexAngle = gd.getNextBoolean(); }
/** 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; }
static public void debugDialog() { // note: all this could nicely be done using reflection, so adding another boolean variable would be automatically added here (filtering by the prefix "debug"). final GenericDialog gd = new GenericDialog("Debug:"); gd.addCheckbox("debug", debug); gd.addCheckbox("debug mouse", debug_mouse); gd.addCheckbox("debug sql", debug_sql); gd.addCheckbox("debug event", debug_event); gd.addCheckbox("debug clip", debug_clip); gd.addCheckbox("debug thing", debug_thing); gd.showDialog(); if (gd.wasCanceled()) { return; } debug = gd.getNextBoolean(); debug_mouse = gd.getNextBoolean(); debug_sql = gd.getNextBoolean(); debug_event = gd.getNextBoolean(); debug_clip = gd.getNextBoolean(); debug_thing = gd.getNextBoolean(); }
@Override public void run( String arg0 ) { final GenericDialog gd = new GenericDialog( "Toggle Cluster Processing Options" ); gd.addCheckbox( "Display_Cluster Processing Options", displayClusterProcessing ); gd.showDialog(); if ( gd.wasCanceled() ) return; displayClusterProcessing = gd.getNextBoolean(); IOFunctions.println( "Cluster processing option: " + ( displayClusterProcessing ? "ON" : "OFF" ) ); } }
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; }
boolean showDialog() { GenericDialog gd = new GenericDialog("Surface Plotter"); gd.addNumericField("Polygon Multiplier (10-200%):", polygonMultiplier, 0); gd.addCheckbox("Draw_Wireframe", showWireframe); gd.addCheckbox("Shade", showGrayscale); gd.addCheckbox("Draw_Axis", showAxis); gd.addCheckbox("Source Background is Lighter", whiteBackground); gd.addCheckbox("Fill Plot Background with Black", blackFill); gd.addCheckbox("One Polygon Per Line", oneToOne); gd.addCheckbox("Smooth", smooth); gd.showDialog(); if (gd.wasCanceled()) return false; showWireframe = gd.getNextBoolean(); showGrayscale = gd.getNextBoolean(); showAxis = gd.getNextBoolean(); whiteBackground = gd.getNextBoolean(); blackFill = gd.getNextBoolean();
/** * Display the generic dialog for this plugin. Called by the * {@link #run(String)} method when the plugin is launched from the ImageJ * menu. * * @return a boolean, which is false if the cancel button was pressed, true * otherwise */ private boolean showDialog() { /* * Create and display generic dialog */ final GenericDialog gd = new GenericDialog("Dynamic Reslice"); gd.addCheckbox("Flip Vertically", flip); gd.addCheckbox("Rotate 90 Degrees", rotate); gd.showDialog(); if (gd.wasCanceled()) return false; /* * Collect from generic dialog */ flip = gd.getNextBoolean(); rotate = gd.getNextBoolean(); return true; }
void dicom() { GenericDialog gd = new GenericDialog("DICOM Options"); gd.addCheckbox("Open as 32-bit float", Prefs.openDicomsAsFloat); gd.addCheckbox("Ignore Rescale Slope", Prefs.ignoreRescaleSlope); gd.addMessage("Orthogonal Views"); gd.setInsets(5, 40, 0); gd.addCheckbox("Rotate YZ", Prefs.rotateYZ); gd.setInsets(0, 40, 0); gd.addCheckbox("Flip XZ", Prefs.flipXZ); gd.showDialog(); if (gd.wasCanceled()) return; Prefs.openDicomsAsFloat = gd.getNextBoolean(); Prefs.ignoreRescaleSlope = gd.getNextBoolean(); Prefs.rotateYZ = gd.getNextBoolean(); Prefs.flipXZ = gd.getNextBoolean(); }
boolean showDialog() { GenericDialog gd = new GenericDialog("Surface Plotter"); gd.addNumericField("Polygon Multiplier (10-200%):", polygonMultiplier, 0); gd.addCheckbox("Draw_Wireframe", showWireframe); gd.addCheckbox("Shade", showGrayscale); gd.addCheckbox("Draw_Axis", showAxis); gd.addCheckbox("Source Background is Lighter", whiteBackground); gd.addCheckbox("Fill Plot Background with Black", blackFill); gd.addCheckbox("One Polygon Per Line", oneToOne); gd.addCheckbox("Smooth", smooth); gd.showDialog(); if (gd.wasCanceled()) return false; showWireframe = gd.getNextBoolean(); showGrayscale = gd.getNextBoolean(); showAxis = gd.getNextBoolean(); whiteBackground = gd.getNextBoolean(); blackFill = gd.getNextBoolean();
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; }
void dicom() { GenericDialog gd = new GenericDialog("DICOM Options"); gd.addCheckbox("Open as 32-bit float", Prefs.openDicomsAsFloat); gd.addCheckbox("Ignore Rescale Slope", Prefs.ignoreRescaleSlope); gd.addMessage("Orthogonal Views"); gd.setInsets(5, 40, 0); gd.addCheckbox("Rotate YZ", Prefs.rotateYZ); gd.setInsets(0, 40, 0); gd.addCheckbox("Flip XZ", Prefs.flipXZ); gd.showDialog(); if (gd.wasCanceled()) return; Prefs.openDicomsAsFloat = gd.getNextBoolean(); Prefs.ignoreRescaleSlope = gd.getNextBoolean(); Prefs.rotateYZ = gd.getNextBoolean(); Prefs.flipXZ = gd.getNextBoolean(); }
@Override protected boolean setAdvancedValues() { final GenericDialog gd = new GenericDialog( "Advanced values" ); gd.addNumericField( "Sigma", defaultSigma, 5 ); gd.addNumericField( "Threshold", defaultThreshold, 5 ); gd.addCheckbox( "Find_minima", defaultFindMin ); gd.addCheckbox( "Find_maxima", defaultFindMax ); gd.showDialog(); if ( gd.wasCanceled() ) return false; this.sigma = defaultSigma = gd.getNextNumber(); this.threshold = defaultThreshold = gd.getNextNumber(); this.findMin = defaultFindMin = gd.getNextBoolean(); this.findMax = defaultFindMax = gd.getNextBoolean(); 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; }
public boolean showDialog() { GenericDialog gd = new GenericDialog("De-Interleaver"); gd.addNumericField("How many channels?", nChannels, 0); gd.addCheckbox("Keep source stack", keep); gd.showDialog(); if (gd.wasCanceled()) return false; nChannels = (int) gd.getNextNumber(); keep = gd.getNextBoolean(); Prefs.set("Deint_ch.int", nChannels); Prefs.set("Deint_keep.boolean", keep); return true; }
@Override protected boolean setAdvancedValues() { final GenericDialog gd = new GenericDialog( "Advanced values" ); gd.addNumericField( "Radius_1", defaultRadius1, 0 ); gd.addNumericField( "Radius_2", defaultRadius2, 0 ); gd.addNumericField( "Threshold", defaultThreshold, 4 ); gd.addCheckbox( "Find_minima", defaultFindMin ); gd.addCheckbox( "Find_maxima", defaultFindMax ); gd.showDialog(); if ( gd.wasCanceled() ) return false; this.radius1 = defaultRadius1 = (int)Math.round( gd.getNextNumber() ); this.radius2 = defaultRadius2 = (int)Math.round( gd.getNextNumber() ); this.threshold = defaultThreshold = gd.getNextNumber(); this.findMin = defaultFindMin = gd.getNextBoolean(); this.findMax = defaultFindMax = 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