ImagePlus workingImP = WindowManager.getCurrentImage(); new Thread(new Runnable() { @Override public void run() { boolean exit=false; int currentChannel=-1; int currentFrame=-1; int currentZSlice=-1; % currZSlice is the z slice number within the currframe and current channel while (exit==false) { % Fetch current position of user if (workingImP!=null) { % get image properties int nSlices=workingImP.getNSlices(); int nChannel=workingImP.getNChannels(); int currSlice=workingImP.getCurrentSlice(); % irrespective of frame and channel % Translate this into proper image position currentFrame=((int)(CurrSlice-1)/(int)(nSlices*nChannel))+1; currentZSlice=workingImP.getSlice(); % todo : currentChannel } else { currentFrame=-1; currentChannel=-1; currentZSlice=-1; } % Do stuff... System.out.println("Frame = \t"+currentFrame+"\t Channel = \t"+currentChannel+"\t Z= \t"+currentZSlice); % Waits 1/3 of a sec try { Thread.sleep(330); } catch (InterruptedException ex) { % IJ.log... } } } }).start(); -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html