Login  Register

Re: User interaction Brightness/Contrast

Posted by Glen MacDonald-2 on Jun 07, 2017; 4:52pm
URL: http://imagej.273.s1.nabble.com/User-interaction-Brightness-Contrast-tp5018858p5018860.html

Dear Sarah,
comment out the BatchMode, it does not display intermediate images.  
        //setBatchMode(true);


Regards,
Glen MacDonald
Digital Microscopy Center
Box 357923
University of Washington
Seattle, WA 98195-7923  USA
(206) 616-4156
depts.washington.edu/digmicro
[hidden email]









> On Jun 7, 2017, at 9:16 AM, SarahV <[hidden email]> wrote:
>
> macro "greenscalethensave" {LocationOfFiles = getDirectory("Select Folder");
> LocationOfSave = getDirectory("Select Save Location");
> setBatchMode(true);
> FileList = getFileList(LocationOfFiles);
> NumberOfFiles = FileList.length;
> for (i=0; i<NumberOfFiles; i+=1) {
>    FileName = FileList[i];
>   open(LocationOfFiles+FileName);
>    name = getTitle();
> run("Green");
> run("Set Scale...", "distance=1 known=0.10 unit=um");
> run("Scale Bar...", "width=10 height=12 font=42 color=White background=None
> location=[Lower Right] bold overlay");
> run("Brightness/Contrast...");
> waitForUser("Do something, then click OK");
> SaveName1 = replace(name, ".tif", " beab.tiff");
>    SaveName2 = replace(name, ".tif", " beab.png");
>    saveAs("TIFF", LocationOfSave+SaveName1);
>    saveAs("PNG", LocationOfSave+SaveName2);
> }
> }
> }
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html