BlendColors

General Purpose

This function allows you to assign a different color to each wave while also giving you the capability to tailor the color to fit your own preferences. Normally, this function is used when you want to present your image in its final form for publications or slide/video formats.

Background

There are 3 primary colors (red, green, and blue (RGB)) that are used to create the obtainable colors in the BlendColors function. New colors that are created in BlendColors are a composite (blend) of the 3 primary colors. Each individual component of the primary colors range in value from 0 to 1 where 0 means no contribution of that component and 1 means 100% contribution. For example, Dave's favorite color purple is a blend of (R=0.55, G=0.13, B=1.00).

Note that each image (wavelength) now must be described by 3 components. Now here comes a little tricky part in the terminology, each of these components is a wave. So for example if you originally had a one wavelength image, let's say a DAPI image of chromosomes, but you wanted to be perverse and color it yellow instead of the standard blue, the resulting image would consists of 3 waves and it would show up in the window menu bar as having 3 waves (3 black squares clicked on). If you want to have a little fun, you can turn off 2 of the waves and see the contribution of the one remaining wave to your image. Now for the surprise, there is actually a fourth wave, the opacity, that also can be assigned. This opacity value is used when you make a volume rendered image. More details about this value will be described later in the description of the different methods used to create the blended image.

An important part of BlendColors is the Scale Function under the F pulldown on the window. You should scale your image in True Color to get the correct brightness for your image. BlendColors uses the scaling parameters that you select for each wavelength and remaps the intensities to fit a scale of 0 to 255. For example, if you wanted to make your chromosomes transparent (DAPI image), the boundaries of the max and min scale should extend way beyond where the cutoff for the Dapi intensities range. If you want to accentuate the chromosome image, you would tighten your scale values around the intensities you wish to highlight.

Basic Use of BlendColors

1. Load an image(s) to a window or call up a filename

2. Select a window or filename for output

3. Scale the image appropriately. Read about how to use the new BlendColors scaling
function by using the Scaling Wid Button.

4. Click on {show colors} and a color palette should pop up.

5. Also click on {color params}. This will show you what colors you eventually selected for each wavelength

6. In the BlendColors main menu, click the wavelength on that you want to color (only 1 wavelength is colored at a time)

7. Go to the color palette and click on the color you like. Below the color palette is a bar representing the range of color that you selected that will be assigned to your scaled intensity values.

8. If you are satisfied with you color, hit the green bar {accept color}. The color you have selected should appear in the {color param} pop up window. The values for RGB should also be displayed. You can save your color assignments by hitting {save_colors} or if you had some already stored you can read them back with the {restore} button.

9. Repeat steps 6-9 until you have assigned all the wavelengths.

10. Next select the method in which to blend the colors (choices are additive,max opacity, priority) and if you are planning to volume render your image, click on {opacity wave}.

11. Click on all wavelengths that you want blended in the BlendColors main menu (sometimes you might forget to turn them back on after selecting colors one wavelength at a time)

12. Hit DoIt

Important Parameters

W
: Allows you to select which wavelength you want to assign a color. In addition, when DoIt is hit, BlendColors will only run on those wavelengths that are highlighted.

show colors: Pops up a color palette from which you assign you colors by clicking on the color you want with the mouse. The bar below the wheel indicates what color you have selected. If you are satisfied with the color you click the green {accept color} bar.

color params: This pop up menu shows you what colors you have selected for each individual wavelength both graphically and numerically.
   save colors to file allows you to save your color selection to a file.
   load new colors to file allows you to read in a saved color selection.
   set a default color file pops up a file selection menu so that you can choose
      from color files you have already saved to set one as your default colors. When
      you do this, the next time you bring up BlendColors, it will automatically load
     your default colors. You can always change your colors and set a different color
     file as your default. The default file is located in your .iveprefs dir. and is called
     blend.select.

method: There are 3 methods so far to assign the blended colors which can be selected from the yellow pulldown menu. The way these methods differ is in the way they calculate the blended colors from the intensity and color value for each pixel. Let's say that pixel 1 in wavelength 1 has an intensity value of I(1) whereas pixel 1 in wavelength 2 is I(2). Lets say that you assign RGB values to each of these pixels through your selection of a color. So now for wavelength 1 at pixel 1 you have R(1),G(1) and B(1) and for wavelength 2 R(2), G(2), B(2). How one combines these values can have different effects for your resulting blended image.

additive - This just averages the RGB values.
For example for R(blend):
R(blend)= [I(1)*R(1) + I(2)*R(2)]/[R(1)+ R(2)]

max intensity - This method compares the intensity of all the wavelengths for the same pixel and only uses the intensity with the maximum value to make the final image.

For example for R(blend)
If I(1) > I(2), R(blend) = I(1)*R(1)

priority - This method allows you to assign a wavelength to be the lowest priority.

For example for R(blend):
If wavelength 1 is chosen as the lowest priority wavelength

R(blend) = [I(1)-I(2)]*R(1) + I(2)*R(2)]/[R(1)+R(2)]

opacity wave: This is used when you want to make a volume-rendered image in the volume viewer function. The opacity that is assigned is based on your scaled image. For example, if you scale your image with a min=50 and max=2000, every intensity below your minimum cutoff will be completely transparent while everything above the max cutoff will be completely opaque and anything in between will be intermediate.

Brightness: Brightness of the blended image can be adjusted using this bar.

Scaling Wid: When you hit this button instead of Doit, you will bring up a window
with one section of color blended data., That section is determined by entering the z and
T section in the fields beside this button. A scaleing menu will also come up that works
the same way as the Scale program, only when you are selecting waves to scale, you are
selecting waves from the original data, and the resulting scaled image will be the blended
image with the new scaling. You can move thru and look at the different sections of the
data by using the arrows on either side of the Z and T fields or by simply entering the
desired section number in these fields. When you are satified with the scaling, then you
can hit Doit, and the entire data set will be created with your selected scaling.

DoIt: Runs the BlendColors function on the wavelengths you selected using the method selected.

Magic Keys

None for this function

Helpful Hints

There are already several saved BlendColors parameters that Abby determined to be particularly good for printed figures. These files are saved in the COLORS directory of the Priism distribution.

When you select colors, dark blue is a poor choice and will not print well.

Note that the colors you see on the screen will not always correspond with the colors that appear in the print. This is dependent on the color printer that you use. A good rule of thumb is make it brighter than you think it should be, especially if you are printing onto a transparency.