A python package to query the National Biomedical Imaging Archive (NBIA) database.
Project description
NBIA Toolkit
nbiatoolkit
is a python package that provides programmatic access to query and download images from the National Biomedical Imaging Archive (NBIA) and The Cancer Imaging Archive (TCIA) databases.
Features
- Use NBIA Guest account to access public data OR authenticate using OAuth with user credentials for limited access data (requires approved data access).
- Query NBIA database for metadata on collections, patients, studies, series, and images
- Download images from NBIA
- Validate doownloads with MD5 checksums for downloaded images
- Auto-sort DICOM files using a user-defined pattern of DICOM tags with specialized DICOMSorter class
See Documentation at NBIA-Toolkit Read The Docs
Installation
nbiatoolkit
is currently under development.
It is made available via PyPI and can be installed using pip:
pip install nbiatoolkit
CLI Usage
getCollections Output
nbia-toolkit also provides a command line interface (CLI) to query the NBIA database for some queries.
> NBIAToolkit --version
_ ______ _______ ______ ____ _ __
/ | / / __ )/ _/ |/_ __/___ ____ / / /__(_) /_
/ |/ / __ |/ // /| | / / / __ \/ __ \/ / //_/ / __/
/ /| / /_/ // // ___ |/ / / /_/ / /_/ / / ,< / / /_
/_/ |_/_____/___/_/ |_/_/ \____/\____/_/_/|_/_/\__/
Version: 0.18.0
Available CLI tools:
getCollections [-h] [-p PREFIX] [-o OUTPUTFILE] [--version]
getPatients [-h] -c COLLECTION [-o OUTPUTFILE] [--version]
getBodyPartCounts [-h] [-c COLLECTION] [-o OUTPUTFILE] [--version]
getSeries [-h] [-c COLLECTION] [-p PATIENTID] [-m MODALITY]
[-study STUDYINSTANCEUID]
[--seriesInstanceUID SERIESINSTANCEUID]
[--bodyPartExamined BODYPARTEXAMINED]
[--manufacturerModelName MANUFACTURERMODELNAME]
[--manufacturer MANUFACTURER] [-o OUTPUTFILE] [--version]
downloadSingleSeries [-h] --seriesUID SERIESUID --downloadDir
DOWNLOADDIR [--filePattern FILEPATTERN]
[--overwrite]
dicomsort [-h] [--targetPattern TARGETPATTERN] [--truncateUID]
[--sanitizeFilename] [--overwrite] [--nParallel NPARALLEL]
sourceDir destinationDir
Contributing
Interested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.
License
nbiatoolkit
was created by Jermiah Joseph. It is licensed under the terms of the MIT license.
User Agreements and Disclaimers
The NBIA-toolkit is NOT a product of the National Cancer Institute (NCI) and is not endorsed by the NCI. The NBIA-toolkit is provided as an open-source tool based on the NBIA REST API. The NBIA-toolkit is provided "AS IS" without warranty of any kind.
In no event shall the authors or contributors be liable for any claim, damages or other liability, arising from, out of or in connection with the NBIA-toolkit or the use or other dealings in the NBIA-toolkit.
Users of the NBIA-toolkit are required to abide by the NBIA REST API Terms of Service and the NBIA Data Usage Policies and Restrictions
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file nbiatoolkit-0.19.2.tar.gz
.
File metadata
- Download URL: nbiatoolkit-0.19.2.tar.gz
- Upload date:
- Size: 18.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0a149ad1b560b7dad1838478037d52a73ceb81b8678f66e7879936f20b988c1 |
|
MD5 | ab490955c00ce8725a42045fc3645604 |
|
BLAKE2b-256 | bc9c20a5f412c6c1fc877b010399097a59b1849ac7b0da0f0349241af1d2a161 |
File details
Details for the file nbiatoolkit-0.19.2-py3-none-any.whl
.
File metadata
- Download URL: nbiatoolkit-0.19.2-py3-none-any.whl
- Upload date:
- Size: 21.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 890ca2dc9541e060a47f889c5a6fca6ffde0fd1af84304b132b29fe0e2c1a35f |
|
MD5 | a057cf0a5545029c44dc58bb2cc7cb29 |
|
BLAKE2b-256 | 4815f45dacfe0815b0f51111ae168cd5ca06da662a9f5c5bdd26b2683c75659b |