Is there a mechanism for depth cueing of a stack?

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

Is there a mechanism for depth cueing of a stack?

Joel Sheffield
Greetings all,

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?

Joel


Joel B. Sheffield, Ph.D
Department of Biology
Temple University
Philadelphia, PA 19122
Voice: 215 204 8839
e-mail: [hidden email]
URL:  http://astro.temple.edu/~jbs

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

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

Theresa Swayne
Hi Joel,

There are 2 options I know of.

In Fiji, you can do Image > Hyperstacks > Temporal Color-Code. This lets you pick the colors and generate a reference scale.

The Fiji Cookbook plugin package includes "Z Code Stack" which will generate a color-coded stack. You can then project it with your method of choice (such as Image > Stacks > Z Project and choose Max Intensity). I don't see a way to choose the colors there.

Hope this helps,
Theresa

On May 23, 2014, at 1:21 PM, "JOEL B. SHEFFIELD" <[hidden email]> wrote:

> Greetings all,
>
> 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?
>
> Joel
>
>
> Joel B. Sheffield, Ph.D
> Department of Biology
> Temple University
> Philadelphia, PA 19122
> Voice: 215 204 8839
> e-mail: [hidden email]
> URL:  http://astro.temple.edu/~jbs
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

------------------------------------
Theresa Swayne, Ph.D.
Associate Research Scientist
Manager, Confocal and Specialized Microscopy Shared Resource
Herbert Irving Comprehensive Cancer Center, Columbia University
1130 Saint Nicholas Ave, 222A
New York, NY 10032

212-851-4613

[hidden email]
http://hiccc.columbia.edu/research/sharedresources/confocal


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

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

ctrueden
In reply to this post by Joel Sheffield
Hi Joel,

> 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.

That sounded like such a fun project, that I wrote a quick plugin:
https://gist.github.com/ctrueden/fe00e8dd2034f37273f0

HTH,
Curtis


On Fri, May 23, 2014 at 12:21 PM, JOEL B. SHEFFIELD <[hidden email]> wrote:

> Greetings all,
>
> 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?
>
> Joel
>
>
> Joel B. Sheffield, Ph.D
> Department of Biology
> Temple University
> Philadelphia, PA 19122
> Voice: 215 204 8839
> e-mail: [hidden email]
> URL:  http://astro.temple.edu/~jbs
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

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

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

Gabriel Landini
In reply to this post by Joel Sheffield
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
Reply | Threaded
Open this post in threaded view
|

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

dscho
Hi Gabriel,

On Fri, 23 May 2014, Gabriel Landini wrote:

> 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.

If it does not compile, surely there is some compile error. Could you
please paste that into a reply?

> This macro produces (I hope) the same results.

Not quite... Curtis' opens the 3D Viewer and animates the result for extra
bling.

Ciao,
Dscho

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

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

Gabriel Landini
On Friday 23 May 2014 22:55:24 Johannes Schindelin wrote:
> On Fri, 23 May 2014, Gabriel Landini wrote:
> > I tried Curtis' plugin but I cannot compile it under IJ1.
>
> If it does not compile, surely there is some compile error. Could you
> please paste that into a reply?

Wayne kindly resolved the compilation problem, but now there is another issue.

 ImageJ 1.49b9; Java 1.7.0_51 [64-bit]; Linux 3.11.10-11-desktop; 120MB of
983MB (12%)
 
java.lang.NullPointerException
        at ij3d.ContentCreator.getImages(ContentCreator.java:156)
        at ij3d.ContentCreator.createContent(ContentCreator.java:63)
        at ij3d.Image3DUniverse.addContent(Image3DUniverse.java:848)
        at ij3d.ImageJ3DViewer.add(ImageJ3DViewer.java:137)
        at Colorized_Rotation.run(Colorized_Rotation.java:39)
        at ij.plugin.PlugInExecuter.runCompiledPlugin(Compiler.java:324)
        at ij.plugin.PlugInExecuter.run(Compiler.java:313)
        at java.lang.Thread.run(Thread.java:744)

I wonder if the 3d viewer version I have in this machine is not the expected
one. I checked the file dates inside the jar in IJ and Fiji and the IJ one is
a bit newer than the Fiji one (11/9/2012 vs 24/5/2012)

> > This macro produces (I hope) the same results.
>
> Not quite... Curtis' opens the 3D Viewer and animates the result for extra
> bling.

Oh, well. I said "I hope", since I could not compile it, I could only more or
less guess what it does.
Below is the macro with the missing bling,although I still do not know if it
does the same thing.

Thanks for looking into this.
Cheers

Gabriel

///////////////////////////////
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);
run("3D Viewer");
call("ij3d.ImageJ3DViewer.setCoordinateSystem", "false");
call("ij3d.ImageJ3DViewer.add", a, "None", a , "0", "true", "true", "true",
"2", "0");
call("ij3d.ImageJ3DViewer.startAnimate");
///////////////////////////////

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

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

Joel Sheffield
Folks,

Thank you so much for doing this.  As always, I have learned a lot by
reading both of the approaches.  As I understand it, Gabriel's increments
the values along an HSV spectrum, and Curtis directly increments the color
code values --

So far, I've run the macro version, and it seems to be acting as designed.

Again, thank you all.

Joel



Joel B. Sheffield, Ph.D
Department of Biology
Temple University
Philadelphia, PA 19122
Voice: 215 204 8839
e-mail: [hidden email]
URL:  http://astro.temple.edu/~jbs


On Fri, May 23, 2014 at 6:37 PM, Gabriel Landini <[hidden email]>wrote:

> On Friday 23 May 2014 22:55:24 Johannes Schindelin wrote:
> > On Fri, 23 May 2014, Gabriel Landini wrote:
> > > I tried Curtis' plugin but I cannot compile it under IJ1.
> >
> > If it does not compile, surely there is some compile error. Could you
> > please paste that into a reply?
>
> Wayne kindly resolved the compilation problem, but now there is another
> issue.
>
>  ImageJ 1.49b9; Java 1.7.0_51 [64-bit]; Linux 3.11.10-11-desktop; 120MB of
> 983MB (12%)
>
> java.lang.NullPointerException
>         at ij3d.ContentCreator.getImages(ContentCreator.java:156)
>         at ij3d.ContentCreator.createContent(ContentCreator.java:63)
>         at ij3d.Image3DUniverse.addContent(Image3DUniverse.java:848)
>         at ij3d.ImageJ3DViewer.add(ImageJ3DViewer.java:137)
>         at Colorized_Rotation.run(Colorized_Rotation.java:39)
>         at ij.plugin.PlugInExecuter.runCompiledPlugin(Compiler.java:324)
>         at ij.plugin.PlugInExecuter.run(Compiler.java:313)
>         at java.lang.Thread.run(Thread.java:744)
>
> I wonder if the 3d viewer version I have in this machine is not the
> expected
> one. I checked the file dates inside the jar in IJ and Fiji and the IJ one
> is
> a bit newer than the Fiji one (11/9/2012 vs 24/5/2012)
>
> > > This macro produces (I hope) the same results.
> >
> > Not quite... Curtis' opens the 3D Viewer and animates the result for
> extra
> > bling.
>
> Oh, well. I said "I hope", since I could not compile it, I could only more
> or
> less guess what it does.
> Below is the macro with the missing bling,although I still do not know if
> it
> does the same thing.
>
> Thanks for looking into this.
> Cheers
>
> Gabriel
>
> ///////////////////////////////
> 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);
> run("3D Viewer");
> call("ij3d.ImageJ3DViewer.setCoordinateSystem", "false");
> call("ij3d.ImageJ3DViewer.add", a, "None", a , "0", "true", "true", "true",
> "2", "0");
> call("ij3d.ImageJ3DViewer.startAnimate");
> ///////////////////////////////
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

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

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

Gabriel Landini
In reply to this post by Gabriel Landini
On Friday 23 May 2014 23:37:02 I wrote:
> Wayne kindly resolved the compilation problem, but now there is another
> issue.

For some reason I can't explain, now I can compile that plugin too (in another
machine, but same setup). One of those mysteries, I guess...

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

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

dscho
Hi Gabriel,

On Sat, 24 May 2014, Gabriel Landini wrote:

> On Friday 23 May 2014 23:37:02 I wrote:
> > Wayne kindly resolved the compilation problem, but now there is another
> > issue.
>
> For some reason I can't explain, now I can compile that plugin too (in
> another machine, but same setup). One of those mysteries, I guess...

Well, given that I was not allowed to see the compile error nor Wayne's
resolution, it is a much bigger mystery to me than it is to you.

As you know, I am happy to help you, when given a chance.

But as you can compile it on another machine, I guess that solves
yournproblem. So: less work for me.

Ciao,
Johannes

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