()
| 272 | } |
| 273 | |
| 274 | void nextSlice() { |
| 275 | boolean hyperstack = imp.isDisplayedHyperStack(); |
| 276 | int channels = imp.getNChannels(); |
| 277 | int slices = imp.getNSlices(); |
| 278 | int frames = imp.getNFrames(); |
| 279 | if (hyperstack && channels>1 && !((slices>1||frames>1)&&(IJ.controlKeyDown()||IJ.spaceBarDown()||IJ.altKeyDown()))) { |
| 280 | int c = imp.getChannel() + 1; |
| 281 | if (c>channels) c = channels; |
| 282 | swin.setPosition(c, imp.getSlice(), imp.getFrame()); |
| 283 | } else if (hyperstack && slices>1 && !(frames>1&&IJ.altKeyDown())) { |
| 284 | int z = imp.getSlice() + 1; |
| 285 | if (z>slices) z = slices; |
| 286 | swin.setPosition(imp.getChannel(), z, imp.getFrame()); |
| 287 | } else if (hyperstack && frames>1) { |
| 288 | int t = imp.getFrame() + 1; |
| 289 | if (t>frames) t = frames; |
| 290 | swin.setPosition(imp.getChannel(), imp.getSlice(), t); |
| 291 | } else { |
| 292 | if (IJ.altKeyDown()) |
| 293 | slice += 10; |
| 294 | else |
| 295 | slice++; |
| 296 | if (slice>nSlices) |
| 297 | slice = nSlices; |
| 298 | swin.showSlice(slice); |
| 299 | } |
| 300 | imp.updateStatusbarValue(); |
| 301 | } |
| 302 | |
| 303 | void previousSlice() { |
| 304 | boolean hyperstack = imp.isDisplayedHyperStack(); |
no test coverage detected