Installation

Prerequisites

Option 1: Pull image from Docker Hub

Pull the official Docker image from Docker Hub (most common).


  # (1) Pull the latest verison of the Docker image
  docker pull neuropacman/neuropacs-cli:latest
  

Option 2: Build with docker-compose

Use a docker-compose.yaml and .env file to build and configure neuropacs in one simple step.


  # (1) Add your API key to a .env file (a template is provide in the Github repository)
        
  # (2) Build with docker-commpose
  docker-compose up
  

Option 3: Build from source

Clone the neuropacs-cli repository and build from the provided Dockerfile


  # (1) Clone the repository using Git
  git clone https://github.com/neuropacs/neuropacs-cli.git

  # (2) Navigate to the neuropacs-cli project
  cd /path/to/neuropacs-cli/

  # (3) Build the Docker image from the Dockerfile
  docker build . --no-cache -t neuropacs
    

Usage

Using your API key

If using options 1 or 3 when building neuropacs-cli, you will need to pass your API key with each run command. Use one of the two following options:

  1. Pass your API key manually using '-e' flag in each run command [most common]
  2. 
      docker run --rm -e API_KEY=your_api_key neuropacs new-job
                  

  3. Pass a .env file using '--env-file' flag in each command
  4. 
      docker run --rm --env-file .env neuropacs new-job
                

Example

Working example using the neuropacs™ CLI.

NOTE: To view the help screen of any command, use the '-h' or '--help' flag (ex. sudo docker run --rm neuropacs connect -h).


  # Create a session
  docker run --rm -e API_KEY=your_api_key neuropacs connect

  # Create a new order
  docker run --rm -e API_KEY=your_api_key neuropacs new-job

  # Upload a dataset via path (hint: use '--progress' option for to display a progress bar during upload (verbose))
  docker run --rm -v -e API_KEY=your_api_key /local/path/to/dataset/:/data neuropacs upload-dataset-from-path (--progress) --order-id ORDER_ID

  # Retrieve QC results
  docker run --rm -e API_KEY=your_api_key neuropacs qc-check --order-id ORDER_ID --format FORMAT

  # Start an order
  docker run --rm -e API_KEY=your_api_key neuropacs run-job --order-id ORDER_ID --product PRODUCT_ID 

  # Check order status
  docker run --rm -e API_KEY=your_api_key neuropacs check-status --order-id ORDER_ID

  # Retrieve job results
  docker run --rm -e API_KEY=your_api_key neuropacs get-results --order-id ORDER_ID --format FORMAT 
  

API Key Usage Report

Generate a structured API key usage report for any neuropacs™ API key. If an admin API key is used. An aggregated report will be created with all keys associated with the same institution. If "email" format is used, an email will be sent to the admin associated with the specified API key.


  # Create a session
  docker run --rm -e API_KEY=your_api_key neuropacs connect

  # Generate a report
  docker run --rm -e API_KEY=your_api_key neuropacs get-report --format FORMAT --start-date START_DATE --end-date END_DATE 
    

DICOMweb Integration

The API retrieves and processes images directly from DICOMweb-compliant servers via WADO-RS, enabling neuropacs™ analysis for streamlined diagnostic workflows.


    # Upload a dataset via a DICOMweb WADO-RS server w/ credentials (hint: use '--progress' option for to display a progress bar during upload (verbose))
    docker run --rm -e API_KEY=your_api_key neuropacs upload-dataset-from-dicom-web (--progress) --order-id ORDER_ID --wado-url WADO_URL --study-uid STUDY_UID --username USERNAME --password PASSWORD

    # Upload a dataset via a DICOMweb WAD-RS server w/out credentials (hint: use '--progress' option for to display a progress bar during upload (verbose))
    docker run --rm -e API_KEY=your_api_key neuropacs upload-dataset-from-dicom-web (--progress) --order-id ORDER_ID --wado-url WADO_URL --study-uid STUDY_UID

    # NOTE: If your DICOMweb WADO-RS server is hosted locally, replace "localhost" with "host.docker.internal".
         # Ex. "http://localhost:8080/dcm4chee-arc/aets/DCM4CHEE/rs" -> "http://host.docker.internal:8080/dcm4chee-arc/aets/DCM4CHEE/rs"
        

Contact

Kerrick Cavanaugh (Lead Software Engineer) - kerrick@neuropacs.com

License

This project is licensed under the MIT.

Explore

Integrations

Explore the different systems and software that our product integrates with. Click each integration for detailed setup and usage instructions.

Supported Programming Languages

Our product supports various programming languages to offer flexibility in development. Click each language for APIs, libraries, and examples.