Posted by
dscho on
Jul 23, 2013; 5:34pm
URL: http://imagej.273.s1.nabble.com/Out-of-Memory-Problems-tp5004033p5004111.html
Hi Olivier,
On Tue, 23 Jul 2013, Burri Olivier wrote:
> I've tried loading a large dataset over and over through a macro (Load,
> close loop) after updating Fiji And I still get the out of memory error.
Well, this is my fault. For some reason, I failed to upload a new version
of ij-legacy.jar when I said that I had. But now it worked, and this
beautiful macro demonstrates that my fix works at least with the Clown
sample (I was unable to run Plugins>Utilities>Monitor Memory... from the
macro without blocking the rest of the commands, so please call that by
hand before running it):
path = getDirectory("imagej") + "samples/clown.jpg";
useBF = true;
setBatchMode(true);
for (i = 0; i < 100; i++) {
if (useBF) {
run("Bio-Formats", "open=[" + path + "] "
+ "autoscale color_mode=Default "
+ "view=Hyperstack stack_order=XYCZT");
} else {
open(path);
}
close();
}
For easy debugging and extensive testing, I also tried with "!true" for
both useBF and setBatchMode(), and the issues that I could indeed
reproduce with the Fiji version as of half an hour ago are now gone.
Ciao,
Dscho
P.S.: The macro assumes that you have unpacked Fiji into your home
directory and that you ran File>Open Samples>Cache Sample Images. This is
so far a Fiji-only function (Wayne, if you read this and re-implement it
for ImageJ 1.x, please let me know so that I can prevent breakages in
Fiji).
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html