Skip to content
Snippets Groups Projects
Commit 25c40b66 authored by Marius Hintsche's avatar Marius Hintsche
Browse files

add initial log printout

parent 97a6dd60
No related branches found
No related tags found
No related merge requests found
...@@ -34,11 +34,6 @@ if (stackMem > maxMem) { ...@@ -34,11 +34,6 @@ if (stackMem > maxMem) {
iMax = floor(nSlices()/subStackSize)+1; iMax = floor(nSlices()/subStackSize)+1;
//TODO allocate stack memory before running the loop. The programm will then //TODO allocate stack memory before running the loop. The programm will then
// fail right in the beginning if not enough memory is available. // fail right in the beginning if not enough memory is available.
progressTitle = "[Progress]";
run("Text Window...", "name="+ progressTitle +" width=30 height=3 monospaced");
print(progressTitle,"\\Update:0/"+iMax+" substacks (0%)\n"+getBar(0, 100));
setBatchMode(true);
methodPrefix = replace(method,' ','-'); methodPrefix = replace(method,' ','-');
resultName = methodPrefix; resultName = methodPrefix;
inputInfo = getImageInfo; inputInfo = getImageInfo;
...@@ -46,6 +41,12 @@ inputName = getInfo("image.filename"); ...@@ -46,6 +41,12 @@ inputName = getInfo("image.filename");
dotIndex = lastIndexOf(inputName, "."); dotIndex = lastIndexOf(inputName, ".");
inputName = substring(inputName, 0, dotIndex); inputName = substring(inputName, 0, dotIndex);
progressTitle = "[Progress]";
run("Text Window...", "name="+ progressTitle +" width=30 height=3 monospaced");
print(progressTitle,"\\Update:0/"+iMax+" substacks (0%)\n"+getBar(0, 100));
print("Calculating the grouped "+method+" projection...");
setBatchMode(true);
tStart = getTime(); tStart = getTime();
for (i=0; i<iMax; i++) { for (i=0; i<iMax; i++) {
print(progressTitle,"\\Update:"+i+"/"+iMax+" substacks ("+round(i/iMax*100)+"%)\n"+getBar(i, 100)); print(progressTitle,"\\Update:"+i+"/"+iMax+" substacks ("+round(i/iMax*100)+"%)\n"+getBar(i, 100));
...@@ -91,7 +92,7 @@ setBatchMode(false); ...@@ -91,7 +92,7 @@ setBatchMode(false);
tStop = getTime(); tStop = getTime();
walltime = (tStop-tStart)/1000/60; walltime = (tStop-tStart)/1000/60;
print("Done! (took "+d2s(walltime,1)+" min to complete."); print("Done! (took "+d2s(walltime,1)+" min to process "+i+" substacks.");
print(progressTitle, "\\Close"); print(progressTitle, "\\Close");
function calculateProjection(iStart,iStop,resultTitle,method) { function calculateProjection(iStart,iStop,resultTitle,method) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment