Learn R Programming

TCIApathfinder

TCIApathfinder is a wrapper for The Cancer Imaging Archive’s REST API v3. The Cancer Imaging Archive (TCIA) hosts de-identified medical images of cancer available for public download, as well as rich metadata for each image series. TCIA provides a REST API for programmatic access to the data. This package provides simple functions to access each API endpoint. For more information about TCIA, see TCIA’s website.

TCIApathfinder is on CRAN.

Installation

From within R:

install.packages("TCIApathfinder")

From GitHub:

# install.packages("devtools")
devtools::install_github("pamelarussell/TCIApathfinder")

Authentication

An API key is not needed to access public collections on TCIA but it could be useful for private collections. To obtain and correctly store your API key:

  1. Request a key from TCIA by following the instructions here.

  2. Create a text file in your home directory (~/) called .Renviron.

  3. Create the contents of the .Renviron file like this, making sure the last line in the file is empty. Otherwise, R will silently fail to load the file.

    TCIA_API_KEY=xxx-xxx-xxx-xxx
  4. Restart R. .Renviron is only processed at the beginning of an R session.

Package usage

Detailed vignettes on package usage and downstream image analysis can be viewed on CRAN or from within an R session with browseVignettes("TCIApathfinder").

Citation

From within R:

citation("TCIApathfinder")

TCIApathfinder: An R Client for the Cancer Imaging Archive REST API. Pamela Russell, Kelly Fountain, Dulcy Wolverton and Debashis Ghosh. Cancer Res August 1 2018 (78) (15) 4424-4426; DOI: 10.1158/0008-5472.CAN-18-0678.

More information on the TCIA REST API

Copy Link

Version

Install

install.packages('TCIApathfinder')

Monthly Downloads

150

Version

1.0.6

License

MIT + file LICENSE

Maintainer

Pamela Russell

Last Published

September 21st, 2019

Functions in TCIApathfinder (1.0.6)

get_series_size

Get size of image series
save_image_series

Save a series of DICOM image files as a zip file
get_modality_names

Get modality names
save_single_image

Save a single DICOM image file
get_series_info

Get image series information
get_patient_studies

Get patient study information
get_sop_instance_uids

Get SOP instance UIDs (individual DICOM image IDs) for an image series
get_collection_names

Get the names of all TCIA collections
get_manufacturer_names

Get manufacturer names
get_body_part_names

Get body part names
get_new_patients_in_collection

Get IDs of patients that have been added to a collection since a specified date
get_studies_in_collection

Get studies in a collection and optionally for a specific patient
get_new_studies_in_collection

Get studies that have been added to a collection and optionally to a patient since a specified date
save_extracted_image_series

Save a series of DICOM image files to a directory
get_patients_by_modality

Get patient IDs given a collection name and modality
get_patient_info

Get patient information