(int channel, int slice, int frame)
| 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()) { |
nothing calls this directly
no test coverage detected