Skip to main content

idc-index

Programmatic access to NCI Imaging Data Commons - the largest public collection of cancer imaging data

PyPI version PyPI platforms Actions Status Documentation Status Discourse Forum

What is Imaging Data Commons?

NCI Imaging Data Commons (IDC) is a cloud-based platform providing researchers with free access to a large and growing collection of cancer imaging data. This includes radiology images (CT, MRI, PET), digital pathology slides, and more - all in standard DICOM format with rich clinical and research metadata.

idc-index is the official Python package for querying IDC metadata and downloading imaging data - no cloud credentials or complex setup required.

Features

  • Query metadata with SQL - Search across ~100TB of data using DuckDB-powered SQL queries
  • High-speed downloads - Parallel downloads from AWS and Google Cloud public buckets via s5cmd
  • Browse hierarchically - Navigate collections → patients → studies → series programmatically
  • Generate viewer URLs - Create links to view images in OHIF (radiology) or Slim (pathology) web viewers
  • Command line interface - Download data directly from the terminal with idc commands
  • No authentication required - All data is publicly accessible

Installation

pip install idc-index

Requires Python 3.10+. Downloads are powered by the bundled s5cmd tool.

Keeping Up to Date

The package version is updated with each new IDC data release. Upgrade regularly to access the latest collections and data:

pip install --upgrade idc-index

Quick Start

Explore and Download a Collection

from idc_index import IDCClient

client = IDCClient.client()

# List all available collections
collections = client.get_collections()
print(f"IDC has {len(collections)} collections")

# Download a small collection (10.5 GB)
client.download_from_selection(collection_id="rider_pilot", downloadDir="./data")

Query with SQL

Find CT scans of the chest and download them:

from idc_index import IDCClient

client = IDCClient.client()

query = """
SELECT
    collection_id,
    PatientID,
    SeriesInstanceUID,
    SeriesDescription,
    series_size_MB
FROM index
WHERE Modality = 'CT'
  AND BodyPartExamined = 'CHEST'
LIMIT 10
"""

results = client.sql_query(query)
print(results)

# Download the matching series
client.download_dicom_series(
    seriesInstanceUID=results["SeriesInstanceUID"].tolist(), downloadDir="./chest_ct"
)

Browse Data Hierarchy and View Images

Navigate from collection to viewable images:

from idc_index import IDCClient

client = IDCClient.client()

# Get patients in a collection
patients = client.get_patients("tcga_luad", outputFormat="list")
print(f"Found {len(patients)} patients")

# Get studies for a patient
studies = client.get_dicom_studies(patients[0])

# Get series in that study
series = client.get_dicom_series(studies[0]["StudyInstanceUID"])

# Generate a viewer URL
viewer_url = client.get_viewer_URL(seriesInstanceUID=series[0]["SeriesInstanceUID"])
print(f"View in browser: {viewer_url}")

Command Line Interface

Download data directly from the terminal using idc download, which auto-detects the input type:

# Download a collection
idc download rider_pilot

# Download a specific series by UID
idc download 1.3.6.1.4.1.14519.5.2.1.6279.6001.100225287222365663678666836860

# Download from a manifest file
idc download manifest.s5cmd

# Specify output directory
idc download rider_pilot --download-dir ./data

# See all options
idc --help

Documentation

Resources

  • IDC Portal - Browse IDC data in your web browser
  • IDC Forum - Community discussions and support
  • idc-claude-skill - Claude AI skill for querying IDC with natural language
  • SlicerIDCBrowser - 3D Slicer extension using idc-index
  • s5cmd - The high-performance S3 client powering downloads

Citation

If idc-index helps your research, please cite:

Fedorov, A., Longabaugh, W. J. R., Pot, D., Clunie, D. A., Pieper, S. D., Gibbs, D. L., Bridge, C., Herrmann, M. D., Homeyer, A., Lewis, R., Aerts, H. J. W., Krishnaswamy, D., Thiriveedhi, V. K., Ciausu, C., Schacherer, D. P., Bontempi, D., Pihl, T., Wagner, U., Farahani, K., Kim, E. & Kikinis, R. National Cancer Institute Imaging Data Commons: Toward Transparency, Reproducibility, and Scalability in Imaging Artificial Intelligence. RadioGraphics (2023). https://doi.org/10.1148/rg.230180

Acknowledgment

This software is maintained by the IDC team, which has been funded in whole or in part with Federal funds from the NCI, NIH, under task order no. HHSN26110071 under contract no. HHSN261201500003I.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

idc_index-0.12.4.tar.gz (61.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

idc_index-0.12.4-py3-none-any.whl (29.7 kB view details)

Uploaded Python 3

File details

Details for the file idc_index-0.12.4.tar.gz.

File metadata

  • Download URL: idc_index-0.12.4.tar.gz
  • Upload date:
  • Size: 61.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for idc_index-0.12.4.tar.gz
Algorithm Hash digest
SHA256 d456ee000cb8898eed7180b05a1bf399f1f34331cfb00a4d6a19b325c084034e
MD5 beac1c370151410876693d1de292d197
BLAKE2b-256 1a33b5de280efc3bd9a6ddd2a7213674b2a4806d68e736a327a7815947956d40

See more details on using hashes here.

Provenance

The following attestation bundles were made for idc_index-0.12.4.tar.gz:

Publisher: cd.yml on ImagingDataCommons/idc-index

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file idc_index-0.12.4-py3-none-any.whl.

File metadata

  • Download URL: idc_index-0.12.4-py3-none-any.whl
  • Upload date:
  • Size: 29.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for idc_index-0.12.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ec80387aebee70e1d30a80b4a72801064de322b4f9bfa34105bee12a4fe8f3c2
MD5 a60272134c473cb38cbd9f3893d6dd4e
BLAKE2b-256 f1fcbfba0561cfb268868ef533f60694c21a9d59e3a9c8afba92ab9984100cea

See more details on using hashes here.

Provenance

The following attestation bundles were made for idc_index-0.12.4-py3-none-any.whl:

Publisher: cd.yml on ImagingDataCommons/idc-index

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.12.5

2 files

This release

0.12.4 This release

2 files

0.12.3

2 files

0.12.2

2 files

0.12.1

2 files

0.12.0

2 files

0.11.14

2 files

0.11.13

2 files

0.11.12

2 files

0.11.11

2 files

0.11.10

2 files

0.11.9

2 files

0.11.8

2 files

0.11.7

2 files

0.11.6

2 files

0.11.5

2 files

0.11.4

2 files

0.11.3

2 files

0.11.2

2 files

0.11.1

2 files

0.11.0

2 files

0.10.2

2 files

0.10.1

2 files

0.10.0

2 files

0.9.3

2 files

0.9.2

2 files

0.9.1

2 files

0.9.0

2 files

0.8.7

2 files

0.8.6

2 files

0.8.5

2 files

0.8.4

2 files

0.8.3

2 files

0.8.2

2 files

0.8.1

2 files

0.8.0

2 files

0.7.6

2 files

0.7.5

2 files

0.7.4

2 files

0.7.3

2 files

0.7.2

2 files

0.7.1

2 files

0.7.0

2 files

0.6.6

2 files

0.6.5

2 files

0.6.4

2 files

0.6.3

2 files

0.6.2

2 files

0.6.1

2 files

0.6.0

2 files

0.5.10

2 files

0.5.9

2 files

0.5.8

2 files

0.5.7

2 files

0.5.6

2 files

0.5.5

2 files

0.5.4

2 files

0.5.3

2 files

0.5.2

2 files

0.5.1

2 files

0.5.0

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.2

4 files

0.3.1

4 files

0.2.11

1 file

0.2.10

1 file

0.2.9

1 file

0.2.8

1 file

0.2.7

1 file

0.2.6

1 file

0.2.5

1 file

0.2.4

1 file

0.2.3

1 file

0.2.2

1 file

0.2.1

1 file

0.2.0

1 file

0.1.2

1 file

0.1.1

1 file

0.1.0

1 file

0.0.9

1 file

0.0.8

1 file

0.0.7

1 file

0.0.6

1 file

0.0.5

1 file

0.0.4

1 file

0.0.3

1 file

0.0.2

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page