1. Structure
  2. Life Sciences
  3. Biomedical Imaging
  4. Foundation
  5. Storage Format Spec
  • Home
  • What is TileDB?
  • Get Started
  • Explore Content
  • Accounts
    • Individual Accounts
      • Apply for the Free Tier
      • Profile
        • Overview
        • Cloud Credentials
        • Storage Paths
        • REST API Tokens
        • Credits
    • Organization Admins
      • Create an Organization
      • Profile
        • Overview
        • Members
        • Cloud Credentials
        • Storage Paths
        • Billing
      • API Tokens
    • Organization Members
      • Organization Invitations
      • Profile
        • Overview
        • Members
        • Cloud Credentials
        • Storage Paths
        • Billing
      • API Tokens
  • Catalog
    • Introduction
    • Data
      • Arrays
      • Tables
      • Single-Cell (SOMA)
      • Genomics (VCF)
      • Biomedical Imaging
      • Vector Search
      • Files
    • Code
      • Notebooks
      • Dashboards
      • User-Defined Functions
      • Task Graphs
      • ML Models
    • Groups
    • Marketplace
    • Search
  • Collaborate
    • Introduction
    • Organizations
    • Access Control
      • Introduction
      • Share Assets
      • Asset Permissions
      • Public Assets
    • Logging
    • Marketplace
  • Analyze
    • Introduction
    • Slice Data
    • Multi-Region Redirection
    • Notebooks
      • Launch a Notebook
      • Usage
      • Widgets
      • Notebook Image Dependencies
    • Dashboards
      • Dashboards
      • Streamlit
    • Preview
    • User-Defined Functions
    • Task Graphs
    • Serverless SQL
    • Monitor
      • Task Log
      • Task Graph Log
  • Scale
    • Introduction
    • Task Graphs
    • API Usage
  • Structure
    • Why Structure Is Important
    • Arrays
      • Introduction
      • Quickstart
      • Foundation
        • Array Data Model
        • Key Concepts
          • Storage
            • Arrays
            • Dimensions
            • Attributes
            • Cells
            • Domain
            • Tiles
            • Data Layout
            • Compression
            • Encryption
            • Tile Filters
            • Array Schema
            • Schema Evolution
            • Fragments
            • Fragment Metadata
            • Commits
            • Indexing
            • Array Metadata
            • Datetimes
            • Groups
            • Object Stores
          • Compute
            • Writes
            • Deletions
            • Consolidation
            • Vacuuming
            • Time Traveling
            • Reads
            • Query Conditions
            • Aggregates
            • User-Defined Functions
            • Distributed Compute
            • Concurrency
            • Parallelism
        • Storage Format Spec
      • Tutorials
        • Basics
          • Basic Dense Array
          • Basic Sparse Array
          • Array Metadata
          • Compression
          • Encryption
          • Data Layout
          • Tile Filters
          • Datetimes
          • Multiple Attributes
          • Variable-Length Attributes
          • String Dimensions
          • Nullable Attributes
          • Multi-Range Reads
          • Query Conditions
          • Aggregates
          • Deletions
          • Catching Errors
          • Configuration
          • Basic S3 Example
          • Basic TileDB Cloud
          • fromDataFrame
          • Palmer Penguins
        • Advanced
          • Schema Evolution
          • Advanced Writes
            • Write at a Timestamp
            • Get Fragment Info
            • Consolidation
              • Fragments
              • Fragment List
              • Consolidation Plan
              • Commits
              • Fragment Metadata
              • Array Metadata
            • Vacuuming
              • Fragments
              • Commits
              • Fragment Metadata
              • Array Metadata
          • Advanced Reads
            • Get Fragment Info
            • Time Traveling
              • Introduction
              • Fragments
              • Array Metadata
              • Schema Evolution
          • Array Upgrade
          • Backends
            • Amazon S3
            • Azure Blob Storage
            • Google Cloud Storage
            • MinIO
            • Lustre
          • Virtual Filesystem
          • User-Defined Functions
          • Distributed Compute
          • Result Estimation
          • Incomplete Queries
        • Management
          • Array Schema
          • Groups
          • Object Management
        • Performance
          • Summary of Factors
          • Dense vs. Sparse
          • Dimensions vs. Attributes
          • Compression
          • Tiling and Data Layout
          • Tuning Writes
          • Tuning Reads
      • API Reference
    • Tables
      • Introduction
      • Quickstart
      • Foundation
        • Data Model
        • Key Concepts
          • Indexes
          • Columnar Storage
          • Compression
          • Data Manipulation
          • Optimize Tables
          • ACID
          • Serverless SQL
          • SQL Connectors
          • Dataframes
          • CSV Ingestion
      • Tutorials
        • Basics
          • Ingestion with SQL
          • CSV Ingestion
          • Basic S3 Example
          • Running Locally
        • Advanced
          • Scalable Ingestion
          • Scalable Queries
      • API Reference
    • AI & ML
      • Vector Search
        • Introduction
        • Quickstart
        • Foundation
          • Data Model
          • Key Concepts
            • Vector Search
            • Vector Databases
            • Algorithms
            • Distance Metrics
            • Updates
            • Deployment Methods
            • Architecture
            • Distributed Compute
          • Storage Format Spec
        • Tutorials
          • Basics
            • Ingestion & Querying
            • Updates
            • Deletions
            • Basic S3 Example
            • Running Locally
          • Advanced
            • Versioning
            • Time Traveling
            • Consolidation
            • Distributed Compute
            • RAG LLM
            • LLM Memory
            • File Search
            • Image Search
            • Protein Search
          • Performance
        • API Reference
      • ML Models
        • Introduction
        • Quickstart
        • Foundation
          • Basics
          • Storage
          • Cloud Execution
          • Why TileDB for Machine Learning
        • Tutorials
          • Ingestion
            • Data Ingestion
              • Dense Datasets
              • Sparse Datasets
            • ML Model Ingestion
          • Management
            • Array Schema
            • Machine Learning: Groups
            • Time Traveling
    • Life Sciences
      • Single-cell
        • Introduction
        • Quickstart
        • Foundation
          • Data Model
          • Key Concepts
            • Data Structures
            • Use of Apache Arrow
            • Join IDs
            • State Management
            • TileDB Cloud URIs
          • SOMA API Specification
        • Tutorials
          • Data Ingestion
          • Bulk Ingestion Tutorial
          • Data Access
          • Distributed Compute
          • Basic S3 Example
          • Multi-Experiment Queries
          • Appending Data to a SOMA Experiment
          • Add New Measurements
          • SQL Queries
          • Running Locally
          • Shapes in TileDB-SOMA
          • Drug Discovery App
        • Spatial
          • Introduction
          • Foundation
            • Spatial Data Model
            • Data Structures
          • Tutorials
            • Spatial Data Ingestion
            • Access Spatial Data
            • Manage Coordinate Spaces
        • API Reference
      • Population Genomics
        • Introduction
        • Quickstart
        • Foundation
          • Data Model
          • Key Concepts
            • The N+1 Problem
            • Architecture
            • Arrays
            • Ingestion
            • Reads
            • Variant Statistics
            • Annotations
            • User-Defined Functions
            • Tables and SQL
            • Distributed Compute
          • Storage Format Spec
        • Tutorials
          • Basics
            • Basic Ingestion
            • Basic Queries
            • Export to VCF
            • Add New Samples
            • Deleting Samples
            • Basic S3 Example
            • Basic TileDB Cloud
          • Advanced
            • Scalable Ingestion
            • Scalable Queries
            • Query Transforms
            • Handling Large Queries
            • Annotations
              • Finding Annotations
              • Embedded Annotations
              • External Annotations
              • Annotation VCFs
              • Ingesting Annotations
            • Variant Statistics
            • Tables and SQL
            • User-Defined Functions
            • Sample Metadata
            • Split VCF
          • Performance
        • API Reference
          • Command Line Interface
          • Python API
          • Cloud API
      • Biomedical Imaging
        • Introduction
        • Foundation
          • Data Model
          • Key Concepts
            • Arrays
            • Ingestion
            • Reads
            • User Defined Functions
          • Storage Format Spec
        • Quickstart
        • Tutorials
          • Basics
            • Ingestion
            • Read
              • OpenSlide
              • TileDB-Py
          • Advanced
            • Batched Ingestion
            • Chunked Ingestion
            • Machine Learning
              • PyTorch
            • Napari
    • Files
  • API Reference
  • Self-Hosting
    • Installation
    • Upgrades
    • Administrative Tasks
    • Image Customization
      • Customize User-Defined Function Images
      • AWS ECR Container Registry
      • Customize Jupyter Notebook Images
    • Single Sign-On
      • Configure Single Sign-On
      • OpenID Connect
      • Okta SCIM
      • Microsoft Entra
  • Glossary

On this page

  • On-disk design
  • Image data
  • Image metadata
  • Next-generation file format (NGFF) metadata
  • Level metadata
    • Tiff
    • Zarr
  • Image collections
  • Specification versions
  1. Structure
  2. Life Sciences
  3. Biomedical Imaging
  4. Foundation
  5. Storage Format Spec

Biomedical Imaging Storage Format Specification

life-sciences
biomedical-imaging
foundation
storage format spec
The storage format specification of TileDB-BioImaging.

Based on research from the TileDB team and avoiding a lot of the jargon, the following “components” in typical biomedical imaging projects exist:

Note

The number of dimensions is variable, between 2 and 5, and axis names are arbitrary.

  • Images with many levels of resolution
  • Optionally associated labels
  • Multiple metadata

On-disk design

TileDB enables all the above components as follows:

  • Images are modeled as groups of ND dense TileDB arrays with integer dimensions and one attribute of any of the supported data types (that is, one dense array per image level).
  • Labels are also modeled as groups of ND Dense TileDB arrays with integer dimensions and one attribute of any of the supported data types (that is, one dense array per image level).
  • TileDB models the arbitrary key-value metadata as TileDB group metadata.
  • The attribute name of the arrays is intensity.

Image data

TileDB-BioImaging stores multi-resolution images as a group of arrays, with one dense array per resolution level. For example, consider an input TIFF file with three resolution layer pages:

2132x2488
4266x4978
17068x19918

TileDB-BioImaging creates the following directory structure:

Image.tdb      # TileDB group
  |- l_0.tdb   # TileDB array, 17068x19918
  |- l_1.tdb   # TileDB array, 4266x4978
  |- l_2.tdb   # TileDB array, 2132x2488

Image metadata

TileDB stores image-level metadata as group metadata, and individual level metadata is stored within each of the corresponding resolution-level array.

Key Value
axes YXC
channels ["RED", "GREEN", "BLUE"]
dataset_type BIOIMG
fmt_version 2
json_tiffwriter_kwargs { "bigtiff": false, "byteorder": "<", "append": true, "imagej": false, "ome": false }
levels [ { "level": 0, "name": "l_0.tdb", "axes": "CYX", "shape": [3, 53760, 183808] }, { "level": 1, "name": "l_1.tdb", "axes": "CYX", "shape": [3, 26880, 91904] }, { "level": 2, "name": "l_2.tdb", "axes": "CYX", "shape": [3, 13440, 45952] }, ... ]
metadata { "channels": { "intensity": [ { "id": "0", "name": "Channel 0", "color": {"red": 255, "green": 0, "blue": 0, "alpha": 255}, "min": 0.0, "max": 255.0 }, { "id": "1", "name": "Channel 1", "color": {"red": 0, "green": 255, "blue": 0, "alpha": 255}, "min": 0.0, "max": 255.0 }, { "id": "2", "name": "Channel 2", "color": {"red": 0, "green": 0, "blue": 255, "alpha": 255}, "min": 0.0, "max": 255.0 } ] }, "axes": [ { "originalAxes": ["Y", "X", "C"], "originalShape": [53760, 183808, 3], "storedAxes": ["C", "Y", "X"], "storedShape": [3, 53760, 183808], "axesMapping": {"Y": ["Y"], "X": ["X"], "C": ["C"]} }, { "originalAxes": ["Y", "X", "C"], "originalShape": [26880, 91904, 3], "storedAxes": ["C", "Y", "X"], "storedShape": [3, 26880, 91904], "axesMapping": {"Y": ["Y"], "X": ["X"], "C": ["C"]} }, … ] }
original_metadata { "philips_metadata": "<?xml version=\\"1.0\\" encoding=\\"UTF-8\\" ?>\\n<DataObject ObjectType=\\"DPUfsImport\\">\\n\\t<Attribute Name=\\"DICOM_ACQUISITION_DATETIME\\"...." }
pixel_depth { "0": 1, "1": 1, "2": 1, "3": 1, "4": 1, "5": 1, "6": 1, "7": 1, "8": 1, "9": 1 }
pkg_version 0.2.4.dev33+dirty

Next-generation file format (NGFF) metadata

The TileDB group metadata may also have metadata keys as specified in the NGFF metadata description. Specifically, it may have the following optional metadata keys.

Key
axes
bioformats2raw.layout
coordinateTransformations
multiscales
omero
labels
image-label
plate
well

Level metadata

TileDB-BioImaging stores metadata coming from each of the resolutions of an image depending on its initial storage format. TileDB-BioImaging also stores some metadata like the following:

  • The level to which each resolution corresponds in the TileDB group.
  • The XML metadata, in the case where image follows the Open Microscopy Environment (OME) specification.
  • The axes of the image (for example, YXS).

TileDB-BioImaging also include some original format specifics metadata for the OME-TIFF and OME-Zarr formats.

Tiff

Key Value
subifds 9
metadata { "axes": "YXS" }
extratags []
photometric { "py/reduce": [ { "py/type": "tifffile.tifffile.PHOTOMETRIC" }, { "py/tuple": [ 6 ] } ] }
planarconfig { "py/reduce": [ { "py/type": "tifffile.tifffile.PLANARCONFIG" }, { "py/tuple": [ 1 ] } ] }
extrasamples { "py/tuple": [] }
rowsperstrip 0
bitspersample 8
compression { "py/reduce": [ { "py/type": "tifffile.tifffile.COMPRESSION" }, { "py/tuple": [ 7 ] } ] }
predictor 1
subsampling { "py/tuple": [ 2, 2 ] }
jpegtables { "py/b64": "/9j/2wBDAAIBAQEBAQIBAQECAgICAgQDAgICAgUEBAMEBgUGBgYFBgYGBwk...== " }
colormap null
subfiletype 0
software Philips DP v1.0
tile { "py/tuple": [ 512, 512 ] }
datetime null
resolution { "py/tuple": [ 1, 1 ] }
resolutionunit 2

Zarr

TileDB-BioImaging stores the metadata located in the .zattr files and the multi-scale metadata as described in NGFF metadata description.

Image collections

TileDB offers the ability to organize a collection of images by using an arbitrary number of nested groups. For example a collection of N images can have the following representation on storage.

.image_dataset                  # Root folder, potentially in S3.
    |-- __group                 # TileDB group dataset directory.
    |-- __meta                  # Group metadata, contains all collection's metadata in a
                                # key-Value manner.
        image_1.tiledb              # One image (id=1) converted to a TileDB group.
        |-- __group                 # TileDB group directory.
        |-- __meta                  # Group metadata, contains all group metadata in a
                                    # key-Value manner. Metadata include all kinds of
                                    # group metadata needed based on NGFF.
        |-- l_0.tdb                 # Layer 0 modeled as a 2D-5D dense TileDB array
                                    # with integer dimensions and uint8 or uint16 attribute.
        |   |-- __commits
        |   |-- __fragments
        |   |   `-- __1661541316115_1661541316115_bd1ea43c738344fa8ce2357091a2e558_14
        |   `-- __schema
        |-- l_1.tdb                 # Layer 1 modeled as a 2D-5D dense TileDB array
                                    # with integer dimensions and one attribute of
                                    # any of the supported data types.
        |   |-- __commits
        |   |-- __fragments
        |   |   `-- __1661541316135_1661541316135_e1fadcee168f4dc585eaf39d4ea42c33_14
        |   `-- __schema
        `-- l_2.tdb                 # Layer 2 modeled as a 2D-5D dense TileDB array
                                    # with integer dimensions and one attribute of
                                    # any of the supported data types.
            |-- __commits
            |-- __fragments
            |   `-- __1661541316146_1661541316146_bb390adff7c5474e8024b76b0478abc7_14
            `-- __schema
        |-- labels                      # Labels converted to TileDB group.
            |-- __group                 # TileDB label group directory.
            |-- __meta                  # Label group metadata.
            |-- l_0.tdb                 # Layer 0 modeled as a 2D-5D dense TileDB array
                                        # with integer dimensions and one attribute of
                                        # any of the supported data types.
            |   |-- __commits
            |   |-- __fragments
            |   |   `-- __1661541316115_1661541316115_bd1ea43c738344fa8ce2357091a2e558_14
            |   `-- __schema
        ...
        image_N.tiledb              # One image (id=N) converted to a TileDB group.
        |-- __group                 # TileDB group directory
        |-- __meta                  # Group metadata
        |-- l_0.tdb                 # Layer 0 modeled as a 2D-5D dense TileDB array
                                    # with integer dimensions and one attribute of
                                    # any of the supported data types.
        |   |-- __commits
        |   |-- __fragments
        |   |   `-- __1661541316115_1661541316115_bd1ea43c738344fa8ce2357091a2e558_14
        |   `-- __schema
        |-- l_1.tdb                 # Layer 1 modeled as a 2D-5D dense TileDB array
                                    # with integer dimensions and one attribute of
                                    # any of the supported data types.
        |   |-- __commits
        |   |-- __fragments
        |   |   `-- __1661541316135_1661541316135_e1fadcee168f4dc585eaf39d4ea42c33_14
        |   `-- __schema
        ...
...

Specification versions

You can find the latest changes of the format specification in the repository’s specification markdown. The specification is under active development and, thus, subject to changes. The TileDB team is committed in offering backwards-compatibility when possible.

User Defined Functions
Quickstart