[ImageJ-bugs] [Bug 990] Mac OS out of memory
bugzilla at fiji.sc
bugzilla at fiji.sc
Sun Feb 8 20:39:47 CST 2015
http://fiji.sc/bugzilla/show_bug.cgi?id=990
--- Comment #3 from Wayne Rasband <wsr at nih.gov> ---
Hi Glen,
I am not able to consistently reproduce this problem. Yesterday, when testing
your macro, I noticed that sometimes not all memory was reclaimed after the
macro finished and I ran the garbage collector by clicking on the status bar or
"Memory" window. Today, however, the memory is always reclaimed after running
the macro and clicking in the "Memory" window.
The following version of your macro displays the "Memory" window and creates 10
montages. The "Make Montage" macro is first so you can run it by clicking on
"Run" in Fiji's script editor. Watch the "Memory" window as the macro runs and
you will see that memory is reclaimed as needed or you click in the "Memory"
window. This version of the macro also fixes a few problems with passing
variables and it removes the 'grayopt' string, which was not seen by the Insert
command because it was not passed correctly.
macro "Make Montage [1]" {
dir=getDirectory("Source");
n = 10;
list=getFileList(dir);
for (i=0; i<n; i++) {
montage = "Montage-"+(i+1)+"/"+n;
newImage(montage, "16-bit composite-mode", 2048,2048,3,100,1);
doCommand("Monitor Memory...");
x=0; y=0;
for (f=0; f<list.length; f++) {
fpath=dir+list[f];
//open(fpath);
run("Bio-Formats Windowless Importer", "open=&fpath");
rename("Source");
run("Insert...", "source=Source destination=&montage x=&x y=&y");
close;
x += 1024;
if (x==2048) {
x = 0;
y += 1024;
}
}
close;
}
}
macro "Make Stacks [2]" {
target=getDirectory("Choose Directory");
newImage("HyperStack", "16-bit ramp", 1024, 1024, 3,100,1);
for (s=0;s<4;s++)
saveAs("Tiff",target+"Stack000"+s);
}
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://imagej.net/pipermail/imagej-bugs/attachments/20150209/24091c87/attachment.html>
More information about the Imagej-bugs
mailing list