(String arg)
| 12 | private boolean hyperstack, reduceSlices; |
| 13 | |
| 14 | public void run(String arg) { |
| 15 | imp = WindowManager.getCurrentImage(); |
| 16 | if (imp==null) |
| 17 | {IJ.noImage(); return;} |
| 18 | ImageStack stack = imp.getStack(); |
| 19 | int size = stack.size(); |
| 20 | if (size==1 || (imp.getNChannels()==size&&imp.isComposite())) |
| 21 | {IJ.error("Stack or hyperstack required"); return;} |
| 22 | if (!showDialog(stack)) |
| 23 | return; |
| 24 | if (!hyperstack && (stack instanceof VirtualStack)) { |
| 25 | int previousSize = stack.size(); |
| 26 | ((VirtualStack)stack).reduce(factor); |
| 27 | if (stack.size()<previousSize) |
| 28 | return; |
| 29 | } |
| 30 | if (hyperstack) |
| 31 | reduceHyperstack(imp, factor, reduceSlices); |
| 32 | else |
| 33 | reduceStack(imp, factor); |
| 34 | } |
| 35 | |
| 36 | public boolean showDialog(ImageStack stack) { |
| 37 | hyperstack = imp.isHyperStack(); |
nothing calls this directly
no test coverage detected