Composite image stack: adjust B/C or Color Balance of individual channels from a macro?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Composite image stack: adjust B/C or Color Balance of individual channels from a macro?

Guenter Giese
Dear list members,

when searching for an answer to my question:
"Composite image stack: adjust B/C or Color Balance of individual channels
from a macro?"
I found a thread in the list archive by Bill Mohler, who faced the same
problems:
https://list.nih.gov/cgi-bin/wa.exe?A2=ind0812&L=IMAGEJ&O=D&F=&S=&P=13903
But here seems to be no answer yet.

Problem: even when setting B/C for the channels (each 12bit grayscale)
before merging to a composite image, the first channel is always set to Auto
range. Both channels are no mare accessible individually by a macro, but
only by user interaction.


Is there a solution?

Best,

Guenter


Dr. Guenter Giese
Light Microscopy Facility Manager
Dept. of Biomedical Optics
MPI fuer Medizinische Forschung
D-69120 Heidelberg, Germany
phone  xx49 or 0 -6221-486-360  fax -325
e-mail: guenter.giese ( at) mpimf-heidelberg.mpg.de

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Composite image stack: adjust B/C or Color Balance of individual channels from a macro?

Rasband, Wayne (NIH/NIMH) [E]
On Jul 24, 2012, at 8:44 AM, Guenter Giese wrote:

> Dear list members,
>
> when searching for an answer to my question:
> "Composite image stack: adjust B/C or Color Balance of individual channels
> from a macro?"
> I found a thread in the list archive by Bill Mohler, who faced the same
> problems:
> https://list.nih.gov/cgi-bin/wa.exe?A2=ind0812&L=IMAGEJ&O=D&F=&S=&P=13903
> But here seems to be no answer yet.
>
> Problem: even when setting B/C for the channels (each 12bit grayscale)
> before merging to a composite image, the first channel is always set to Auto
> range. Both channels are no mare accessible individually by a macro, but
> only by user interaction.


Please provide a small macro that demonstrates the problem. Something like the following, which works as expected.

-wayne

  newImage("C1", "16-bit Ramp", 500, 500, 1);
  setMinAndMax(0, 10000);
  newImage("C2", "16-bit Ramp", 500, 500, 1);
  setMinAndMax(0, 20000);
  newImage("C3", "16-bit Ramp", 500, 500, 1);
  setMinAndMax(0, 30000);
  run("Merge Channels...", "c1=C1 c2=C2 c3=C3 create");
  setSlice(2);
  setMinAndMax(0, 22222);
  for (i=1; i<=nSlices; i++) {
     setSlice(i);
     getMinAndMax(min, max);
     print(i, min, max);
  }
--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html