Color and multichannel images

Color images can be manipulated in different ways in ImageJ. The most basic option would be to use a pseudo color image, which is an 8-bit image in which every intensity value has a corresponding RGB color, resulting in 256 colors. This color mode is called pseudo color or false color because the color correspondence can be manually changed, depending on the color palette (or the Lookup Table) that we select. The GIF image format stores 8-bit images with the color palette included, so when we open a file in this format it will be displayed in color, although values for every pixel will be limited to 256 possibilities. Open the tuberculosis_sample.gif file again using the File | Open menu option. Now navigate to Image | Lookup Tables. In this menu, many LUTs are offered to be selected. Choose the one named Fire and the result will be:

Color and multichannel images

16-bit image with a Lookup Table applied (Fire LUT) in order to display it with pseudo color

Tip

We can apply an 8-bit LUT to a 16-bit image. The pixel values are converted so that the original black is 0 and the original white is 255, and then the selected LUT is applied.You could also modify the current LUT from Image | Color | Edit LUT....

Pseudo color is a nice solution, because when you display a grayscale image with certain LUTs, your visual system perceives intensity differences better. But in many cases, you will want to work with images containing True Color information, which means 24 bits RGB values. Every basic color component (Red, Green, or Blue) is quantized with 256 possible values (8 bits), which results in 2^24 (16,777,216) possible colors. When you open an image that stores RGB values (for instance, most JPG files) and then move the mouse cursor over it, ImageJ status bar will display the three values separated by commas. You can open the sample image named Cardio.dcm and check that there are three values stored for every pixel.

When you work with RGB images, the color information is commonly meaningful, and manipulating this information may be an interesting process. For instance, if an area of the image is red or green, it could mean something depending on the way you obtained your image. RGB images do not allow independent processing of every color channel. Multichannel or composite images are designed for this, the main advantage being that every channel is kept separated, so any measure will be done only on one of them. Multichannel images are not limited to 8 bits per channel, since R, G, and B are single images with 8, 16, or 32-bit depth types. All these features can be observed opening the test image named tuberculosis.tif. This image belongs to a microscopy study of auramine-stained samples of tissues potentially infected with tuberculosis bacilli, and is a composition of three channels, R, G, and B, each coded with 8 bits.

The slider at the bottom of the image window is used to select which channel we want to work with, and the pixel values in the status bar will correspond to that channel. The image description below the window title will also describe the channel selected with the slider. If we run Analyze | Measure (Ctrl + M), we will see some measurements shown in another window and these results will relate to the current channel. If we now use the slider at the bottom of the image to select the green channel, and repeat the Analyze | Measure command, the new line in the Results window would be measured on that channel.

Note

The values shown in the Results window may vary depending on the particular parameters selected in the Analyze | Set Measurements… dialog.

Color and multichannel images

Multichannel microscopy image loaded in ImageJ (top) and Results window (bottom). The measurements have been made with the slider selecting a different channel every time, so each mean gray value is different in each Results table row.

More operations can be performed on the composite or RGB color images. Many of them are available from Image | Color | Channels Tool... (Ctrl + Shift + Z). From that interface, we can select which channels to display, show every channel as grayscale, convert a composite image to RGB (24 bits) type, split the channels creating three single images, or convert a RGB image to a composite image.

Tip

RGB images are not the only color model that ImageJ can handle. Hue, Saturation, Brightness (HSB) color model can be a more convenient representation in some situations, since brightness corresponds to the intensity information from the RGB image (R + G + B) / 3, and hue and saturation are closer to our conventional description of the colors as we perceive them (different reds correspond to the same hue and can be more or less saturated). If we want to work with this color model, we can convert any RGB image to a HSB stack from the Image | Type menu. If you are unsure about what color schema your image is using, the type menu option will tell you by displaying a tick next to the current image type.

Multichannel images have been our first contact with data of more than two dimensions. Now that we are familiar with these concepts, let's improve the possibilities and the number of dimensions in the following section.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset