Create composite rgb image from 2 ImagePlus objects

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

Create composite rgb image from 2 ImagePlus objects

ampersand
Hi all,

I am writing an imagej plugin that does the following:

1. Loads an image that has been acquired with a 'dual-view' , i.e. the
image is grayscale and split down the middle,where one half represents
one color and the other corresponds to a different color.
2. Using ROIs, splits the image into two separate ImagePlus objects of
equal size (both equal to 1/2 the size of the original)
3. Combines the two resultant images into an RGB or composite image
with the two colors represented by separate channels


The problem is with this last step. I can use the RGBMerge plugin from
the menu, or put the two images into a stack and make an RGB from
that, but all this is done from the menus. How can I implement this
programmatically? Again, the end result should be a composite image,
w/ channels whose balance,level,contrast,brightness,etc can be
adjusted separately.


Any help is appreciated!


Regards,
Alex
Reply | Threaded
Open this post in threaded view
|

Re: Create composite rgb image from 2 ImagePlus objects

Wayne Rasband
> I am writing an imagej plugin that does the following:
>
> 1. Loads an image that has been acquired with a 'dual-view' , i.e. the
> image is grayscale and split down the middle,where one half represents
> one color and the other corresponds to a different color.
> 2. Using ROIs, splits the image into two separate ImagePlus objects of
> equal size (both equal to 1/2 the size of the original)
> 3. Combines the two resultant images into an RGB or composite image
> with the two colors represented by separate channels
>
>
> The problem is with this last step. I can use the RGBMerge plugin from
> the menu, or put the two images into a stack and make an RGB from
> that, but all this is done from the menus. How can I implement this
> programmatically? Again, the end result should be a composite image,
> w/ channels whose balance,level,contrast,brightness,etc can be
> adjusted separately.

The easiest way to do this is to create a stack and use

      IJ.run(imp, "Make Composite", "display=Composite");

where 'imp' is an ImagePlus containing the stack. This method requires
ImageJ 1.41 or later. Or you can create a composite image from a stack
and display it using

     ImagePlus imp2 = new CompositeImage(imp, CompositeImage.COMPOSITE);
     imp2.show();

-wayne
Reply | Threaded
Open this post in threaded view
|

Re: Create composite rgb image from 2 ImagePlus objects

Nico Stuurman-4
In reply to this post by ampersand
Hi Alex,

> I am writing an imagej plugin that does the following:
>
> 1. Loads an image that has been acquired with a 'dual-view' , i.e. the
> image is grayscale and split down the middle,where one half represents
> one color and the other corresponds to a different color.
> 2. Using ROIs, splits the image into two separate ImagePlus objects of
> equal size (both equal to 1/2 the size of the original)
> 3. Combines the two resultant images into an RGB or composite image
> with the two colors represented by separate channels

I think that the OI_cut_RGBmerge plugin (http://valelab.ucsf.edu/~nico/ijplugins/ 
) will do this for you.

Best,

Nico




>
>
>
> The problem is with this last step. I can use the RGBMerge plugin from
> the menu, or put the two images into a stack and make an RGB from
> that, but all this is done from the menus. How can I implement this
> programmatically? Again, the end result should be a composite image,
> w/ channels whose balance,level,contrast,brightness,etc can be
> adjusted separately.
>
>
> Any help is appreciated!
>
>
> Regards,
> Alex
Reply | Threaded
Open this post in threaded view
|

Colorbar?

Nas-5
Hi there!
 
I have a gray scale image and I would like to show a colorbar corresponding to the intensity values in the image next to it. I don't need to any calibration or anything. I Just simply need a colorbar! I'm sure there must be a tool for this in ImageJ. I'm afraid I just don't know where to look for it. Could someone please advise me on this?
 
Thanks,
Nas



Reply | Threaded
Open this post in threaded view
|

Re: Colorbar?

Ben Tupper
On Aug 21, 2008, at 2:27 AM, Nasim wrote:

> Hi there!
>
> I have a gray scale image and I would like to show a colorbar  
> corresponding to the intensity values in the image next to it. I  
> don't need to any calibration or anything. I Just simply need a  
> colorbar! I'm sure there must be a tool for this in ImageJ. I'm  
> afraid I just don't know where to look for it. Could someone please  
> advise me on this?
>
>

Hi,

You can find it under the Analyze > Tools > Calibration Bar menu.  If  
you need to control it from within a plugin you can follow Wayne's  
tip here http://tinyurl.com/6oejbc
Cheers,
Ben

Ben Tupper
[hidden email]

I GoodSearch for Ashwood Waldorf School.

Raise money for your favorite charity or school just by searching the  
Internet with GoodSearch - www.goodsearch.com - powered by Yahoo!