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.5.tar.gz (12.4 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.5-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: neuropacs-1.8.5.tar.gz
  • Upload date:
  • Size: 12.4 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.5.tar.gz
Algorithm Hash digest
SHA256 275f7fd9512b9c7980fbaf642c1860c8ddd5a85e3f49fb0ba41f074aabb1917f
MD5 ced0ac1fc02d4a373033875071725bac
BLAKE2b-256 f2f07dea469cd505ced950cb0a0d1dcf36695df5a857c209490941fc3b5857c9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: neuropacs-1.8.5-py3-none-any.whl
  • Upload date:
  • Size: 12.4 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 8ecdc72e8c3578a7a13eaffeb1fb31801402eb2239e4aae4196a732ab523d88c
MD5 45b3308e34df341802f09e933c064363
BLAKE2b-256 19f0d9b1d34151adcdcb03c1e2a0c12f1405a00921ff74103f31f004034066f1

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