예제 #1
0
 /** Updates the stack scrollbar. */
 public void updateSliceSelector() {
   if (hyperStack || zSelector == null) return;
   int stackSize = imp.getStackSize();
   int max = zSelector.getMaximum();
   if (max != (stackSize + 1)) zSelector.setMaximum(stackSize + 1);
   zSelector.setValue(imp.getCurrentSlice());
 }
예제 #2
0
 public void setPosition(int channel, int slice, int frame) {
   if (cSelector != null && channel != c) {
     c = channel;
     cSelector.setValue(channel);
     SyncWindows.setC(this, channel);
   }
   if (zSelector != null && slice != z) {
     z = slice;
     zSelector.setValue(slice);
     SyncWindows.setZ(this, slice);
   }
   if (tSelector != null && frame != t) {
     t = frame;
     tSelector.setValue(frame);
     SyncWindows.setT(this, frame);
   }
   updatePosition();
   if (this.slice > 0) {
     int s = this.slice;
     this.slice = 0;
     if (s != imp.getCurrentSlice()) imp.setSlice(s);
   }
 }