converting colors

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

converting colors

Sharmon Lebby
Hi,
I have an image that currently has a black background and red foreground.  What I want is a white background with a red foreground for easier viewing in a presentation. I'm wondering if this is something that can be accomplished in ImageJ.  I've tried importing an .ims file as a hyperstack using custom coloring (white foreground, black background) and then inverting the image but is there a way to then change the foreground to red?


Sharmon Lebby
Research Assistant
University of Texas San Antonio


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

Re: converting colors

Jacqueline Ross
Hi Sharmon,

You could use the Magic Wand to select the white foreground and then fill the selection with red (Edit fill) by changing the Foreground colour in the colour palette.

I'm assuming that your background is all the same grey value, i.e. white and that you want a solid red foreground.

Otherwise, you might be better to make the image greyscale and then use/create a Look Up Table.

Kind regards,

Jacqui

Jacqueline Ross
Biomedical Imaging Microscopist
Biomedical Imaging Research Unit 
School of Medical Sciences 
Faculty of Medical & Health Sciences
The University of Auckland
Private Bag 92019
Auckland 1142, NEW ZEALAND

Tel: 64 9 923 7438
Fax: 64 9 373 7484

http://www.fmhs.auckland.ac.nz/sms/biru/


-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Sharmon Lebby
Sent: Thursday, 8 May 2014 5:13 a.m.
To: [hidden email]
Subject: converting colors

Hi,
I have an image that currently has a black background and red foreground.  What I want is a white background with a red foreground for easier viewing in a presentation. I'm wondering if this is something that can be accomplished in ImageJ.  I've tried importing an .ims file as a hyperstack using custom coloring (white foreground, black background) and then inverting the image but is there a way to then change the foreground to red?


Sharmon Lebby
Research Assistant
University of Texas San Antonio


--
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: converting colors

Sharmon Lebby
Hi Jacqui,
Thanks for the advice. I've tried these and find I'm not 100% sure how to go about these options.  I also can't find the "Magic Wand" is this a plugin?

Sharmon Lebby
Research Assistant
University of Texas San Antonio

On May 7, 2014, at 5:20 PM, Jacqui Ross wrote:

Hi Sharmon,

You could use the Magic Wand to select the white foreground and then fill the selection with red (Edit fill) by changing the Foreground colour in the colour palette.

I'm assuming that your background is all the same grey value, i.e. white and that you want a solid red foreground.

Otherwise, you might be better to make the image greyscale and then use/create a Look Up Table.

Kind regards,

Jacqui

Jacqueline Ross
Biomedical Imaging Microscopist
Biomedical Imaging Research Unit
School of Medical Sciences
Faculty of Medical & Health Sciences
The University of Auckland
Private Bag 92019
Auckland 1142, NEW ZEALAND

Tel: 64 9 923 7438
Fax: 64 9 373 7484

http://www.fmhs.auckland.ac.nz/sms/biru/


-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Sharmon Lebby
Sent: Thursday, 8 May 2014 5:13 a.m.
To: [hidden email]
Subject: converting colors

Hi,
I have an image that currently has a black background and red foreground.  What I want is a white background with a red foreground for easier viewing in a presentation. I'm wondering if this is something that can be accomplished in ImageJ.  I've tried importing an .ims file as a hyperstack using custom coloring (white foreground, black background) and then inverting the image but is there a way to then change the foreground to red?


Sharmon Lebby
Research Assistant
University of Texas San Antonio


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

--
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: converting colors

Michael Schmid
Hi Sharmon,

ImageJ has a built-in Wand tool (8th from left in the tool bar), but this has a few restrictions:
- It can select only one area at a time
- It only traces the outline, any inner holes are selected with the object.
-Note that you should set the options by double clicking the tool. The default mode, 'Legacy', may be unreliable in some cases.

There is a plugin called Versatile Wand; it gives you more options:

http://imagejdocu.tudor.lu/doku.php?id=plugin:segmentation:versatile_wand:start


Michael
________________________________________________________________
On May 8, 2014, at 16:20, Sharmon Lebby wrote:

> Hi Jacqui,
> Thanks for the advice. I've tried these and find I'm not 100% sure how to go about these options.  I also can't find the "Magic Wand" is this a plugin?
>
> Sharmon Lebby
> Research Assistant
> University of Texas San Antonio
>
> On May 7, 2014, at 5:20 PM, Jacqui Ross wrote:
>
> Hi Sharmon,
>
> You could use the Magic Wand to select the white foreground and then fill the selection with red (Edit fill) by changing the Foreground colour in the colour palette.
>
> I'm assuming that your background is all the same grey value, i.e. white and that you want a solid red foreground.
>
> Otherwise, you might be better to make the image greyscale and then use/create a Look Up Table.
>
> Kind regards,
>
> Jacqui
>
> Jacqueline Ross
> Biomedical Imaging Microscopist
> Biomedical Imaging Research Unit
> School of Medical Sciences
> Faculty of Medical & Health Sciences
> The University of Auckland
> Private Bag 92019
> Auckland 1142, NEW ZEALAND
>
> Tel: 64 9 923 7438
> Fax: 64 9 373 7484
>
> http://www.fmhs.auckland.ac.nz/sms/biru/
>
>
> -----Original Message-----
> From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Sharmon Lebby
> Sent: Thursday, 8 May 2014 5:13 a.m.
> To: [hidden email]
> Subject: converting colors
>
> Hi,
> I have an image that currently has a black background and red foreground.  What I want is a white background with a red foreground for easier viewing in a presentation. I'm wondering if this is something that can be accomplished in ImageJ.  I've tried importing an .ims file as a hyperstack using custom coloring (white foreground, black background) and then inverting the image but is there a way to then change the foreground to red?
>
>
> Sharmon Lebby
> Research Assistant
> University of Texas San Antonio
>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
>
> --
> 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: converting colors

Sharmon Lebby
Hi Michael,
Thank you! I appreciate the help!

Sharmon Lebby
Research Assistant
University of Texas San Antonio

On May 8, 2014, at 11:40 AM, Michael Schmid wrote:

Hi Sharmon,

ImageJ has a built-in Wand tool (8th from left in the tool bar), but this has a few restrictions:
- It can select only one area at a time
- It only traces the outline, any inner holes are selected with the object.
-Note that you should set the options by double clicking the tool. The default mode, 'Legacy', may be unreliable in some cases.

There is a plugin called Versatile Wand; it gives you more options:

http://imagejdocu.tudor.lu/doku.php?id=plugin:segmentation:versatile_wand:start


Michael
________________________________________________________________
On May 8, 2014, at 16:20, Sharmon Lebby wrote:

Hi Jacqui,
Thanks for the advice. I've tried these and find I'm not 100% sure how to go about these options.  I also can't find the "Magic Wand" is this a plugin?

Sharmon Lebby
Research Assistant
University of Texas San Antonio

On May 7, 2014, at 5:20 PM, Jacqui Ross wrote:

Hi Sharmon,

You could use the Magic Wand to select the white foreground and then fill the selection with red (Edit fill) by changing the Foreground colour in the colour palette.

I'm assuming that your background is all the same grey value, i.e. white and that you want a solid red foreground.

Otherwise, you might be better to make the image greyscale and then use/create a Look Up Table.

Kind regards,

Jacqui

Jacqueline Ross
Biomedical Imaging Microscopist
Biomedical Imaging Research Unit
School of Medical Sciences
Faculty of Medical & Health Sciences
The University of Auckland
Private Bag 92019
Auckland 1142, NEW ZEALAND

Tel: 64 9 923 7438
Fax: 64 9 373 7484

http://www.fmhs.auckland.ac.nz/sms/biru/


-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Sharmon Lebby
Sent: Thursday, 8 May 2014 5:13 a.m.
To: [hidden email]
Subject: converting colors

Hi,
I have an image that currently has a black background and red foreground.  What I want is a white background with a red foreground for easier viewing in a presentation. I'm wondering if this is something that can be accomplished in ImageJ.  I've tried importing an .ims file as a hyperstack using custom coloring (white foreground, black background) and then inverting the image but is there a way to then change the foreground to red?


Sharmon Lebby
Research Assistant
University of Texas San Antonio


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

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


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

--
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: converting colors

Jacqueline Ross
Yes thanks Michael,

You beat me to the reply. Good luck Sharmon.

Kind regards,

Jacqui

Jacqueline Ross
Biomedical Imaging Microscopist
Biomedical Imaging Research Unit 
School of Medical Sciences 
Faculty of Medical & Health Sciences
The University of Auckland
Private Bag 92019
Auckland 1142, NEW ZEALAND

Tel: 64 9 923 7438
Fax: 64 9 373 7484

http://www.fmhs.auckland.ac.nz/sms/biru/

-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Sharmon Lebby
Sent: Friday, 9 May 2014 6:41 a.m.
To: [hidden email]
Subject: Re: converting colors

Hi Michael,
Thank you! I appreciate the help!

Sharmon Lebby
Research Assistant
University of Texas San Antonio

On May 8, 2014, at 11:40 AM, Michael Schmid wrote:

Hi Sharmon,

ImageJ has a built-in Wand tool (8th from left in the tool bar), but this has a few restrictions:
- It can select only one area at a time
- It only traces the outline, any inner holes are selected with the object.
-Note that you should set the options by double clicking the tool. The default mode, 'Legacy', may be unreliable in some cases.

There is a plugin called Versatile Wand; it gives you more options:

http://imagejdocu.tudor.lu/doku.php?id=plugin:segmentation:versatile_wand:start


Michael
________________________________________________________________
On May 8, 2014, at 16:20, Sharmon Lebby wrote:

Hi Jacqui,
Thanks for the advice. I've tried these and find I'm not 100% sure how to go about these options.  I also can't find the "Magic Wand" is this a plugin?

Sharmon Lebby
Research Assistant
University of Texas San Antonio

On May 7, 2014, at 5:20 PM, Jacqui Ross wrote:

Hi Sharmon,

You could use the Magic Wand to select the white foreground and then fill the selection with red (Edit fill) by changing the Foreground colour in the colour palette.

I'm assuming that your background is all the same grey value, i.e. white and that you want a solid red foreground.

Otherwise, you might be better to make the image greyscale and then use/create a Look Up Table.

Kind regards,

Jacqui

Jacqueline Ross
Biomedical Imaging Microscopist
Biomedical Imaging Research Unit
School of Medical Sciences
Faculty of Medical & Health Sciences
The University of Auckland
Private Bag 92019
Auckland 1142, NEW ZEALAND

Tel: 64 9 923 7438
Fax: 64 9 373 7484

http://www.fmhs.auckland.ac.nz/sms/biru/


-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Sharmon Lebby
Sent: Thursday, 8 May 2014 5:13 a.m.
To: [hidden email]
Subject: converting colors

Hi,
I have an image that currently has a black background and red foreground.  What I want is a white background with a red foreground for easier viewing in a presentation. I'm wondering if this is something that can be accomplished in ImageJ.  I've tried importing an .ims file as a hyperstack using custom coloring (white foreground, black background) and then inverting the image but is there a way to then change the foreground to red?


Sharmon Lebby
Research Assistant
University of Texas San Antonio


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

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


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

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


--
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: converting colors

Gabriel Landini
> I have an image that currently has a black background and red foreground.
> What I want is a white background with a red foreground for easier viewing
> in a presentation.

Cell Profiler has (or had) an interesting "Invert for Printing" script, but I
never used CP.
Here is an ImageJ macro version of that, which I think does what you want.
Cheers

Gabriel

//------------------8<---------------------
// Invert_for_printing
// Inverts a fluorescent RGB composite so it has white background
// Heavily colocalised areas might become obscured
// G. Landini at bham. ac. uk
// 28 Nov 2009
setBatchMode(true);
a="ori";
run("Duplicate...", "title=ori");
b="inverted_for_printing";
run("Duplicate...", "title="+b);
selectWindow(b);
run("Set...", "value=255");
selectWindow(a);
run("RGB Stack");
setSlice(1); // just in case
selectWindow(b);
run("RGB Stack");
setSlice(2);
imageCalculator("Subtract",b,a); //G
selectWindow(b);
setSlice(3);
imageCalculator("Subtract", b,a); //B
selectWindow(a);
setSlice(2);
imageCalculator("Subtract", b,a); //B
selectWindow(b);
setSlice(1);
imageCalculator("Subtract", b,a); //R
selectWindow(a);
setSlice(3);
imageCalculator("Subtract", b,a);//R
selectWindow(b);
setSlice(2);
imageCalculator("Subtract", b,a);//G
run("RGB Color");
setBatchMode(false);
//------------------8<---------------------

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

Re: converting colors

Jerome Mutterer-3
Dear Sharmon, dear Gabriel
you can also do it by inverting the image, then rotating the hue:

run("Invert");
run("HSB Stack");
run("Macro...", "code=v=(v+128)%255 slice");
run("RGB Color");

Sincerely,

Jerome


On 9 May 2014 10:24, Gabriel Landini <[hidden email]> wrote:

> > I have an image that currently has a black background and red foreground.
> > What I want is a white background with a red foreground for easier
> viewing
> > in a presentation.
>
> Cell Profiler has (or had) an interesting "Invert for Printing" script,
> but I
> never used CP.
> Here is an ImageJ macro version of that, which I think does what you want.
> Cheers
>
> Gabriel
>
> //------------------8<---------------------
> // Invert_for_printing
> // Inverts a fluorescent RGB composite so it has white background
> // Heavily colocalised areas might become obscured
> // G. Landini at bham. ac. uk
> // 28 Nov 2009
> setBatchMode(true);
> a="ori";
> run("Duplicate...", "title=ori");
> b="inverted_for_printing";
> run("Duplicate...", "title="+b);
> selectWindow(b);
> run("Set...", "value=255");
> selectWindow(a);
> run("RGB Stack");
> setSlice(1); // just in case
> selectWindow(b);
> run("RGB Stack");
> setSlice(2);
> imageCalculator("Subtract",b,a); //G
> selectWindow(b);
> setSlice(3);
> imageCalculator("Subtract", b,a); //B
> selectWindow(a);
> setSlice(2);
> imageCalculator("Subtract", b,a); //B
> selectWindow(b);
> setSlice(1);
> imageCalculator("Subtract", b,a); //R
> selectWindow(a);
> setSlice(3);
> imageCalculator("Subtract", b,a);//R
> selectWindow(b);
> setSlice(2);
> imageCalculator("Subtract", b,a);//G
> run("RGB Color");
> setBatchMode(false);
> //------------------8<---------------------
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>



--
Jerome Mutterer
CNRS - Institut de biologie moléculaire des plantes
 12, rue du Général Zimmer
67084 Strasbourg Cedex
T 0367155339
www.ibmp.cnrs.fr

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

Re: converting colors

Sharmon Lebby
wow! thanks everyone for all the help

Sharmon Lebby
Research Assistant
University of Texas San Antonio

On May 9, 2014, at 4:12 AM, Jerome Mutterer wrote:

Dear Sharmon, dear Gabriel
you can also do it by inverting the image, then rotating the hue:

run("Invert");
run("HSB Stack");
run("Macro...", "code=v=(v+128)%255 slice");
run("RGB Color");

Sincerely,

Jerome


On 9 May 2014 10:24, Gabriel Landini <[hidden email]<mailto:[hidden email]>> wrote:

I have an image that currently has a black background and red foreground.
What I want is a white background with a red foreground for easier
viewing
in a presentation.

Cell Profiler has (or had) an interesting "Invert for Printing" script,
but I
never used CP.
Here is an ImageJ macro version of that, which I think does what you want.
Cheers

Gabriel

//------------------8<---------------------
// Invert_for_printing
// Inverts a fluorescent RGB composite so it has white background
// Heavily colocalised areas might become obscured
// G. Landini at bham. ac. uk
// 28 Nov 2009
setBatchMode(true);
a="ori";
run("Duplicate...", "title=ori");
b="inverted_for_printing";
run("Duplicate...", "title="+b);
selectWindow(b);
run("Set...", "value=255");
selectWindow(a);
run("RGB Stack");
setSlice(1); // just in case
selectWindow(b);
run("RGB Stack");
setSlice(2);
imageCalculator("Subtract",b,a); //G
selectWindow(b);
setSlice(3);
imageCalculator("Subtract", b,a); //B
selectWindow(a);
setSlice(2);
imageCalculator("Subtract", b,a); //B
selectWindow(b);
setSlice(1);
imageCalculator("Subtract", b,a); //R
selectWindow(a);
setSlice(3);
imageCalculator("Subtract", b,a);//R
selectWindow(b);
setSlice(2);
imageCalculator("Subtract", b,a);//G
run("RGB Color");
setBatchMode(false);
//------------------8<---------------------

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




--
Jerome Mutterer
CNRS - Institut de biologie moléculaire des plantes
12, rue du Général Zimmer
67084 Strasbourg Cedex
T 0367155339
www.ibmp.cnrs.fr<http://www.ibmp.cnrs.fr>

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


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