Giter Site home page Giter Site logo

get_tcia's Introduction

TCIA Image Downloader

This simple Python script is designed to download images from the TCIA (The Cancer Imaging Archive) website using a specified manifest file. It supports downloading multiple series concurrently and includes a retry mechanism for robustness.

-Alan McMillan

Features

  • Download images based on series IDs listed in a manifest file.
  • Handle multiple downloads concurrently.
  • Retry mechanism for handling download failures.
  • Can be run from the command line or imported as a function in other Python scripts.

Usage

As a Command Line Tool

To use this script from the command line, you need to provide the path to the manifest file and the output folder where the images will be saved. Optionally, you can specify the number of concurrent download jobs.

python get_tcia.py -m <path_to_manifest_file> -o <output_folder_path> --njobs <number_of_concurrent_jobs>

As a Function in Python

You can also use the download_from_manifest function in other Python scripts. The function requires the path to the manifest file, the output base path, and the number of jobs (optional).

from get_tcia import download_from_manifest

download_from_manifest('path_to_manifest.txt', 'path_to_output_folder', njobs=5)

Acknowledgements

This project is based on tcia.py from the TCIA Downloader project (https://github.com/lescientifik/tcia_downloader), licensed under Apache 2.0. We thank the original authors for their work which served as a foundation for this code.

Requirements

  • Python 3.x
  • Requests library
  • Tqdm library for progress bar

Installation

Ensure you have Python installed, and then install the required libraries:

pip install requests tqdm

License

This project is licensed under the Apache 2.0 License. See the LICENSE file for more details.

get_tcia's People

Contributors

abmcmillan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.