Package to query and download data from an index of ImagingDataCommons
Project description
idc-index
About
idc-index
is a Python package that enables query of the basic metadata and
download of DICOM files hosted by the
NCI Imaging Data Commons (IDC).
👷♂️🚧 WARNING: this package is in its early development stages. Its functionality and API will change. Stay tuned for the updates and documentation, and please share your feedback about it by opening issues in this repository, or by starting a discussion in IDC User forum.🚧
Usage
There are no prerequisites - just install the package ...
$ pip install idc-index
... and download files corresponding to any collection, DICOM PatientID/Study/Series as follows:
from idc_index import index
client = index.IDCClient()
client.download_from_selection(collection_id="rider_pilot", downloadDir="/some/dir")
... or run queries against the "mini" index of Imaging Data Commons data!
from idc_index import index
client = index.IDCClient()
query = """
SELECT
collection_id,
STRING_AGG(DISTINCT(Modality)) as modalities,
STRING_AGG(DISTINCT(BodyPartExamined)) as body_parts
FROM
index
GROUP BY
collection_id
ORDER BY
collection_id ASC
"""
client.sql_query(query)
Details of the attributes included in the index are in the release notes.
Tutorial
This package was first presented at the 2023 Annual meeting of Radiological Society of North America (RSNA) Deep Learning Lab IDC session.
Please check out
this tutorial notebook
for the introduction into using idc-index
for navigating IDC data.
Resources
- Imaging Data Commons Portal can be used to explore the content of IDC from the web browser
- s5cmd is a highly efficient, open source, multi-platform S3 client that we use for downloading IDC data, which is hosted in public AWS and GCS buckets
- SlicerIDCBrowser 3D
Slicer extension that relies on
idc-index
for search and download of IDC data
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. HHSN261201500003l.
If this package helped your research, we would appreciate if you could cite IDC paper below.
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for idc_index-0.3.2-py3-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ecdabcc49fdb587c902a2a8c791b105f4d60ffa0f08a75392126479efca301a5 |
|
MD5 | ee2627e0059451d9733836ae5317473f |
|
BLAKE2b-256 | f8d27f71690210d220fb6c973a3d590408ca499127429e5f06190ab654714aae |
Hashes for idc_index-0.3.2-py3-none-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 426a3b36ad6d941f209200951b22af7a790a51ac51bb2da398dfbbd3a1a08677 |
|
MD5 | 95b45f5a21ec41b88dcb8f97689e2673 |
|
BLAKE2b-256 | f63f5686cb1a3345ce6be0d927b48192fdfd7398ecc44e6ac13d88da5f3e90c5 |
Hashes for idc_index-0.3.2-py3-none-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16048a9d40a58783b68e068ce8b031388cf899f0e0bfe18851a8a275e13907ab |
|
MD5 | a2062d3348d7e9576b0d3c2a1096d268 |
|
BLAKE2b-256 | fa7d5f3de78f367f27378600e03a3b17e306eacc7ffc8ff7ba7a3bf01a9990b5 |