* Creates a dialog box, allowing the user to enter the requested
* width, height, x & y coordinates, slice number for a Region Of Interest,
* option for oval, and option for whether x & y coordinates to be centered.
*/
void showDialog() {
Calibration cal = imp.getCalibration();
int digits = 0;
if (scaledUnits && cal.scaled())
digits = 2;
Roi roi = imp.getRoi();
if (roi==null)
drawRoi();
GenericDialog gd = new GenericDialog("Specify");
gd.addNumericField("Width:", width, digits);
gd.addNumericField("Height:", height, digits);
gd.addNumericField("X Coordinate:", xRoi, digits);
gd.addNumericField("Y Coordinate:", yRoi, digits);
if (stackSize>1)
gd.addNumericField("Slice:", iSlice, 0);
gd.addCheckbox("Oval", oval);
gd.addCheckbox("Centered",centered);
if (cal.scaled())
gd.addCheckbox("Scaled Units ("+cal.getUnits()+")", scaledUnits);
fields = gd.getNumericFields();
gd.addDialogListener(this);
gd.showDialog();
if (gd.wasCanceled()) {
if (roi==null)