Re: Out of memory Issue
Posted by
Michael Schmid on
Mar 29, 2011; 6:38pm
URL: http://imagej.273.s1.nabble.com/Re-Out-of-memory-Issue-tp3685216p3685217.html
Hi Zhengyu,
close() works in BatchMode - at least for me (using the daily build,
ImageJ 1.45e11).
E.g., there is no increase of memory usage with this:
nImg=1000;
setBatchMode(true);
for (i=0; i<nImg; i++) {
newImage("Untitled", "16-bit White", 2048, 2048, 1);
run("Invert");
showProgress(i/nImg);
close();
}
showProgress(1.0);
setBatchMode("exit and display");
Michael
________________________________________________________________
On 29 Mar 2011, at 20:09, Pang, Zhengyu (GE Global Research) wrote:
> Dear all,
>
> I need to open about 2000 images with each image about 8 Megabytes.
> When
> I use setBatchMode(false), I could use close() function after each
> image
> opening in order to save the memory. However, if I set the
> setBatchMode(true), I could not close the active image as there is no
> image open. Very quickly I got the error message telling me out of
> memory ( I set 640 M for memory). In this case, could I still use
> setBatchMode(true) and avoid memory issue? I think setBatchMode(true)
> could give me the advantage of speed.
>
> Thanks,
>
> Zhengyu
> Zhengyu Pang, Ph.D.
> Biochemistry and Biological Engineering Laboratory
> Diagnostic and Biomedical Technologies
> GE Global Research, K1-5B37A
> Niskayuna, NY 12309
> T: 518-387-4015
> F: 518-387-7765