I want to use ImageJ to transforma a grayscale TIF to a colored TIF

7.4k views Asked by At

I have a TIF that was taken with only one color channel. It shows stuff that was Green or Red. But in the most image tools it is only shown as grayscale.

I want to transform this back to a colored image. That shows different values of Green or Red instead of grayscale.

ImageJ show this if I run this commands:

run("Channels Tool...");
run("Red");

but if I save the image the new color is not saved.

2

There are 2 answers

0
Janusz On

I have not found a way to save the color information in a tif. It seems the tif only saves the one channel and all non ImageJ programs display the tif in grayscale.

I now save the image into a jpg, because that is the target format that office programs can use.

open(folder + imageName);
run("Channels Tool... ");
run("Red"); 
saveAs("Jpeg", destFolder + imageName);
0
TSwayne On

If you want to keep the image as a TIFF, you can use the following:

run("Channels Tool...");
run("Red");
run("RGB Color");

Converting the image to RGB format allows other programs to interpret the color.

saveAs("Jpeg") works because it first converts the image to RGB as a requirement for the JPEG format.