Importing Image Series

This functionality allows the user to import images and combine them together to a HSI cube. This is useful in some HSI measuring setups, where filter wheels are used and a camera collects multiple images of the sample with different wavelength filters.

After clicking on the menu to import an image series, the following window will show up:

_images/data_viewer_import_image_series_1.png

The user can select the button with the plus sign to add files to the list they want to include in the cube. They can select multiple files from the file chooser window that opens. The supported file formats are PNG, JPEG and TIFF.

After choosing the files, they will be opened by fluxTrainer. A progress window will open while that is happening:

_images/data_viewer_import_image_series_progress.png

After all images have been analyzed by fluxTrrainer, they will be added to the image table that is available. On the right hand side there will be a preview of the currently selected image.

_images/data_viewer_import_image_series_2.png

The table has the following columns:

  • Name: the file name that was analyzed, together with a checkbox that the user can use to select whether that image is to be used

  • Width: the width of the image

  • Height: the height of the image

  • Data Type: the scalar type of the data found in the image

  • Wavelength: what wavelength the image should be assigned to

The user must now assign a wavelength to each image so that fluxTrainer knows how to assemble the cube properly. fluxTrainer will provide an initial guess for each wavelength based on the filename of the image:

  • If the image is of the form name_NNNN.EXT, where NNNN is a floating point value (with a dot (.) as the decimal separator), and EXT is the file name extension that indicates the file format (e.g. tiff or png), then NNN will be used as the wavelength value.

    For example, a file with the name image_450.png will be assumed to have the wavelength 450 nm.

  • If the image is of the form name_NNNN_MMM.EXT, where NNNN is a floating point value (withh a dot (.) as the decimal separator), MMM is any non-negative integer, and EXT is the file name extension that indicates the file format (e.g. tiff or .png, then NNN will be used as the wavelength value, and MMM will be ignored. (It is assumed that multiple measurements were made for the same wavelength that should be averaged, see below.)

    For example, a file with the name image_570_3.png will be assumed to have the wavelength 570 nm.

After assigning wavelengths to the corresponding image files, fluxTrainer will combine all selected images to a cube.

The width and height of all images that are to be combined must be identical.

If each wavelength has been assigned exactly one image, and the scalar data type of all images is identical, then the resulting cube will have the same scalar data type as the images themselves. Otherwise fluxTrainer will automatically convert the images into an appropriate floating point data type. If a wavelength is assigned multiple images, those images will be averaged when creating the cube.

All numerical values in the images will be used as-is, without any scaling. This means that combining an 8bit image with a 16bit image may not yield the expected results. (As the 8bit image will have a range from 0 to 255, while the 16bit image will have a range from 0 to 65535.)

After the cube has been created by fluxTrainer, the import logic described in importing a cube, most notably the logic for adjusting the wavelength range of the source, will be applied.