platipy.dicom.download package#

Submodules#

platipy.dicom.download.tcia module#

platipy.dicom.download.tcia.fetch_data(collection, patient_ids=None, modalities=None, nifti=True, output_directory='./tcia')#

Fetches data from TCIA from the dataset specified

Parameters:
  • collection (str) – The TCIA collection to fetch from

  • patient_ids (list, optional) – The patient IDs to fetch. If not set all patients are fetched

  • modalities (list, optional) – A list of strings definiing the modalites to fetch. Will fetch all modalities available if not specified.

  • nifti (bool, optional) – Whether or not to convert the fetched DICOM to Nifti. Defaults to True

  • output_directory (str) – The directory in which to place fetched data

Returns:

The patients and directories where their data was fetched

Return type:

dict

platipy.dicom.download.tcia.get_collections()#

Get a list of collections available in the TCIA database

Returns:

List of collections

Return type:

list

platipy.dicom.download.tcia.get_hn_data(number_of_patients=1)#

Gets some images and structures from the Head-Neck-Radiomics-HN1 dataset in TCIA.

Keyword Arguments:

(default (number_of_patients {int} -- The number of patients to fetch) – {1})

Returns:

dict – dictionary of patient ids as key and path to data as value

platipy.dicom.download.tcia.get_lung_data(number_of_patients=1)#

Gets some images and structures from the LCTSC dataset in TCIA.

Keyword Arguments:

(default (number_of_patients {int} -- The number of patients to fetch) – {1})

Returns:

dict – dictionary of patient ids as key and path to data as value

platipy.dicom.download.tcia.get_modalities_in_collection(collection)#

Get a list of object modalities in a TCIA collection

Parameters:

collection (str) – TCIA collection

Returns:

List of modalities available in the collection

Return type:

list

platipy.dicom.download.tcia.get_patients_in_collection(collection)#

Get a list of sorted patient IDs in a TCIA collection

Parameters:

collection (str) – TCIA collection

Returns:

List of sorted Patient IDs in the collection

Return type:

list

Module contents#