Functions
This page briefly describes the functions exported by the package.
The function names in this module are in lowercase letters and sometimes underscores are used for longer function names. Most functions require keyword arguments, i.e. tcia_bodyparts(collection = collection_name)
will work but tcia_bodyparts(collection_name)
will not.
Index
CancerImagingArchive.dataframe_to_csv
CancerImagingArchive.dictionary_to_json
CancerImagingArchive.download_series
CancerImagingArchive.download_series
CancerImagingArchive.download_series
CancerImagingArchive.remove_empty!
CancerImagingArchive.tcia_bodyparts
CancerImagingArchive.tcia_collections
CancerImagingArchive.tcia_images
CancerImagingArchive.tcia_manufacturers
CancerImagingArchive.tcia_modalities
CancerImagingArchive.tcia_newstudies
CancerImagingArchive.tcia_patients
CancerImagingArchive.tcia_patients_by_modality
CancerImagingArchive.tcia_series
CancerImagingArchive.tcia_series_size
CancerImagingArchive.tcia_single_image
CancerImagingArchive.tcia_sop
CancerImagingArchive.tcia_studies
Public functions
CancerImagingArchive.dataframe_to_csv
— Methoddataframe_to_csv(; dataframe, file)
Writes the information in a DataFrame object (dataframe
) into a csv file (file
).
CancerImagingArchive.dictionary_to_json
— Methoddictionary_to_json(; dictionary, file)
Writes the information in a Dictionary Array (dictionary
) into a json file (file
).
CancerImagingArchive.download_series
— Functiondownload_series(series_id::AbstractString, destination::AbstractString = "./", overwrite::Boolean = true)
Downloads images belonging to series with series_id
and extracts them to destination
folder. If the destination folder already exists, then it will be overwritten by default unless overwrite = false
.
CancerImagingArchive.download_series
— Functiondownload_series(arr::Array, destination::AbstractString = "./"; append_desc::Boolean = true, overwrite::Boolean = true)
Downloads all images from the series in the array arr
and then extracts them to destination
folder. The arr
can be obtained through the tcia_series(..., format = "json")
command. By default, the series description will be appended to the path unless append_desc = false
. If the destination folder already exists, then it will be overwritten by default unless overwrite = false
.
CancerImagingArchive.download_series
— Functiondownload_series(df::DataFrame, destination::AbstractString = "./"; append_desc::Boolean = true, overwrite::Boolean = true)
Downloads all images from the series in the dataframe df
and then extracts them to destination
folder. The df
can be obtained through the tcia_series()
function. By default, the series description will be appended to the path unless append_desc = false
. If the destination folder already exists, then it will be overwritten by default unless overwrite = false
.
CancerImagingArchive.remove_empty!
— Methodremove_empty!(dictionary::Dict)
Removes dictionary keys with empty values. Used internally to remove empty queries.
CancerImagingArchive.tcia_bodyparts
— Methodtcia_bodyparts(; collection, modality, format = "csv")
Returns the body parts examined in a given collection
and/or by a given modality
.
CancerImagingArchive.tcia_collections
— Methodtcia_collections(; format = "csv")
Provides names of all the collections on TCIA.
CancerImagingArchive.tcia_images
— Methodtcia_images(; series, file)
Downloads the images for the given SeriesInstanceUID series
as the given zip-file file
.
CancerImagingArchive.tcia_manufacturers
— Methodtcia_manufacturers(; collection, modality, bodypart, format = "csv")
Returns the hardware manufacturers for a given collection
and/or modality
and/or bodypart
.
CancerImagingArchive.tcia_modalities
— Methodtcia_modalities(; collection, bodypart, format = "csv")
Returns the modalities used in a given collection
and/or for a given bodypart
.
CancerImagingArchive.tcia_newstudies
— Methodtcia_newstudies(; date, collection, patient, format = "csv")
Returns new studies for a given collection
that were added after a given date
formatted as YYYY-MM-DD
. The patient
ID can be optionally given.
CancerImagingArchive.tcia_patients
— Methodtcia_patients(; collection, format = "csv")
Returns the patients in a given collection
.
CancerImagingArchive.tcia_patients_by_modality
— Methodtcia_patients(; collection, modality, format = "csv")
Returns the patients in a given collection
and modality
(both inputs required).
CancerImagingArchive.tcia_series
— Methodtcia_series(; collection, bodypart, manufacturer, modality, model, patient, series, study, format = "csv")
Returns series information for a given collection
, bodypart,
manufactuer,
modality, manufacturer
model, patient
, SeriesInstanceUID series
, or StudyInstanceUID study
.
CancerImagingArchive.tcia_series_size
— Methodtcia_series_size(; series, format = "csv")
Returns the total byte size and the number of objects in the given SeriesInstanceUID series
.
CancerImagingArchive.tcia_single_image
— Methodtcia_single_image(; series, sop, file)
Downloads a single DICOM image for the given SeriesInstanceUID series
and SOPInstanceUID sop
. The DICOM file is saved as file
.
CancerImagingArchive.tcia_sop
— Methodtcia_sop(; series, format = "csv")
Returns the SOPInstanceUIDs for the given SeriesInstanceUID series
.
CancerImagingArchive.tcia_studies
— Methodtcia_studies(; collection, patient, study, format = "csv")
Returns the patient studies for a given collection
and/or patient
and/or study
.