Tutorial 1 | Tutorial Contents | Tutorial 3

Tutorial 2: Image Processing Using Lispix

This tutorial is meant to follow tutorial 1 on basic image processing and analysis.  The user has already mastered creating images.  For the purposes of this tutorial, it is helpful to have a data cube already opened with several images available for experimentation.  The next step is to process the images to highlight or improve their quality.  After completing this tutorial, the user will be able to:

The Lispix Window

Resizing Images

Since most hyperspectral maps have low pixel density, it is often useful to zoom the map beyond its standard size.  Lispix has several functions that will expand the image to the desired size.  At the far right side of the menu bar on the main screen, press the E1 button to reveal several buttons below the menu bar. 

Press the “Zoom” button to select one of several size ratios.  Selecting “Zoom to Window” will allow the user to zoom the size of the image to the current window size.  Change the size of the window first by dragging on the bottom right corner.  The “Zoom to Arbitrary” command will allow the user to set a zoom ratio by typing in a number or decimal value.  The “In” and “Out” options will zoom in by the square root of two.  For instance, for an unaltered image, pressing the “In” button will zoom to 1.41 times.  Pressing it a second time will zoom to 2.0 times.

Should the user wish to resize the image to its original size, click the X1 button.

For larger maps or images, zooming will often create an image larger than the entire Lispix window.  If this happens, Lispix will not increase the window size.  Rather, the image itself will zoom to the desired level while the window will not change in size.  Clicking on the “No Scroll” button will change it to “Drag to Scroll,” and will allow the user to drag the image within the window to view it.  Clicking on the X1 button will re-center the image if the “Drag to Scroll” command is activated.

Advanced users may wish to explore using the “Navigator” tool to assist in viewing large images.

Two and Three Color Image Overlays

In hyperspectral mapping, it is frequently useful to develop two and three color maps to show the relationship among several different compounds in a map.  In the “Tools” menu, select “2 & 3 Variable” to open up the 2 & 3 variable menu box.

The example shown below already has three elemental maps of single elements ready to be combined.  To set a color for each map, first click on the image.  The outline will turn from a light blue to a dark blue (in standard windows color scheme).  This is now the “active image”.  After activating, click on the “Red/X” button to make that image appear red in the three color map.  Similarly, the “Green/Y” and “Blue/Z” buttons will apply that color to the map.  Repeat the process with all three images.

Once the necessary images are added to the menu box, click the “RGB Overlay” button and select “Make RGB Overlay”.  A new image will appear on the screen that combines all three original images using pixel colorization.  The three color images may be stored as .tiff, .jpeg and .raw files.

Lispix can also separate out each color phase from a color overlay.  To do so, select the colorized image and click on the “RGB Overlay” button.  Choose one of the options RGB->R, RGB->G, or RGB->B to separate out the red, green or blue phases.  The authors have found that sending an RGB image to colleagues and allowing them to separate out the individual elements is a good way to save time and avoid confusion while processing data.

The color overlay tool will be discussed in Tutorial 4 for advanced users.

Scatter Plots

After creating an RGB overlay, a scatter plot image can also be created based on scaled or original data.  The scatter plot can only be created after three images are selected in the 2 & 3 Variables menu box.  Click on the scatter plots button to create the scatter plot.

The scatter plot will appear with a thermalizer slider below the plot.  Because the pixels are grouped based on position and concentration, thermalization can be an excellent way to visualize the scatter plot.  In the example above, the area in bright yellow represents a high chi squared value for pixels in that region.  The thermalization can be changed like other sliders by clicking and dragging on the ends or in the middle.  Colorization sliders will be discussed in more detail later in this tutorial.

Image Processing Using Sliders

Lispix makes use of slider bars to adjust color, brightness, contrast and other image properties.  When opening a slider, a rectangular box will appear at the bottom of the active image.  Unlike the region slider used in the Data Cube menu box, the image sliders do not choose a region or a plot, but rather, moving the center of the slider (or color bar) will change the colorization scheme.

In all instances, if the colorization fails to produce a useful image, simply hit the “G!” button to return the image to the original, unaltered gray scale.

Clicking on any image will allow the user to colorize the image with the slider.  It is not necessary to open the same slider three times to alter three different images.  This is a useful tip to remember if the user wishes to apply the same colorization scheme to multiple images.  Remember to click on the active image, then drag the mouse over the slider; this will move the slider to the active image.  To colorize, click on the “C!” button.

Contrast, Brightness and Gamma Sliders

In the “Colorize” section of the menu bar, there are three sliders that will change the contrast, brightness and gamma value of an image.  It should be noted that Lispix contains more powerful image processing capabilities than programs such as MS Paint, Word, Powerpoint and Windows Picture and Fax Viewer.  When processing images for publication, it is highly recommended that all images be processed first using Lispix.  Any image can be saved by altering the image using the colorizer, then clicking File / Save As TIFF [or JPEG].

The contrast slider is very similar to the other sliders available in Lispix, such as the region slider.  Clicking and dragging on the center of the slider will move the entire bar, while clicking and dragging on either end will change the limits.  Similarly, the dimmer slider will change the brightness of the image.

The gamma slider contains only a center icon to slide between values of gamma correction.  A value for the current gamma is shown on the right side of the slider.  Clicking on the “info” button on the bottom right side of the slider will display a message box with the current gamma value and the average intensity of the pixels.

If the user wishes to change all three values to process an image, the image must be saved or converted in between slider changes.  For instance, after changing the contrast to the desired level, the user must save the image, and then open the saved image.  Once the new image is opened, the next slider may be applied.  Repeat the process until all necessary changes are made.

Alternatively, after each change is made, click Image / Convert to 8 bit gray level.  Another image will appear with the colorization made.

Thermal Colorizations

There are three thermal colorization sliders in the “Colorize” menu bar.  All are discussed below with accompanying pictures.  The purpose of colorization is to highlight certain features and differentiate phases with color.  The thermalizer uses a combination of red, orange and yellow to highlight the features.  The color of each pixel depends on the original brightness scale of the pixel, and those values are changed by clicking and dragging the slider either at the edges or in the center.

The “Thermal Slider” is the first slider listed in the “Colorize” menu.  This slider uses a color range from black to red to orange to yellow to highlight certain portions of the image.
The “Thermal CHI” slider is frequently used on darker images to bring up characteristics that are otherwise invisible.  This slider tends to make images more yellow.  This slider is also used in the scatter plots.
The “Thermal Sunset” slider is an intermediate slider.  It primarily uses orange to brighten the image, rather than red or yellow like the previous sliders.
The “Thermal Sunset 1 Slider” uses the thermal chi colorization, but only allows the user to slide the boundary slider. This slider is most useful for fast colorizations.
The “Thermal Log 3 Band” slider is used to separate out 4 specific phases in a hyperspectral map.  Phases that have trace values of 0.1 to 1 are colored in blue, with dark blue representing zero.  Intermediate phases from 1 to 10 are represented in green, with light green values representing 10 and dark green values representing 1.  Values above 10 are thermalized with red representing 11 and above, and orange representing values up to 100.  The user controls the thermalization scheme.  A more detailed description of log 3 band imaging is available in the help documentation for Lispix.
The “Multi Color Slider” allows the user to add multiple colors to an image.  When selected, a dialogue box will appear and allow the user to select the number of colors desired.  A slider will then appear below the active image.  This is a multiple threshold tool.  Like the threshold slider, the colors are solid, and not shaded as they are with the thermal sliders.

Cheat Sheet: Color Overlays and Scatter Plots

  1. Open or create three X-ray image files for analysis
  2. Select Tools / 2 & 3 Variable
  3. Activate one image by clicking on it
  4. In the 2 & 3 Variable menu box, click the “Red / X” button to assign the color red to the active image. 
  5. Repeat step 4 with the “Green / Y” and “Blue / Z” buttons to assign green and blue to other images.
  6. Click the “RGB Overlay” button and select “Make RGB” to create the image overlay.
  7. Click the “Scatter Plots” button to create a ternary image.
  8. Use the thermalizer below the plot to improve the image quality.
  9. Save the images using File / Save As from the menu bar

Cheat Sheet: Colorizers

  1. Open the image to be colorized
  2. Select a colorizer by choosing from the list in the “Colorize” menu.
  3. Click and drag on the slider to apply the colorization.
  4. If the colorizer does not produce the desired result, click on the gray “g!” button to return it to the original gray-scale image.  The colorization will not be applied to the image unless it is saved or converted.
  5. Save the image once the colorization is applied.  To apply multiple color schemes, re-open the saved file and close the old file.
  6. To apply the same colorization to multiple images, first activate a new image by clicking on it.  Then drag the cursor over to the slider.  The slider will move to the active image.  Click and drag on the slider to activate the colorization.