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.
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 (The Cancer Imaging Archive) Download Client for Python
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 tciaclientHow to use
Step 1: Import the
TCIAClientfrom thetciaclient.corepackage.Step 2: Create an instance of the
TCIAClient.Step 3: Specify the collection you want to download (find the name on https://wiki.cancerimagingarchive.net/display/Public/Collections).
Step 4: Get the series information of the chosen collection. In this example, we specify that we only want series that are CT scans.
Step 5: Download the dataset to the specified path.
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