Skip to contents

Data I/O

Read and write hyperspectral data cubes

hsi_cube()
Create an HSI Cube Object
print(<hsi_cube>)
Print an hsi_cube Object
summary(<hsi_cube>)
Summarize an hsi_cube Object
dim(<hsi_cube>)
Get Dimensions of an hsi_cube
`[`(<hsi_cube>)
Subset an hsi_cube Object
as.data.frame(<hsi_cube>)
Convert hsi_cube to Data Frame
as_tibble.hsi_cube()
Convert hsi_cube to Tibble
hs_read_cube()
Read a Hyperspectral Data Cube from Any Supported Format
hs_read_envi()
Read an ENVI Hyperspectral Image File
hs_read_tiff()
Read a Multi-Channel TIFF File
hs_read_cubert()
Read a Cubert .cu3s Session File
hs_write_envi()
Write an HSI Cube to ENVI Format
hs_write_tiff()
Write an HSI Cube to Multi-Band TIFF
hs_export_png()
Export a Single-Band Image as PNG

Calibration

Radiometric calibration and correction

hs_calibrate()
Calibrate Raw HSI Data to Reflectance
hs_dark_correct()
Apply Dark Current Correction
hs_white_normalize()
Apply White Reference Normalization
hs_fix_bad_pixels()
Detect and Correct Bad Pixels

Preprocessing

Spectral smoothing, normalization, and transformation

hs_smooth()
Savitzky-Golay Spectral Smoothing
hs_snv()
Standard Normal Variate Correction
hs_msc()
Multiplicative Scatter Correction
hs_derivative()
Spectral Derivative
hs_absorbance()
Convert Reflectance to Absorbance
hs_continuum_removal()
Continuum Removal
hs_resample()
Resample Spectra to New Wavelength Grid

Biomedical Indices

Clinical tissue indices for surgical HSI

hs_sto2()
Compute Tissue Oxygen Saturation (StO2)
hs_npi()
Compute Near-Infrared Perfusion Index (NPI)
hs_thi()
Compute Tissue Hemoglobin Index (THI)
hs_twi()
Compute Tissue Water Index (TWI)
hs_ndi()
Compute Normalized Difference Index (General Purpose)
hs_clinical_indices()
Compute All Available Clinical Indices

Analysis

Dimensionality reduction, classification, and unmixing

hs_pca()
PCA on Hyperspectral Cube
hs_mnf()
Minimum Noise Fraction Transform
hs_umap()
UMAP Embedding of Spectral Data
hs_sam()
Spectral Angle Mapper Classification
hs_classify_svm()
SVM Pixel Classification
hs_classify_rf()
Random Forest Pixel Classification
hs_unmix_nnls()
Linear Spectral Unmixing via NNLS
hs_beer_lambert()
Beer-Lambert Chromophore Fitting
hs_endmembers()
Extract Endmember Spectra from a Cube

ROI Analysis

Region-of-interest tools

hs_roi_rect()
Define Rectangular ROI
hs_roi_polygon()
Define Polygon ROI
hs_roi_stats()
Compute ROI Statistics

Visualization

Plotting and clinical display

autoplot(<hsi_cube>)
Plot an hsi_cube Object
hs_plot_spectra()
Plot Spectral Profiles
hs_plot_image()
Plot Single-Band Spatial Image
hs_plot_rgb()
Synthesize RGB Image from Spectral Cube
hs_plot_clinical()
TIVITA-Style Clinical Panel Display
hs_plot_index()
Plot Index Map with Clinical Color Scale
scale_color_wavelength() scale_colour_wavelength()
Wavelength-to-Color Scale for Spectral Plots
theme_hsi()
Minimalist HSI Theme

Reference Data

Chromophore spectra and simulation

hs_chromophore_data()
Get Chromophore Extinction Coefficient Spectra
hs_simulate_cube()
Generate a Synthetic HSI Cube for Testing and Examples
hs_example_cube()
Get Example HSI Cube
hs_example_files()
Write Example ENVI Files to a Temporary Directory

Shiny Application

Interactive HSI explorer

hs_run_app()
Launch Interactive Hyperspectral Image Explorer