MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / nextSlice

Method nextSlice

ij/src/main/java/ij/plugin/Animator.java:274–301  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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();

Callers 1

runMethod · 0.95

Calls 13

controlKeyDownMethod · 0.95
spaceBarDownMethod · 0.95
altKeyDownMethod · 0.95
isDisplayedHyperStackMethod · 0.80
getNSlicesMethod · 0.80
getNFramesMethod · 0.80
updateStatusbarValueMethod · 0.80
getChannelMethod · 0.65
getFrameMethod · 0.65
getNChannelsMethod · 0.45
setPositionMethod · 0.45
getSliceMethod · 0.45

Tested by

no test coverage detected