if (channel>nChannels) channel=nChannels;
if (slice>nSlices) slice=nSlices;
if (frame>nFrames) frame=nFrames;
if (isDisplayedHyperStack())
((StackWindow)win).setPosition(channel, slice, frame);
<BUG>else {
setSlice((frame-1)*nChannels*nSlices + (slice-1)*nChannels + channel);
updatePosition(channel, slice, frame);
}</BUG>
}

if (channel>nChannels) channel=nChannels;
if (slice>nSlices) slice=nSlices;
if (frame>nFrames) frame=nFrames;
if (isDisplayedHyperStack())
((StackWindow)win).setPosition(channel, slice, frame);
else {
boolean channelChanged = channel!=getChannel();
setSlice((frame-1)*nChannels*nSlices + (slice-1)*nChannels + channel);
updatePosition(channel, slice, frame);
if (channelChanged && isComposite())
updateImage();
}
}
