Re: Subtraction of images in two folders
Posted by
Jan Eglinger on
Mar 03, 2016; 9:11am
URL: http://imagej.273.s1.nabble.com/Subtraction-of-images-in-two-folders-tp5015773p5015777.html
Hi Herbie,
On 02.03.2016 23:15, Herbie wrote:
> ... and as far as I know
> showProgress();
> doesn't work this way. Read the manual!
yes, it does! See:
https://github.com/imagej/imagej1/blob/master/ij/macro/Functions.java#L2525-L2530Here's an example:
for (i=0; i<1000; i++) {
wait(10);
showProgress(i, 1000);
}
While I generally second the advice to read the manual, it seems like in
this case the documentation at
http://imagej.net/developer/macro/functions.html#showProgress is incomplete.
Cheers,
Jan
> Am 02.03.16 um 21:36 schrieb Ramon Silva:
>> Hi, i'm trying to do a subtraction of binary images, but what i
>> receive as
>> result of subtraction is a white image. If you could help me with this
>> problem i'll appreciate it, because i don't know what is going wrong
>> in my
>> code (ps.: i'm a beginner).
>> Since now, thank you!
>>
>> Here's my actual code:
>>
>> requires("1.38o");
>> showMessage("Folder 1")
>> dir1 = getDirectory("Choose a Directory ");
>> showMessage("Folder 2:")
>> dir2 = getDirectory("Choose a Directory ");
>> listOD = getFileList(dir1);
>> listOC = getFileList(dir2);
>> newDir = "NeuroretinalRim";
>> File.makeDirectory(newDir);
>> setBatchMode(true);
>> for (i=0; i<listOD.length; i++) {
>> showProgress(i, listOD.length);
>> open(dir1+listOD[i]);
>> open(dir2+listOC[i]);
>> imageCalculator("Subtract", listOD[i], listOC[i]);
>> save(getDirectory("imagej")+"//"+newDir+"//"+(i+1)+".tif");
>> }
>>
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html