Breadcrumbs

Spectral Viewer

Spectral Viewer enables quick viewing of very large images. Interactively compare hyperspectral data between parts of an image. Spectral Viewer is available as a tab for measurements in Breeze but also comes as a stand-alone program that can be used without Breeze as a general-purpose hyperspectral image viewer and editor with export functionality to Radiance, Reflectance and Absorbance spectral formats.

Features of Spectral Viewer

Spectral Viewer is similar to the Pixel Explore functionality in Breeze, but optimized to handle very large images, because the full hyperspectral data for the image isn’t loaded into memory.

Core features are:

  • Full-resolution pseudo-RGB display of three changeable wavelengths of the image with zoom and pan functionality

  • Built in handling of dark and white references

  • Switch between spectral modes to view data in Reflectance, Absorbance and Radiances and Raw format, when reference data is available

  • Interactive spectral analysis:

    • live hyperspectral data visualized in plots for the mouse cursor position and for manually created areas created in the image

    • create, move, edit, color and name areas as you like.

    • Save spectral data for areas to file in various formats. Can also be used as end members Create end members.

    • Load and compare with previously saved spectra

    • apply spectral filter preprocessing to the plotted data: Savitzky Golay, continuum removal, derivative, SNV, logarithm

  • Visualize data from Breeze predictions when it is available (in the measurement_prediction.raw file in the image’s folder):

    • add table samples from the Breeze measurement to Spectral Viewer to explore the spectral data for the objects

    • switch between different segmentation levels, and descriptors used in the analyses

  • Add sample areas created in Spectral Viewer as new Breeze Table samples for further analysis

Features unique to the Spectral Viewer tab in Breeze

This is how the Spectral Viewer tab looks for a measurement in Breeze, and the available commands in the right-click context menu:

image-20251125-131927.png
  • Switch segmentation level and the spectral data mode at the bottom.

  • Use Add Sample(s) button or context menu command to create samples in the Breeze Table from the areas in Spectral Viewer, to analyze them further in Breeze.

Learn about the rest of the Spectral Viewer user interface further down on this page.

Manipulating references or editing the image is not available on the Spectral Viewer tab in Breeze, but these features are available in other tabs for a measurement. Editing images.

Features unique to the stand-alone Spectral Viewer app

The Spectral Viewer app is started from Windows Start, or directly from the Breeze program folder. It looks like this:

You can start more than one Spectral Viewer at the time, to look at many images at the time.

image-20251125-132233.png
  • If the data comes from Breeze, you can switch Segmentation level and visualize data from different parts of the Analysis Tree in the upper left of the Settings pane.

  • In the Spectral plots group further down, you use select the Spectral data mode.

Use the main menu commands:

  • File > Open to load any supported file format directly from disk: ENVI Files (bil, bip, bsq, raw, img, bin, dat, envi), HySpex Files (hyspex). When you open an image, Spectral Viewer will look for dark and white references in the same folder as the image and load those as well.

  • File > Associate with file extensions to make Spectral Viewer the default app for support file types. Learn more in the next section.

  • Edit > Enable editing of the original file. Spectral Viewer is read-only by default to not risk overwriting an original image. Enable to access these command on the Edit menu:

    • Set RGB bands - set the wavelengths used for the pseudo RGB visualization

    • Import references or extract from part of the image

    • Crop image, rotate or transform the image in other ways as described in Editing images

  • View > References. View information on the Dark and White References associated with the image.

  • View > Metadata. Show some properties of the image.

  • Export:

    • Open the image in Prediktera’s Evince software, if it is installed. This is not recommended for very large images.

    • Export the file as a new file with spectral formats Raw, Reflectance, Absorbance, or Radiance Spectral imagingformats.

Learn about the rest of the Spectral Viewer user interface further down on this page.

How to make Spectral Viewer the default app in Windows for image files

In Spectral Viewer, do File > Associate with file extensions. Then click OK to confirm.

image-20251125-122005.png

Command line parameters

Spectral Viewer can be launched and open a measurement on the command line. The syntax is:

SpectrumViewer.exe fullPathToImage

For example, to start Spectral Viewer from the default installation location and open one of the measurements from the Breeze tutorial data from a folder on disk this command can be used:

"C:\Program Files\Prediktera\Breeze\SpectrumViewer.exe" "C:\data\BreezeTutorials\Record\Nuts_Classification\Train\Pecans shell\measurement.raw"

Using the Spectral Viewer: guide to the user interface

If your window doesn’t look like the below screenshot, you can expand and collapse or expand panes as needed by clicking the < and > buttons.

image-20251125-132616.png

The different parts of the screen are described from left to right in the following sections.

The pseudo RGB image visualization

The image is displayed as a pseudo RGB image, showing three bands selected from the hyperspectral image.

You can change these bands using Edit > Set RGB bands.

  • Use the drop-down above the image to switch between descriptors used in the Analysis Tree

  • Use the mouse wheel to zoom in the image. Middle-click and drag to pan in the zoomed in image.

  • Move the mouse around in the plot, and the spectral plots will show data for the mouse cursor position, and the status bar at the bottom shows the coordinates.

The Toolbar pane to the left

This pane has the Mouse mode and Selection shape buttons for mouse interaction with the image. These are described in the next section.

Then there are buttons for working with spectral plots:

  • Adding plots, deleting plots or switching layout

  • Add spectral filters in plots by clicking the Edit button:

  • image-20251125-124305.png

Interacting with the image

Use the left Toolbar to select what happens when you interact with the image using the mouse:

  • The Mouse mode in the left Toolbar determines what happens when you click in the image:

    • Add area - click and drag to create a sample area.

      image-20251125-125755.png

      The create area is drawn in the image, displayed in the spectral plots, and listed in the right Sample areas pane (see below).

    • Select areas - click and drag to select existing areas. These can be deleted with the context menu (see below).

    • Move area - click a single area, and drag to move it, click again to leave it at the new position. While you move it the spectral plot will update to show the average spectra in the area.

    • Zoom - click and drag to zoom. Tip: you can also zoom with the middle mouse wheel.

  • Switch click-and-drag selection shape between freeform, ellipse, rectangle

  • Right-click shows the context menu:

    image-20251125-130145.png
    • Select Add measurement samples as areas to add any Breeze Table samples for this image to the Spectral Viewer as areas.

    • Delete selected areas - useful when you have selected many smaller areas and quickly want to remove all

  • Below the image the current mouse cursor position is displayed, and the sample name and value for the selected descriptor (when applicable)

If you work with a very large image, do not select a too large part of it, as it requires loading everything into memory.

What happens when you select Segmentation

Selecting the Breeze segmentation to display affects what you see in the image, but also what you can select. Some examples:

  • If you select a segmentation that finds objects and removes background, then you will be able to add areas in Spectrum Viewer only for those objects. You cannot create areas in the background.

  • If you switch to the Measurement segmentation, you can create objects in the background.

  • If you use a segmentation that contains many smaller samples in Breeze, you can add those to Spectrum Viewer using the context menu. You could then select a subset and remove some of those added areas.

Spectral plots

Each plot is a scatter plot visualizing the spectral data. Data is visualized for the current mouse cursor position as well as the average spectrum for each sample area you have created.

image-20251125-130420.png

Use the mouse wheel to zoom.

Right-click to show the context menu where you can Save spectral data to save the values you see in a chart to file. This file can be loaded later in the right Sample areas pane (see below).

You can add more plots using the Settings pane.

The Samples pane to the right

The samples pane shows a list of all samples visualized in the image.

image-20251125-130528.png
  • Toggle the display of data under the cursor position

  • Edit sample names in the list. Change color by clicking it..

  • Re-order samples by using the toolbar button. This only affects how they are drawn in the spectral plot.

  • Pin samples to keep them in the plots, even if you Delete all other areas from the image, or if you switch to view data for a different image.

  • Load samples from file, for example as a reference for comparison.

If pretreatment is applied on any plot, the pretreatments will be applied to the loaded data as well. This can lead to unexpected results if loading already pretreated values into a plot that uses pretreatment.