Re: Out of memory Issue

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Out of memory Issue

Pang, Zhengyu (GE Global Research)
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
Reply | Threaded
Open this post in threaded view
|

Re: Out of memory Issue

Michael Schmid
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
Reply | Threaded
Open this post in threaded view
|

Re: Out of memory Issue

Pang, Zhengyu (GE Global Research)
Michael,

Yes.  It also works in my case when I re-run it. I don't think what
happened before.

By the way, using setBatchMode (true or false) reduced processing time
by 22%

Thanks.
-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of
Michael Schmid
Sent: Tuesday, March 29, 2011 2:39 PM
To: [hidden email]
Subject: Re: Out of memory Issue

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
Reply | Threaded
Open this post in threaded view
|

Re: Out of memory Issue

chenyanpei
use edit----options---memory to large the memory used by ImageJ.

2011/3/29 Pang, Zhengyu (GE Global Research) <[hidden email]>

> Michael,
>
> Yes.  It also works in my case when I re-run it. I don't think what
> happened before.
>
> By the way, using setBatchMode (true or false) reduced processing time
> by 22%
>
> Thanks.
> -----Original Message-----
> From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of
> Michael Schmid
> Sent: Tuesday, March 29, 2011 2:39 PM
> To: [hidden email]
> Subject: Re: Out of memory Issue
>
> 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
>



--
Chen Yanpei, phD
MssMat
Ecole Centrale Paris
Grande voie des vignes
92295 Châtenay Malabry
Paris, France