Login  Register

Re: Is there a mechanism for depth cueing of a stack?

Posted by Gabriel Landini on May 23, 2014; 7:40pm
URL: http://imagej.273.s1.nabble.com/Is-there-a-mechanism-for-depth-cueing-of-a-stack-tp5007882p5007890.html

On Friday 23 May 2014 13:21:16 JOEL B. SHEFFIELD wrote:
> A colleague of mine has been interested in the processing option in our old
> Leica SP1 software that generates a rotating stack image in which the
> different positions in the stack are mapped to a color gradient.  That is,
> the top of the stack is red, and the bottom is blue, with a gradient
> between them.  I have looked for an implementation of this in the ImageJ
> materials, so far without luck.  Does any have a suggestion, or am I
> missing something really obvious?

I tried Curtis' plugin but I cannot compile it under IJ1.
This macro produces (I hope) the same results.

setBatchMode(true);
a=getTitle();
run("RGB Color");
div=nSlices;
for(i=0;i<div;i++){
selectWindow(a);
setSlice(i+1);
run("Duplicate...", "title=_b");
run("HSB Stack");
setSlice(1);
run("Set...", "value="+((256/div)*i)+" slice");
setSlice(2);
run("Set...", "value=255 slice");
run("RGB Color");
imageCalculator("Copy", a ,"_b");
selectWindow("_b");
close();
}
setBatchMode(false);

Cheers
Gabriel

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