public static final void addHyperLink( final GenericDialog gd, final String msg, final String url ) { gd.addMessage( msg, new Font( Font.SANS_SERIF, Font.ITALIC + Font.BOLD, 12 ) ); MultiLineLabel text = (MultiLineLabel) gd.getMessage(); GUIHelper.addHyperLinkListener( text, url ); }
public static final void addPreibischLabWebsite( final GenericDialog gd ) { gd.addMessage( "This software is developed by the Preibisch Lab in collaboration with the ImgLib2 and Fiji team\nhttp://preibischlab.mdc-berlin.de/", new Font( Font.SANS_SERIF, Font.BOLD, 12 ) ); MultiLineLabel text = (MultiLineLabel) gd.getMessage(); GUIHelper.addHyperLinkListener( text, "http://preibischlab.github.io/preibisch-labsite" ); }
public static void update() { if (gd!=null && gd.isShowing()) { Vector choices = gd.getChoices(); if (choices==null || choices.size()<4) return; Choice counterChoice = (Choice)choices.elementAt(3); int counter = getCounter(); int count = getCount(counter); counterChoice.select(counter); ((Label)gd.getMessage()).setText(""+count); } }
public static void update() { if (gd!=null && gd.isShowing()) { Vector choices = gd.getChoices(); if (choices==null || choices.size()<4) return; Choice counterChoice = (Choice)choices.elementAt(3); int counter = getCounter(); int count = getCount(counter); counterChoice.select(counter); ((Label)gd.getMessage()).setText(""+count); } }
public boolean dialogItemChanged(GenericDialog gd, AWTEvent e) { if (IJ.isMacOSX()) IJ.wait(100); if (slices1!=1) slices2 = gd.getNextBoolean()?slices1:1; if (frames1!=1) frames2 = gd.getNextBoolean()?frames1:1; keep = gd.getNextBoolean(); if (!IJ.isMacro()) staticKeep = keep; ((Label)gd.getMessage()).setText(getNewDimensions()); return true; }
public boolean dialogItemChanged(GenericDialog gd, AWTEvent e) { if (IJ.isMacOSX()) IJ.wait(100); if (channels1!=1) channels2 = gd.getNextBoolean()?channels1:1; if (slices1!=1) slices2 = gd.getNextBoolean()?slices1:1; if (frames1!=1) frames2 = gd.getNextBoolean()?frames1:1; keep = gd.getNextBoolean(); ((Label)gd.getMessage()).setText(getNewDimensions()); return true; }
public boolean dialogItemChanged(GenericDialog gd, AWTEvent e) { if (IJ.isMacOSX()) IJ.wait(100); if (slices1!=1) slices2 = gd.getNextBoolean()?slices1:1; if (frames1!=1) frames2 = gd.getNextBoolean()?frames1:1; keep = gd.getNextBoolean(); if (!IJ.isMacro()) staticKeep = keep; ((Label)gd.getMessage()).setText(getNewDimensions()); return true; }
public boolean dialogItemChanged(GenericDialog gd, AWTEvent e) { if (IJ.isMacOSX()) IJ.wait(100); if (channels1!=1) channels2 = gd.getNextBoolean()?channels1:1; if (slices1!=1) slices2 = gd.getNextBoolean()?slices1:1; if (frames1!=1) frames2 = gd.getNextBoolean()?frames1:1; keep = gd.getNextBoolean(); ((Label)gd.getMessage()).setText(getNewDimensions()); return true; }
if ( !PluginHelper.isHeadless() ) label1 = (Label)gd.getMessage(); gd.addMessage( "???x???x??? pixels", GUIHelper.smallStatusFont, GUIHelper.good ); if ( !PluginHelper.isHeadless() ) label2 = (Label)gd.getMessage();
final Label l1 = (Label)gd1.getMessage(); final Label l2 = (Label)gd1.getMessage();
public int showDialog(ImagePlus imp, String command, PlugInFilterRunner pfr) { ImageProcessor ip = imp.getProcessor(); ip.resetBinaryThreshold(); // remove any invisible threshold set by Make Binary or Convert to Mask thresholded = ip.getMinThreshold()!=ImageProcessor.NO_THRESHOLD; GenericDialog gd = new GenericDialog(command); int digits = (ip instanceof FloatProcessor)?2:0; String unit = (imp.getCalibration()!=null)?imp.getCalibration().getValueUnit():null; unit = (unit==null||unit.equals("Gray Value"))?":":" ("+unit+"):"; gd.addNumericField("Noise tolerance"+unit,tolerance, digits); gd.addChoice("Output type:", outputTypeNames, outputTypeNames[dialogOutputType]); gd.addCheckbox("Exclude edge maxima", excludeOnEdges); if (thresholded) gd.addCheckbox("Above lower threshold", useMinThreshold); gd.addCheckbox("Light background", lightBackground); gd.addPreviewCheckbox(pfr, "Preview point selection"); gd.addMessage(" "); //space for number of maxima messageArea = (Label)gd.getMessage(); gd.addDialogListener(this); checkboxes = gd.getCheckboxes(); previewing = true; gd.addHelp(IJ.URL+"/docs/menus/process.html#find-maxima"); gd.showDialog(); //input by the user (or macro) happens here if (gd.wasCanceled()) return DONE; previewing = false; if (!dialogItemChanged(gd, null)) //read parameters return DONE; IJ.register(this.getClass()); //protect static class variables (parameters) from garbage collection return flags; } // boolean showDialog
gd.addMessage( "This Plugin is developed by Stephan Preibisch\n" + myURL ); MultiLineLabel text = (MultiLineLabel) gd.getMessage(); addHyperLinkListener( text, myURL ); "Preibisch et al., Bioinformatics (2009), 25(11):1463-1465\n" ); text = (MultiLineLabel) gd.getMessage(); addHyperLinkListener( text, paperURL );
public int showDialog(ImagePlus imp, String command, PlugInFilterRunner pfr) { ImageProcessor ip = imp.getProcessor(); ip.resetBinaryThreshold(); // remove any invisible threshold set by Make Binary or Convert to Mask thresholded = ip.getMinThreshold()!=ImageProcessor.NO_THRESHOLD; GenericDialog gd = new GenericDialog(command); int digits = (ip instanceof FloatProcessor)?2:0; String unit = (imp.getCalibration()!=null)?imp.getCalibration().getValueUnit():null; unit = (unit==null||unit.equals("Gray Value"))?":":" ("+unit+"):"; gd.addNumericField("Noise tolerance"+unit,tolerance, digits); gd.addChoice("Output type:", outputTypeNames, outputTypeNames[dialogOutputType]); gd.addCheckbox("Exclude edge maxima", excludeOnEdges); if (thresholded) gd.addCheckbox("Above lower threshold", useMinThreshold); gd.addCheckbox("Light background", lightBackground); gd.addPreviewCheckbox(pfr, "Preview point selection"); gd.addMessage(" "); //space for number of maxima messageArea = (Label)gd.getMessage(); gd.addDialogListener(this); checkboxes = gd.getCheckboxes(); previewing = true; gd.addHelp(IJ.URL+"/docs/menus/process.html#find-maxima"); gd.showDialog(); //input by the user (or macro) happens here if (gd.wasCanceled()) return DONE; previewing = false; if (!dialogItemChanged(gd, null)) //read parameters return DONE; IJ.register(this.getClass()); //protect static class variables (parameters) from garbage collection return flags; } // boolean showDialog
public int showDialog(ImagePlus imp, String command, PlugInFilterRunner pfr) { ImageProcessor ip = imp.getProcessor(); ip.resetBinaryThreshold(); // remove invisible threshold set by MakeBinary and Convert to Mask thresholded = ip.getMinThreshold()!=ImageProcessor.NO_THRESHOLD; GenericDialog gd = new GenericDialog(command); int digits = (ip instanceof FloatProcessor)?2:0; String unit = (imp.getCalibration()!=null)?imp.getCalibration().getValueUnit():null; unit = (unit==null||unit.equals("Gray Value"))?":":" ("+unit+"):"; gd.addNumericField("Noise tolerance"+unit,tolerance, digits); gd.addChoice("Output type:", outputTypeNames, outputTypeNames[dialogOutputType]); gd.addCheckbox("Exclude edge maxima", excludeOnEdges); if (thresholded) gd.addCheckbox("Above lower threshold", useMinThreshold); gd.addCheckbox("Light background", lightBackground); gd.addPreviewCheckbox(pfr, "Preview point selection"); gd.addMessage(" "); //space for number of maxima messageArea = (Label)gd.getMessage(); gd.addDialogListener(this); checkboxes = gd.getCheckboxes(); previewing = true; gd.addHelp(IJ.URL+"/docs/menus/process.html#find-maxima"); gd.showDialog(); //input by the user (or macro) happens here if (gd.wasCanceled()) return DONE; previewing = false; if (!dialogItemChanged(gd, null)) //read parameters return DONE; IJ.register(this.getClass()); //protect static class variables (parameters) from garbage collection return flags; } // boolean showDialog
final TextField tf = (TextField) gd.getNumericFields().get(0); gd.addMessage(ec.getVertexCount() + " remaining vertices"); final Label label = (Label) gd.getMessage();
if ( !PluginHelper.isHeadless() ) label1 = (Label)gd.getMessage(); gd.addMessage( "???x???x??? pixels", GUIHelper.smallStatusFont, GUIHelper.good ); if ( !PluginHelper.isHeadless() ) label2 = (Label)gd.getMessage();
if (!macroRunning) ((Checkbox)checkboxes.elementAt(2)).addItemListener(this); message = (Label)gd.getMessage(); gd.addHelp(IJ.URL+"/docs/menus/image.html#reslice"); gd.showDialog();
if (!macroRunning) ((Checkbox)checkboxes.elementAt(2)).addItemListener(this); message = (Label)gd.getMessage(); gd.addHelp(IJ.URL+"/docs/menus/image.html#reslice"); gd.showDialog();
"Preibisch et al., Nature Methods (2010), 7(6):418-419\n" ); MultiLineLabel text = (MultiLineLabel) gd.getMessage(); Bead_Registration.addHyperLinkListener( text, paperURL );
gd.addCheckbox( "Display_image_used for segmentation", defaultDisplaySegmentationImage ); gd.addMessage( "Image size: ???x???x??? pixels", GUIHelper.mediumstatusfont, GUIHelper.good ); Label l = (Label)gd.getMessage();