Skip to main content

neuropacs Python API

Project description

Integration Tests CodeQL

neuropacs™ Python API

Connect to neuropacs™ diagnostic capabilities with our Python API.

Getting Started

Installation

pip install neuropacs

Usage

import neuropacs

api_key = "api_key"
server_url = "neuropacs_url"
product_name = "Atypical/MSAp/PSP-v1.0"
prediction_format = "XML"
origin_type = "my_application"

# INITIALIZE NEUROPACS API
npcs = neuropacs.init(server_url=server_url, api_key=api_key, origin_type=origin_type)

# CONNECT TO NEUROPACS
connection = npcs.connect()

# CREATE A NEW JOB
order_id = npcs.new_job()

# UPLOAD A DATASET FROM PATH
upload_status = npcs_admin.upload_dataset_from_path(order_id=order_id,  path="/path/to/dataset/")

# START A JOB
# --> Valid product_name options: Atypical/MSAp/PSP-v1.0
job_start_status = npcs.run_job(order_id=order_id, product_name=product_name)

# CHECK JOB STATUS
job_status = npcs.check_status(order_id=order_id)

# RETRIEVE JOB RESULTS
# --> Valid prediction_format options: TXT, PDF, XML, PNG
job_results = npcs.get_results(order_id=order_id, prediction_format=prediction_format)

DICOMweb WADO-RS Integration

# DEFINE DICOMweb PARAMETERS
wado_url = "http://localhost:8080/dcm4chee-arc/aets/DCM4CHEE/rs"
study_uid = "1.3.12.2.1107.5.2.32.35162.30000022041820573832300000043"
username = "username"
password = "password"

# UPLOAD DATASET FROM DICOMweb WADO-RS
upload = npcs.upload_dataset_from_dicom_web(
  order_id=order_id,
  wado_url=wado_url,
  study_uid=study_uid,
  username=username,
  password=password,
  callback=lambda data: print(data) # optional progress callback
)

Authors

Kerrick Cavanaugh - kerrick@neuropacs.com

Version History

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

neuropacs-1.8.6.tar.gz (13.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

neuropacs-1.8.6-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

Details for the file neuropacs-1.8.6.tar.gz.

File metadata

  • Download URL: neuropacs-1.8.6.tar.gz
  • Upload date:
  • Size: 13.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.6

File hashes

Hashes for neuropacs-1.8.6.tar.gz
Algorithm Hash digest
SHA256 7221349b2711d8b4e08f8675f1b872e8faa185f85b6cac847a1061bb5a298687
MD5 814ad9095a37cd58ea0cb040e9891ccf
BLAKE2b-256 cedc24edf45f00a1f20f766481a69882f941ddef058fa029fb72aa72f4b55d85

See more details on using hashes here.

File details

Details for the file neuropacs-1.8.6-py3-none-any.whl.

File metadata

  • Download URL: neuropacs-1.8.6-py3-none-any.whl
  • Upload date:
  • Size: 13.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.6

File hashes

Hashes for neuropacs-1.8.6-py3-none-any.whl
Algorithm Hash digest
SHA256 4bfd3d9e252ff697230ca74063e4c4e58a7a581920b4addc91f8f49d77740893
MD5 4b7938c72e4b5b3f578c8573e8f1987e
BLAKE2b-256 b986aa83c91ec64a3c2038457488955326c8698da0ecc0e09c68b26c244eb22a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page