Posted by
Nikolay on
Nov 09, 2012; 10:01pm
URL: http://imagej.273.s1.nabble.com/Live-update-ImagePlus-tp5000765.html
Could you please advice, how I can do live update images in one ImagePlus.
When I tried to do this I always saw the last image, may be I need to use
thread somehow to update image window?
buttonPreview.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent ae) {
short[] bb = new short[(int)W*H];
//int counter = 0;
preview_ip = new ShortProcessor(W,H,bb, null);
preview = new ImagePlus("Preview Image", preview_ip);
preview.show();
//while (counter <10) {
p = sdll.previewImages();
bb = p.getShortArray(0, (int)W*H);
preview_ip = new ShortProcessor(W,H,bb, null);
preview.setProcessor("1", preview_ip);
IJ.wait(555);
p = sdll.previewImages();
bb = p.getShortArray(0, (int)W*H);
preview_ip = new ShortProcessor(W,H,bb, null);
preview.setProcessor("2", preview_ip);
//preview.show();
//counter++;
//}
}
});
Thank you.
--
Rogoshchenkov Nikolay
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html