| RGB | HSI |
|---|---|
![]() |
![]() |
Heidelberg Rodent HyperSPECTRAL Imaging Dataset (HeiRodSPECTRAL)
Welcome to the HeiRodSPECTRAL dataset! Here you can find 7875 hyperspectral imaging (HSI) cubes of 31 physiological organ classes across 13 rats annotated by 3 medical experts. For each organ, there are about 36 recordings per rat: 4 different intraoperative situations (situs) were imaged from 3 different angles (angle) for 3 times (repetition). The HSI cubes were acquired with the Tivita® Tissue camera system from Diaspective Vision. Each data cube has the dimensions (480, 640, 100) = (height, width, channels) with the 100 non-overlapping spectral channels being in the range from 500 nm to 1000 nm at a spectral resolution of around 5 nm. This repository contains the raw data, related metadata as well as the preprocessed files. The figures from the paper and example visualizations for each image are available at https://spectralverse-heidelberg.org/heirodspectral/figures/.
This Dataset is similar to the HeiPorSPECTRAL dataset containing HSI cubes of 20 physiological organ classes across 11 pigs, which were recorded under the same standardized protocol as the HeiRodSPECTRAL dataset. The HeiPorSPECTRAL website also contains information about the technical validation of the camera used to create the HeiRodSPECTRAL dataset.
Download
The full dataset can be downloaded at:
- https://e130-hyperspectal-tissue-classification.s3.dkfz.de/data/HeiRodSPECTRAL.zip
- SHA256:
22043558095be83e76810b5e7a82c528e6ed5b9e367025fde919998f03192b9a
We do not recommend downloading the zip archive via the browser due to the large size of 1,11 TiB. Instead, you may use a download manager of your choice or wget as in the example below. This will allow you to interrupt the download and continue it at a later point. Please make sure beforehand that you have enough free storage to both download the zip archive and decompress the content (around 1.3 TiB). Prior to decompression, it is recommended to verify the checksum of the downloaded file:
# Example for Unix-based systems
# Best to be run in a screen environment (e.g. https://linuxize.com/post/how-to-use-linux-screen/)
# Download all the data
wget --continue https://e130-hyperspectal-tissue-classification.s3.dkfz.de/data/HeiRodSPECTRAL.zip
# Verify the checksum of the downloaded file
curl https://e130-hyperspectal-tissue-classification.s3.dkfz.de/data/HeiRodSPECTRAL.sha256 | sha256sum -c -An exemplary version of the dataset (ZIP download) is also available for exploring without the need to download the full dataset. It only contains the two images
R016#2023_10_05_18_18_44(cartilage & patellar ligament) andR018#2023_10_11_09_03_55(colon). The zip file has a size of 411 MB and the unzipped file of 606 MB.
In addition, a medium-sized version of the dataset is available for environments with restricted storage space. Instead of 1.3 TiB for the full dataset, it only takes up 71 GiB. It contains two images per organ of each rat, including all three annotations. The zip file has a size of 62 GiB. The medium-sized dataset can be downloaded at:
- https://e130-hyperspectal-tissue-classification.s3.dkfz.de/data/HeiRodSPECTRAL_medium.zip
- SHA256_medium:
8d4f60eecfc44ff6850b826fa5236855a6663c458c5b22fb1949f1d11825530d
Usage
We recommend using the data with the htc framework, which offers:
- a pipeline to efficiently load and process the HSI cubes, annotations and metadata.
- a framework to train neural networks on the data, including the implementation of several classification and segmentation models.
- simple usage of pre-trained models.
Installation (example for Unix-based systems):
# Make the dataset available
export PATH_Tivita_HeiRodSPECTRAL=/mnt/nvme_4tb/HeiRodSPECTRAL
# Install the htc package
pip install imsy-htcAs a teaser, this is how you can use the htc framework to read a data cube, corresponding annotation and parameter images:
import numpy as np
from htc import DataPath, LabelMapping
# You can load every image based on its unique name
path = DataPath.from_image_name('R019#2023_10_15_11_45_50#0202-00118')
# HSI cube format: (height, width, channels)
print(path.read_cube().shape)
# (480, 640, 100)
# Annotated region of the selected annotator
mask = path.read_segmentation("polygon#annotator1")
print(mask.shape)
# (480, 640)
# Additional meta information about the image
print(path.meta("label_meta"))
# {'fur': {'situs': 1, 'angle': 0, 'repetition': 3}, 'skin': {'situs': 1, 'angle': 0, 'repetition': 3}}
# Tivita parameter images are available as well
sto2 = path.compute_sto2()
print(sto2.shape)
# (480, 640)
# Example: average StO2 value of the annotated skin area for annotator1
# The dataset_settings.json file defines the global name to index mapping
skin_index = LabelMapping.from_path(path).name_to_index("skin")
print(round(np.mean(sto2[mask == skin_index]), 2))
# 0.63
Dataset Structure
This dataset contains raw data, annotations, as well as preprocessed data. Annotations were performed by 3 different annotators using a polygon tool. Furthermore, the meta parameters situs, angle and repetition were annotated during image acquisition (see also the JSON Schema file for a meta description of these attributes). Preprocessed data (intermediates) is computed based on the data folder and contains aggregated information and file formats optimized for neural network training. The filename part '0202-00118' specifies that the images have been taken with a Halogen light source. So far, this is true for all images in the HeiRodSPECTRAL dataset. In the following, we explain the structure of this dataset in more detail:
.
โโโ data/ % Primary animal data (raw data and annotations)
โ โโโ subjects_halogen/ % Individual animal experiments using a halogen light source
โ โ โโโ RXXX/ % Folder with all images for this subject (the dataset_settings.json file contains the mapping of the three digit subject identifier used in the dataset to the two digit identifier used in the paper)
โ โ โ โโโ YYYY_MM_DD_HH_MM_SS/ % Image data of one recording
โ โ โ โ โโโ YYYY_MM_DD_HH_MM_SS_DICOM.dcm % DICOM file containing the RGB image and parameter images
โ โ โ โ โโโ YYYY_MM_DD_HH_MM_SS_meta.log % Meta information about the recording (e.g. software version, exposure time)
โ โ โ โ โโโ YYYY_MM_DD_HH_MM_SS_NIR-Perfusion.png % NIR perfusion image
โ โ โ โ โโโ YYYY_MM_DD_HH_MM_SS_OHI.png % Organ Hemoglobin Index (OHI)
โ โ โ โ โโโ YYYY_MM_DD_HH_MM_SS_Oxygenation.png % Oxygenation (StO2)
โ โ โ โ โโโ YYYY_MM_DD_HH_MM_SS_Parameter.png % Collage with RGB, StO2, NIR, OHI and TWI images
โ โ โ โ โโโ YYYY_MM_DD_HH_MM_SS_RGB-Image.png % RGB image
โ โ โ โ โโโ YYYY_MM_DD_HH_MM_SS_SpecCube.dat % Hyperspectral image data cube (float32 binary data of the 30720000 reflectance values)
โ โ โ โ โโโ YYYY_MM_DD_HH_MM_SS_THI.png % Tissue Hemoglobin Index (THI)
โ โ โ โ โโโ YYYY_MM_DD_HH_MM_SS_TLI.png % Tissue Lipid Index (TLI)
โ โ โ โ โโโ YYYY_MM_DD_HH_MM_SS_TWI.png % Tissue Water Index (TWI)
โ โ โ โ โโโ annotations/ % Available annotations for this image
โ โ โ โ โโโ YYYY_MM_DD_HH_MM_SS_meta.json % Structured meta annotation (situs, angle, repetition)
โ โ โ โ โโโ YYYY_MM_DD_HH_MM_SS#polygon#annotator1#label#binary.png % Binary segmentation mask of the polygon from annotator 1 (white = annotated region)
โ โ โ โ โโโ YYYY_MM_DD_HH_MM_SS#polygon#annotator1#label#coordinates.csv % Polygon coordinates for the mask from annotator 1 (col, row)
โ โ โ โ โโโ YYYY_MM_DD_HH_MM_SS#polygon#annotator2#label#binary.png % Binary segmentation mask of the polygon from annotator 2 (white = annotated region)
โ โ โ โ โโโ YYYY_MM_DD_HH_MM_SS#polygon#annotator2#label#coordinates.csv % Polygon coordinates for the mask from annotator 2 (col, row)
โ โ โ โ โโโ YYYY_MM_DD_HH_MM_SS#polygon#annotator3#label#binary.png % Binary segmentation mask of the polygon from annotator 3 (white = annotated region)
โ โ โ โ โโโ YYYY_MM_DD_HH_MM_SS#polygon#annotator3#label#coordinates.csv % Polygon coordinates for the mask from annotator 3 (col, row)
โ โ โ โโโ [more images]
โ โ โโโ [more subjects]
โ โโโ extra_label_symbols/ % Label symbols used in the visualizations as PDF and PNG files
โ โ โโโ Cat_00_stomach.pdf
โ โ โโโ Cat_00_stomach.png
โ โ โโโ Cat_00_stomach.svg
โ โ โโโ [more labels]
โ โโโ dataset_settings.json % Structured information about the dataset (e.g. label mapping for the blosc segmentations below)
โ โโโ meta.schema % JSON Schema defining the structure of the *_meta.json annotation files (possible attributes and types)
โ
โโโ intermediates/ % Processed animal data
โโโ preprocessing/ % Preprocessed files per image
โ โโโ L1/ % L1 normalized data cubes as float16 suitable for network training
โ โ โโโ RXXX#YYYY_MM_DD_HH_MM_SS#0202-00118.blosc % Compressed binary data
โ โ โโโ [more images]
โ โโโ parameter_images/ % Tissue parameter images as dictionary of float32 data (StO2, NIR, TWI, OHI, TLI, THI, background)
โ โโโ RXXX#YYYY_MM_DD_HH_MM_SS#0202-00118.blosc % Dictionary of compressed binary data
โ โโโ [more images]
โโโ profiles/ % pdf documents with visualizations comparable to the paper (supplement figure 5+, referred to as profiles), but per image instead of aggregated over the dataset
โ โโโ polygon#annotator1/ % Profile documents for annotator 1
โ โ โโโ polygon#annotator1@00_stomach.pdf % Profiles for all stomach images of annotator 1
โ โ โโโ [more labels]
โ โโโ polygon#annotator2 % Profile documents for annotator 2
โ โโโ polygon#annotator3 % Profile documents for annotator 3
โโโ rgb_crops/ % Same RGB images as in the data folder but without the black border (shape 480 x 640)
โ โโโ RXXX/
โ โ โโโ RXXX#YYYY_MM_DD_HH_MM_SS#0202-00118.png
โ โ โโโ [more images]
โ โโโ [more subjects]
โโโ segmentations/ % Annotation masks per image as dictionary with annotation name as key and label mask as value. The label mask is an np.ndarray of type uint8 and shape 480 x 640. It contains a unique label index for each pixel and combines all available annotations for this image (in case more than one label is annotated). The dataset_settings.json file describes the meaning of the label indices
โ โโโ RXXX#YYYY_MM_DD_HH_MM_SS#0202-00118.blosc
โ โโโ [more subjects]
โโโ tables/ % Tables with aggregated data
โ โโโ HeiRodSPECTRAL@median_spectra@polygon#annotator1.csv % Table with precomputed median spectra (unnormalized, L1-normalized and standard deviation). One row corresponds to a single label of one image annotated by annotator 1. Additional meta information is included as well (e.g. meta information about the recording)
โ โโโ HeiRodSPECTRAL@median_spectra@polygon#annotator1.feather % Same table as the above CSV file but stored in the feather format (smaller file size and faster to read from within Python)
โ โโโ HeiRodSPECTRAL@median_spectra@polygon#annotator2.csv
โ โโโ HeiRodSPECTRAL@median_spectra@polygon#annotator2.feather
โ โโโ HeiRodSPECTRAL@median_spectra@polygon#annotator3.csv
โ โโโ HeiRodSPECTRAL@median_spectra@polygon#annotator3.feather
โ โโโ HeiRodSPECTRAL@meta.csv
โ โโโ HeiRodSPECTRAL@meta.feather % Structured meta information about an image. This table is required by the htc framework and there is usually no need to load it manually (the median spectra tables includes the meta information as well)
โโโ view_organs/ % Interactive visualizations for each image showing the annotated polygons for all annotators and the corresponding median spectra. You can open any document and use the navigation bar to open any image from the dataset
โโโ xx_organ/ % All images which contain this organ (an image may be part of two organ folders if it contains multiple annotated regions)
โ โโโ RXXX#YYYY_MM_DD_HH_MM_SS#0202-00118.html
โ โโโ [more images]
โโโ [more labels]Please also have a look at the file reference tutorial from the HeiPorSPECTRAL Dataset, which contains detailed information about the different file formats and examples of how to read them in Python.
Frequently Asked Questions
Where can I find the raw spectral data?
YYYY_MM_DD_HH_MM_SS_SpecCube.dat file (contained within data/subjects/R0xx/YYYY_MM_DD_HH_MM_SS) is the file that contains the raw spectral data with reflectance values for each band and pixel position. Each data cube has the dimensions (480, 640, 100) = (height, width, channels) with the 100 spectral channels being in the range from 500 nm to 1000 nm at a spectral resolution of around 5 nm.Why are the individual rats (subjects) named R002 to R024 in the dataset, but not in the figures of the manuscript?
| subject identifier (manuscript) | subject identifier (dataset) | date of recordings | number of organs recorded | sex |
|---|---|---|---|---|
| R01 | R002 | 2023_09_19 | 30 | f |
| R02 | R003 | 2023_09_20 | 31 | f |
| R03 | R014 | 2023_10_03 | 31 | f |
| R04 | R015 | 2023_10_04 | 31 | f |
| R05 | R016 | 2023_10_05 | 31 | f |
| R06 | R017 | 2023_10_10 | 31 | f |
| R07 | R018 | 2023_10_11 | 31 | f |
| R08 | R019 | 2023_10_15 | 31 | f |
| R09 | R020 | 2023_10_19 | 31 | f |
| R10 | R021 | 2023_10_24 | 31 | f |
| R11 | R022 | 2023_10_25 | 31 | f |
| R12 | R023 | 2023_10_26 | 31 | f |
| R13 | R024 | 2023_10_31 | 31 | f |
Do I need licensed software to work with the dataset?
What is L1-normalization and why do you use it for all your analysis?
# data.shape = [480, 640, 100]
data = data / np.linalg.norm(data, ord=1, axis=-1, keepdims=True)
data = np.nan_to_num(data, copy=False)As a consequence, the sum of absolute values for each spectrum will be 1 after this operation. Please note that negative reflectance values are possible due to white and dark calibration.
Normalization is crucial when working with spectral data as it can eliminate unwanted differences and shift the focus on important aspects. We demonstrate in the paper that only with normalization the measured reflectance values are comparable to spectrometer measurements (which are the gold standard). This is why we exclusively perform our analyses with normalized data. Preprocessed normalized data for every HSI cube is stored in intermediates/preprocessing/L1.
Why are the L1 preprocessed cubes stored in float16 instead of float32?
float16 significantly reduces the file size while we found the loss in precision to be neglectable (detailed precision analysis can be found in this notebook). Please note that it is still possible to cast the data to float32 after loading to increase precision for subsequent operations.What do the index values StO2, NIR, THI, TWI, OHI and TLI mean?
- Tissue oxygenation index (StO2): oxygen saturation of the tissue microcirculatory system
- Near-infrared perfusion index (NIR): perfusion of deeper tissue regions (up to several mms) which depends both on the oxygen saturation as well as the hemoglobin distribution.
- Tissue hemoglobin index (THI): amount of hemoglobin distributed in the tissue; specifically designed for skin tissue.
- Tissue water index (TWI): amount of water present in the tissue.
- Organ hemoglobin index (OHI): amount of hemoglobin distributed in the tissue; specifically designed for organ tissue and linearly related to the THI.
- Tissue lipid index (TLI): amount of lipids in the tissue.
Where do I find the index values (StO2, NIR, THI, TWI, OHI and TLI) of each recording in the dataset?
data/subjects/R0XX/YYYY_MM_DD_HH_MM_SS.
The raw data of the computed values can be found in: intermediates/preprocessing/parameter_imagesHow was the absorbance estimated?
How are RGB images reconstructed from the HSI data?
Are data from all organs of each rat recorded, or is any organ data missing?
- Rat R002: four images of the trachea (situs 1, angle 2, all repetitions) and (situs 3, angle 2, repetition 2)
- Rat R003: one image of the bladder (situs 2, angle 3, repetition 3), one of the lung (situs 1, angle 2, repetition 3), and one of the pleura (situs 1, angle 2, repetition 3).
Do all images show physiological organs?
If you have any additional questions about the dataset or its usage, feel free to head over to https://github.com/IMSY-DKFZ/htc and connect with us ๐ Alternatively, you can contact us at info@spectralverse-heidelberg.org.
License

This dataset is made available under the Creative Commons Attribution 4.0 International License (CC-BY 4.0). If you whish to use or reference this dataset, please cite our (future) paper
Data Protection (GDPR)
Neither this website nor any of its subdomains process any user data. No access logs are created. Files are served via the servers of all-inkl.com.
Acknowledgements
We acknowledge the data storage service SDS@hd supported by the Ministry of Science, Research and the Arts Baden-Wรผrttemberg (MWK) and the German Research Foundation (DFG) through grant INST 35/1314-1 FUGG and INST 35/1503-1 FUGG. This project has received funding from the European Research Council (ERC) under the European Unionโs Horizon 2020 research and innovation programme (NEURAL SPICING, Grant agreement No. 101002198) and was supported by the German Cancer Research Center (DKFZ) and the Helmholtz Association under the joint research school HIDSS4Health (Helmholtz Information and Data Science School for Health). It further received funding from the Surgical Oncology Program of the National Center for Tumor Diseases (NCT) Heidelberg and the structured postdoc program of the NCT. In addition, funding was recieved by the Else-Krรถner-Fresenius-Stiftung through grant 2021_EKEA.166.

