()
| 3697 | } |
| 3698 | |
| 3699 | void setSlice() { |
| 3700 | int n = (int)getArg(); |
| 3701 | ImagePlus imp = getImage(); |
| 3702 | int nSlices = imp.getStackSize(); |
| 3703 | if (n==1 && nSlices==1) |
| 3704 | return; |
| 3705 | else if (n<1 || n>nSlices) |
| 3706 | interp.error("Argument must be >=1 and <="+nSlices); |
| 3707 | else { |
| 3708 | if (imp.isHyperStack()) |
| 3709 | imp.setPosition(n); |
| 3710 | else |
| 3711 | imp.setSlice(n); |
| 3712 | } |
| 3713 | resetImage(); |
| 3714 | } |
| 3715 | |
| 3716 | void newImage() { |
| 3717 | String title = getFirstString(); |
no test coverage detected