http://imagej.273.s1.nabble.com/Contrast-Enhancement-tp3687471p3687476.html
which is used for saving a JPEG image.
> Thanks Johannes (and everyone else) for your suggestions!
>
>
> The setBatchMode command solved the problem with incomplete and
> partial contrast enhancements. I will see if I can find some sort
> of incompatibility issue with LabVIEW and the ImageJ images I have
> created, with regard to my second conflict.
>
>
> -Liz
>
>
> From: "Johannes Schindelin" <
[hidden email]>
> To: "Elizabeth Frink" <
[hidden email]>
> Cc:
[hidden email]
> Sent: Friday, July 23, 2010 10:25:27 AM
> Subject: Re: Contrast Enhancement
>
> Hi,
>
> On Fri, 23 Jul 2010, Elizabeth Frink wrote:
>
>> Below is my macro (I have shortened the first two lines by
>> replacing a
>> portion of the directory with "..." for illustration purposes only)
>>
>>
>> sourcedir = "C:\\Users\\Liz\\Documents\\...\\Brightfield\\1st Tear\
>> \";
>> outdir = "C:\\Users\\Liz\\Documents\\...\\EnhCont\\1st Tear\\";
>> img = "sam6close_tear_00001-brightfield.tif";
>> numimg = 240;
>> start = 1;
>>
>>
>> for (i=0; i<numimg; i++) {
>>
>> imnum = start + i;
>> strimnum = toString(imnum);
>> inimg = substring(img,0,(lengthOf(img)-(16+lengthOf(strimnum))))
>> +strimnum + "-brightfield.tif";
>> infile = sourcedir + inimg;
>> open(infile);
>> run("Enhance Contrast", "saturated=0.4");
>> imgname = substring(inimg,0,(lengthOf(inimg)-16)) + "-contrast.jpg";
>> outfile = outdir + imgname;
>> saveAs("Jpeg", outfile);
>> close();
>> }
>
> Thanks.
>
> I could imagine that there is a timing problem, which you can work
> around
> by calling setBatchMode(true); at the start of the macro (and you
> can turn
> it off at the end with setBatchMode(false);).
>
> Ciao,
> Johannes