Widgets Cube Widget Demonstration


The Cube Widget ('Widgets -> Data Cube') is for displaying a series of images, much like NIH image stacks.

The Cube widget is adapted to spectral images: The data can be read in image by image, or spectrum by spectrum. Typically, all of the images or spectra are stored in one file, or a folder of individual TIFF images.

A summed spectrum can be made by selecting an area from one of the images in the cube. A summed image can be made by selecting a region from a spectrum. A second cube with summed images (typically corresponding to peaks in spectra) can be input to the Principal Component Analysis tool.

The utility of the Cube Widget is shown below on two different data sets or cubes.

Demo 1: Spectral image of IC device.

Raw format.

Ian Anderson of Oak Ridge National Labs supplied this spectral image of an integrated circuit. This data file was featured in: I.M. Anderson, "Applications of multivariate statistical analysis (MSA) in microanalysis," Proc. AMAS V, eds. M. Blackford, C. Nockolds, M. Phillips, G. Thorogood and R. Wuhrer (1999) 19., and in I.M. Anderson, "Quantitative chemical mapping with low-voltage EDS spectrum imaging and multivariate statistical analysis", Proc. Microscopy Microanalysis 1999, 318.

The data file was written in Emispec 2.0 raw file format, spectrum by spectrum. Using the 'File -> Import' widget, the correct settings look like this.

'I/0 -> Import from file', (selecting 'all files' for "Files of type" on the PC), and selecting Chip_5b.s01, results, after half a minute on a 800Mhz machine, in these windows, which show an image after a little rearrangement.

'Info -> Size and Limits' displays some information on the cube (or any other image window). Here, the information is displayed in a text window that can be edited, cut and pasted, and resized. New information is added to the window at the insertion point. The window is renamed when different types of information are added to it. The maximum value in this data set is 39.

Memory usage for the cube could be cut in half by using the 'Cube -> Clip to Byte' command, which would make the pixel type (unsigned-byte 8), or 8 bits. We will not do that here. If we did, the data could be saved in raw format using

(Note: If files are exported from Lispix, a *.rpl - for 'raw parameter list' file is also written with the parameters of the import window. If an rpl file is there, it is used automatically to open the raw image file.).

The next reasonable thing to do is view the global spectrum. Each point in the spectrum is a sum over all the pixels in the image corresponding to that channel. A spectrum of an area of the image is obtained in a similar way:

(If the window should become covered, the rectangle can be shown again using : 'Rectangle -> Draw'. )

Resize the plot if desired. Note that some peaks are now missing, reasonably enough.

Another way to initially examine the cube is to sum all of the channels together. First, select the entire range of a spectrum. Then display the corresponding image, the global image for the cube. Images for individual peaks are made in a similar way. Note that the title of the image denotes the slice or channel range that it represents.

Image titles are changable using '*Buttons* -> Arrange -> Change Titles'.

Lispix can do Principal Component Analysis on the data image by image. To do this the number of images must be reduced. A reasonable way to do this is to chop the spectrum into reasonal pieces - say peaks and the regions between them - and make a cube of summed images corresponding to the pieces. The global spectrum shows 5 peaks.

Using '*Cube* -> Sliders -> Layers', making a slider with 7 bands (or regions), and sliding the first three bands over the first three peaks looks like this. The completely adjusted layers slider looks like this. The settings can be saved for later use with '*Buttons* -> Color Slider -> Save to File'.

The resulting cube, made with '*Cube* -> Cube -> From Layers', has the corresponding seven summed images. The seven images can be viewed separately. This cube is a good candidate for Principal Component Analysis. The result is another cube with the score images, or component images. The Eigenvalues can be printed, plotted, and the loadings (or rotation matrix or Eigenvectors) shown by magnitude or value - to see what components represent what spectral peaks, or vs vs.

Evidently, the first three component images represent most of the data. Looking at the component images in order, however, shows that the next three component images, although they account for 1.3% or less of the variation in the data, also have visual information - they don't look like pure noise, as does the last component image. Evidently they are associated with smaller features of the sample, and thus inherently represent less of the total data variation.

A good check of whether or not enough component images have been retained for further analysis, is to reconstruct the original layer cube with a subset of the component cube. Using '*Cube* -> PCA -> Reconstruct Cube', and selecting components 0,1 and 2, then making individual windows as above, and putting the slices side by side with the originals shows by comparison that two of the original images are not reconstructed at all and that small spots are added to the last image. Clearly, three components is not enough to represent the original data.

Demo 2:

Unidentified sample,

Emispec 3.x series file format.

Emispec ESVision can save data cubes in a portable file format, their "series file format". The files have a .ser extension. This image cube is smaller, with fewer counts per pixel. '*Cube* -> Load -> as Emispec series file' Select Sample1b.ser (Name is for illustrative purposes only -- datais not included in sample images). Note that this opens data cubes, and not the .bin image files.

To open the *.bin files, use '*Buttons* -> File -> Info Other Formats -> Emispec *.bin -> Open Image'.

Get information about the loaded image

Type of data using

Both of these say about the same thing - that the image is 71x48 spectra with 2048 channels each.

The spectrum can be inspected in more detail using the navigator ('*Buttons* -> Navigate -> Make Navigator') and moving the rectangle, red arrow, (show with 'Draw Rect') by one of its five handles (small circles). The rectangle in this position gives a zoomed view. The global spectrum would indicate that there is no data in the channels above 1000. Moving the rectangle in the Navigator to the right and making it very short seems to support this, as the right half of the spectrum shows no discernable peaks. The right half of all the spectrum could then be chopped off using '*Cube* -> Cube -> Crop using region'. The cube could also be converted (clipped) to have byte channels in the spectrum. These two steps reduce the size of the data cube by a factor of four, with no loss of information. Summing the images for the entire spectrum (of the reduced cube) shows six distinct blobs.