// This macro demonstrates how to use the // Dialog.addSlider(label, min, max, default) // function that was added in ImageJ 1.45f. // Floating point values are used when // (max-min)<=5 and min, max or default // are non-integer. requires("1.45f"); Dialog.create("Float Image"); Dialog.addSlider("Width:", 1, 8192, 512); Dialog.addSlider("Height:", 1, 8192, 512); Dialog.addSlider("Max value:", 0.0, 1.0, 0.5); Dialog.show(); width = Dialog.getNumber(); height = Dialog.getNumber(); maxValue = Dialog.getNumber(); newImage("Untitled", "32-bit ramp", width, height, 1); run("Multiply...", "value=&maxValue"); resetMinAndMax;