TCIA (The Cancer Imaging Archive) Download Client for Python
This Python package uses the official TCIA REST API to enable downloads from www.cancerimagingarchive.net from within Python scripts and Jupyter Notebooks.
The documentation can be found at https://moritzschwyzer.github.io/tciaclient/. This PyPI/Conda package is based on source code of the TCIA-API-SDK https://github.com/TCIA-Community/TCIA-API-SDK.
Install
pip install tciaclient
How to use
Step 1: Import the TCIAClient from the tciaclient.core package.
from tciaclient.core import TCIAClient
Step 2: Create an instance of the TCIAClient.
tc = TCIAClient()
Step 3: Specify the collection you want to download (find the name on https://wiki.cancerimagingarchive.net/display/Public/Collections).
collection_name = "NSCLC-Radiomics"
Step 4: Get the series information of the chosen collection. In this example, we specify that we only want series that are CT scans.
series = tc.get_series(collection=collection_name, modality="CT")
Step 5: Download the dataset to the specified path.
download_path = "./tcia-downloads"
for i, s in enumerate(series):
print(i)
tc.get_image(seriesInstanceUid = s["SeriesInstanceUID"],
downloadPath = download_path, zipFileName = str(i).zfill(3)+"-"+collection_name+".zip")
TCIA Data Usage Policies and Restrictions
Information regarding data usage policies and restrictions can be found on https://wiki.cancerimagingarchive.net/display/Public/Data+Usage+Policies+and+Restrictions
Metadata
Release files for tciaclient 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tciaclient-0.0.3.tar.gz | 9.9 kB | Without provenance | Details for tciaclient-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tciaclient-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for tciaclient-0.0.3-py3-none-any.whl |
Total release size: 18.6 kB
Release files / tciaclient-0.0.3.tar.gz
| Download URL | tciaclient-0.0.3.tar.gz |
|---|---|
| Size | 9.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f3ae2c583f0f130fba1931f39eb0c59d6b822f46eda353185035563072c6f6a4
|
|
BLAKE2b-256 checksum How to use checksums |
28b91096b790bfaa0cb2511601f19d8bce7529ea61f92151fc2d2739035786da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.5.0.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
|
Release files / tciaclient-0.0.3-py3-none-any.whl
| Download URL | tciaclient-0.0.3-py3-none-any.whl |
|---|---|
| Size | 8.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
99a275ec596eeea38b0e9bd7fa18988a27b0eaf861eacbe425747584766f7cb6
|
|
BLAKE2b-256 checksum How to use checksums |
606a714a60d25ad848535e9829d99bc9f0f14ebe4f5bf32e51fe2c33aec412dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.5.0.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
|
Security for tciaclient 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.