int size = imp.getStackSize();
GenericDialog gd = new GenericDialog("Z Project");
gd.addChoice("Projection method", ZProjector.METHODS, ZProjector.METHODS[method]);
gd.addNumericField("Group size:", size, 0);
gd.showDialog();
if (gd.wasCanceled()) return false;
method = gd.getNextChoiceIndex();
groupSize = (int)gd.getNextNumber();
if (groupSize<1 || groupSize>size || (size%groupSize)!=0) {
IJ.error("ZProject", "Group size must divide evenly into the stack size.");
return false;