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

Method setPosition

ij/src/main/java/ij/gui/StackWindow.java:401–425  ·  view source on GitHub ↗
(int channel, int slice, int frame)

Source from the content-addressed store, hash-verified

399 }
400
401 public void setPosition(int channel, int slice, int frame) {
402 if (cSelector!=null && channel!=c) {
403 c = channel;
404 cSelector.setValue(channel);
405 SyncWindows.setC(this, channel);
406 }
407 if (zSelector!=null && slice!=z) {
408 z = slice;
409 zSelector.setValue(slice);
410 SyncWindows.setZ(this, slice);
411 }
412 if (tSelector!=null && frame!=t) {
413 t = frame;
414 tSelector.setValue(frame);
415 SyncWindows.setT(this, frame);
416 }
417 this.slice = (t-1)*nChannels*nSlices + (z-1)*nChannels + c;
418 imp.updatePosition(c, z, t);
419 if (this.slice>0) {
420 int s = this.slice;
421 this.slice = 0;
422 if (s!=imp.getCurrentSlice())
423 imp.setSlice(s);
424 }
425 }
426
427 private void setSlice(ImagePlus imp, int n) {
428 if (imp.isLocked()) {

Callers

nothing calls this directly

Calls 7

setCMethod · 0.95
setZMethod · 0.95
setTMethod · 0.95
updatePositionMethod · 0.80
getCurrentSliceMethod · 0.80
setValueMethod · 0.45
setSliceMethod · 0.45

Tested by

no test coverage detected