gd.addNumericField("Radius (Sigma)", sigma, 1, 6, "pixels");
gd.addNumericField("Mask Weight (0.1-0.9)", weight,2);
gd.addPreviewCheckbox(pfr);
gd.addDialogListener(this);
gd.showDialog(); //input by the user (or macro) happens here
if (gd.wasCanceled()) return DONE;
if (oldMacro) sigma /= 2.5;
IJ.register(this.getClass()); //protect static class variables (parameters) from garbage collection
return IJ.setupDialog(imp, flags); //ask whether to process all slices of stack (if a stack)
}