A TCIA (The Cancer Imaging Archive) download client for Python.

class TCIAClient[source]

TCIAClient(baseUrl='https://services.cancerimagingarchive.net/services/v4', resource='TCIA')

TCIAClient.get_series[source]

TCIAClient.get_series(collection=None, modality=None, studyInstanceUid=None, outputFormat='json')

Search for series by collection name and/or study name and/or modality.

tc = TCIAClient()
tc.get_series(collection="TCGA-GBM")[:2]
[{'PatientID': 'TCGA-08-0244',
  'StudyInstanceUID': '1.3.6.1.4.1.14519.5.2.1.7695.4001.130563880911723253267280582465',
  'SeriesInstanceUID': '1.3.6.1.4.1.14519.5.2.1.7695.4001.306204232344341694648035234440',
  'Modality': 'MR',
  'SeriesDate': '1998-12-08',
  'SeriesDescription': '3DSPGR AXIAL',
  'BodyPartExamined': 'BRAIN',
  'SeriesNumber': '2.000000',
  'Collection': 'TCGA-GBM',
  'Manufacturer': 'GE MEDICAL SYSTEMS',
  'ManufacturerModelName': 'GENESIS_SIGNA',
  'SoftwareVersions': '07',
  'Visibility': '1',
  'ImageCount': 124},
 {'PatientID': 'TCGA-08-0244',
  'StudyInstanceUID': '1.3.6.1.4.1.14519.5.2.1.7695.4001.130563880911723253267280582465',
  'SeriesInstanceUID': '1.3.6.1.4.1.14519.5.2.1.7695.4001.180700359927709468630440576839',
  'Modality': 'MR',
  'SeriesDate': '1998-12-08',
  'SeriesDescription': 'FMPSPGR SAG',
  'BodyPartExamined': 'BRAIN',
  'SeriesNumber': '1.000000',
  'Collection': 'TCGA-GBM',
  'Manufacturer': 'GE MEDICAL SYSTEMS',
  'ManufacturerModelName': 'GENESIS_SIGNA',
  'SoftwareVersions': '07',
  'Visibility': '1',
  'ImageCount': 46}]

TCIAClient.get_image[source]

TCIAClient.get_image(seriesInstanceUid, downloadPath, zipFileName)

Get a set of images as a zip file.

tc = TCIAClient()
tc.get_image(seriesInstanceUid = "1.3.6.1.4.1.14519.5.2.1.7695.4001.180700359927709468630440576839",
             downloadPath = "./", zipFileName = "images.zip")
True