{ "info": { "author": "Gabriel Couture", "author_email": "gacou54@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Healthcare Industry", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3 :: Only" ], "description": "PyOrthanc\n=========\nPython library that wrap the Orthanc REST API and facilitate the manipulation of data.\n\nLink to Orthanc web site: https://www.orthanc-server.com/\n\n__Notes__:\nPlease note that this is an early version of the wrapper (version < 1.0),\ntherefore some methods description (and maybe name) may change because \nthey don't describe adequately the behavior of the corresponding Orthanc REST API route.\nAlso note that this librairy is still under development.\nIf the description of an `Orthanc` method does not correspond to the planned \nbehavior, please do an issue.\n\nHowever, 'PyOrthanc' contains objects and functions that may be\nuseful for anyone writing python script to interact with Orthanc.\n\nAlso note that tests (```python setup.py test```) might only work\non a linux machine.\n\n\nInstallation\n------------\n```sh\n$ pip install pyorthanc\n```\n\nOr from the repository:\n```sh\npip install git+https://gitlab.physmed.chudequebec.ca/gacou54/pyorthanc.git\n```\n\nOr, if you do not have git installed, clone the repository:\n```sh\npip install -e pyorthanc.zip\n```\n\n#### Specific version\nIf you are looking for a specific version, lookout the version with the desired \ntag ar https://gitlab.physmed.chudequebec.ca/gacou54/pyorthanc/tags.\n\nExample of usage\n----------------\nBe sure that Orthanc is running. The default URL (if running locally) is `http://localhost:8042`.\n\n#### With Orthanc server:\n```python\nfrom pyorthanc import Orthanc\n\n\northanc = Orthanc('http://localhost:8042')\northanc.setup_credentials('username', 'password') # If needed\n\n# To get patients identifier and main information\npatients_identifiers = orthanc.get_patients()\n\nfor patient_identifier in patients_identifiers:\n patient_information = orthanc.get_patient_information(patient_identifier)\n\n\n# To get patient's studies identifier and main information\na_patient_identifier = patients_identifiers[0]\nstudies_identifiers = orthanc.get_studies(a_patient_identifier)\n\nfor study_identifier in studies_identifiers:\n study_information = orthanc.get_studies_information(study_identifier)\n```\n\n#### Upload DICOM files to Orthanc:\n```python\nfrom pyorthanc import Orthanc\n\n\northanc = Orthanc('http://localhost:8042')\northanc.setup_credentials('username', 'password') # If needed\n\nwith open('A_DICOM_INSTANCE_PATH.dcm', 'rb') as file_handler:\n orthanc.post_instances(file_handler.read())\n\n```\n\n#### Getting list of remote modalities:\n```python\nfrom pyorthanc import Orthanc\n\n\northanc = Orthanc('http://localhost:8042')\northanc.setup_credentials('username', 'password') # If needed\n\northanc.get_modalities()\n```\n\n#### Query (C-Find) and Retrieve (C-Move) from remote modality:\n```python\nfrom pyorthanc import RemoteModality, Orthanc\n\n\nremote_modality = RemoteModality(Orthanc('http://localhost:8042'), 'modality')\nremote_modality.setup_credentials('username', 'password') # If needed\n\n# Query (C-Find) on modality\ndata = {'Level': 'Study', 'Query': {'PatientID': '*'}}\nquery_response = remote_modality.query(data=data)\n\n# Retrieve (C-Move) results of query on a target modality (AET)\nremote_modality.move(query_response['QUERY_ID'], 'target_modality')\n```\n\n#### Build a patient tree structure of all patients in Orthanc instance:\nEach patient is a tree. Layers in each tree are `Patient` -> `Study` -> `Series` -> `Instance`.\n```python\nfrom pyorthanc import Orthanc, datastructure\n\n\npatient_forest = datastructure.build_patient_forest(\n Orthanc('http://localhost:8042/')\n) \n\nfor patient in patient_forest:\n patient_info = patient.get_main_information()\n\n for study in patient.get_studies():\n ...\n```\n\n#### Anonymize patient and get file:\n```python\nfrom pyorthanc import Orthanc\n\n\northanc = Orthanc('http://localhost:8042')\northanc.setup_credentials('username', 'password') # If needed\n\nA_PATIENT_IDENTIFIER = orthanc.get_patients()[0]\n\northanc.anonymize_patient(A_PATIENT_IDENTIFIER)\n\n# result is: (you can retrieve DICOM file from ID)\n# {'ID': 'dd41f2f1-24838e1e-f01746fc-9715072f-189eb0a2',\n# 'Path': '/patients/dd41f2f1-24838e1e-f01746fc-9715072f-189eb0a2',\n# 'PatientID': 'dd41f2f1-24838e1e-f01746fc-9715072f-189eb0a2',\n# 'Type': 'Patient'}\n```\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://gitlab.physmed.chudequebec.ca/gacou54/pyorthanc", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pyorthanc", "package_url": "https://pypi.org/project/pyorthanc/", "platform": "", "project_url": "https://pypi.org/project/pyorthanc/", "project_urls": { "Homepage": "https://gitlab.physmed.chudequebec.ca/gacou54/pyorthanc" }, "release_url": "https://pypi.org/project/pyorthanc/0.2.5/", "requires_dist": [ "requests" ], "requires_python": "", "summary": "Orthanc REST API python wrapper with additional utilities", "version": "0.2.5" }, "last_serial": 5886292, "releases": { "0.2.1": [ { "comment_text": "", "digests": { "md5": "9281534032dc2aaacb2e7673d44e2bb5", "sha256": "eb310a07d33885a1d8f140a3a6a762902904b3d0582a340a94ff6199dcfc7105" }, "downloads": -1, "filename": "pyorthanc-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "9281534032dc2aaacb2e7673d44e2bb5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 61815, "upload_time": "2019-08-20T17:32:24", "url": "https://files.pythonhosted.org/packages/80/9e/063b5075c7e3615cc269d0a2dcfe0fa5cdc2bc786c1a7efb874ecdfd3730/pyorthanc-0.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "27742dae32a4615f65666cbbb0eb1f86", "sha256": "241601457ab5655c78234c93622c74b5cc82584d1ed679eddb05e73250be54da" }, "downloads": -1, "filename": "pyorthanc-0.2.1.tar.gz", "has_sig": false, "md5_digest": "27742dae32a4615f65666cbbb0eb1f86", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 54580, "upload_time": "2019-08-20T17:32:27", "url": "https://files.pythonhosted.org/packages/e5/60/17148113adc2e4adc00cc184dd54fa732bae3101a44f561f3a60fcf05318/pyorthanc-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "091ec688d3b6034599b0ca7b3930e5a0", "sha256": "eb0b5f67c401b0baa0aef55e2f96ef0ed13f0a53a79c602cdca5c2b69842c85a" }, "downloads": -1, "filename": "pyorthanc-0.2.2-py3-none-any.whl", "has_sig": false, "md5_digest": "091ec688d3b6034599b0ca7b3930e5a0", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 66600, "upload_time": "2019-09-06T13:43:37", "url": "https://files.pythonhosted.org/packages/f2/e1/78d13def9bb819ea28c6ccae27d7a87ab1197b33c5199bc310a7bb77d43a/pyorthanc-0.2.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a69c0e4c8b5f1c3ac4afa364ca77a5f1", "sha256": "07e940225dae3e3395c8d358fcd8703e9b65cc3c7999feee2183d1b9346e3639" }, "downloads": -1, "filename": "pyorthanc-0.2.2.tar.gz", "has_sig": false, "md5_digest": "a69c0e4c8b5f1c3ac4afa364ca77a5f1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 55343, "upload_time": "2019-09-06T13:43:40", "url": "https://files.pythonhosted.org/packages/ea/f2/80cdaada51acc44180eb3624f50f30b5f3a5897efd8ee7beb3ea49901f39/pyorthanc-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "1450a775aa50530f2e7bc3660762b86e", "sha256": "b6f906c396d19b1cb4e647738f615604b359c775855539e538d334794482ccf3" }, "downloads": -1, "filename": "pyorthanc-0.2.3-py3-none-any.whl", "has_sig": false, "md5_digest": "1450a775aa50530f2e7bc3660762b86e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 66616, "upload_time": "2019-09-12T00:00:17", "url": "https://files.pythonhosted.org/packages/c3/89/a8b52d3f34043ea2d765b80bbb016abd9fe802e6ad5f74cf2b82db0024a7/pyorthanc-0.2.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ef43b17bdd706e3fd85ba19b7133ece7", "sha256": "bfacd9a20081ed8e7364f40b14ad5ec2c066a2888cacd26cd7dace6903c79a87" }, "downloads": -1, "filename": "pyorthanc-0.2.3.tar.gz", "has_sig": false, "md5_digest": "ef43b17bdd706e3fd85ba19b7133ece7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 55359, "upload_time": "2019-09-12T00:00:19", "url": "https://files.pythonhosted.org/packages/61/45/b2f7388a5768d8d4993addc95874cec479edd201ae683f276561f1c3c4a6/pyorthanc-0.2.3.tar.gz" } ], "0.2.4": [ { "comment_text": "", "digests": { "md5": "c58a56fa0d6676b83f4b3c0e7c833d93", "sha256": "6f89918f360f3dd9cb55eb3940d0a7deb3fc11ae854612e66b3aa9cb9ad81644" }, "downloads": -1, "filename": "pyorthanc-0.2.4-py3-none-any.whl", "has_sig": false, "md5_digest": "c58a56fa0d6676b83f4b3c0e7c833d93", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 70594, "upload_time": "2019-09-20T01:16:33", "url": "https://files.pythonhosted.org/packages/7f/9d/4e54b02b9623bc4f7ecd795e3e548e5ce0944177bbbf5b23599e86f27824/pyorthanc-0.2.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0f3697120622e3f3fee83aa5943c0f4b", "sha256": "17a7fd8983164000dbb7adee163bd7e4c5e28e42852a22d6087d8282381baecf" }, "downloads": -1, "filename": "pyorthanc-0.2.4.tar.gz", "has_sig": false, "md5_digest": "0f3697120622e3f3fee83aa5943c0f4b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 58064, "upload_time": "2019-09-20T01:16:35", "url": "https://files.pythonhosted.org/packages/ec/35/4ca2250e4f7b7481e4f6c88caa54410e89cf19d20c23d5e4be134130913b/pyorthanc-0.2.4.tar.gz" } ], "0.2.5": [ { "comment_text": "", "digests": { "md5": "aaaac58ecec442974c5c59f511fa31b3", "sha256": "7df42c48d0478e67c494caaabb6ca84444a77d2ab12b67eeb983b6daf5b45fda" }, "downloads": -1, "filename": "pyorthanc-0.2.5-py3-none-any.whl", "has_sig": false, "md5_digest": "aaaac58ecec442974c5c59f511fa31b3", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 104740, "upload_time": "2019-09-25T16:39:47", "url": "https://files.pythonhosted.org/packages/5e/fd/6472192f48a0695d8b3fc032e3c3acf9d82c19d8ba77ba750ebd82c45cb0/pyorthanc-0.2.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6f379e818b548623d655cfd7e5eebd11", "sha256": "5adb4730999f7fe1e7dc67b8fb61c4f07fec941660c6a172fef9230e82d421a6" }, "downloads": -1, "filename": "pyorthanc-0.2.5.tar.gz", "has_sig": false, "md5_digest": "6f379e818b548623d655cfd7e5eebd11", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 88766, "upload_time": "2019-09-25T16:39:49", "url": "https://files.pythonhosted.org/packages/50/7c/068d1143507546f1b6430316674ab4a60ffe644bc8415b3f1aa10c538b51/pyorthanc-0.2.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "aaaac58ecec442974c5c59f511fa31b3", "sha256": "7df42c48d0478e67c494caaabb6ca84444a77d2ab12b67eeb983b6daf5b45fda" }, "downloads": -1, "filename": "pyorthanc-0.2.5-py3-none-any.whl", "has_sig": false, "md5_digest": "aaaac58ecec442974c5c59f511fa31b3", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 104740, "upload_time": "2019-09-25T16:39:47", "url": "https://files.pythonhosted.org/packages/5e/fd/6472192f48a0695d8b3fc032e3c3acf9d82c19d8ba77ba750ebd82c45cb0/pyorthanc-0.2.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6f379e818b548623d655cfd7e5eebd11", "sha256": "5adb4730999f7fe1e7dc67b8fb61c4f07fec941660c6a172fef9230e82d421a6" }, "downloads": -1, "filename": "pyorthanc-0.2.5.tar.gz", "has_sig": false, "md5_digest": "6f379e818b548623d655cfd7e5eebd11", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 88766, "upload_time": "2019-09-25T16:39:49", "url": "https://files.pythonhosted.org/packages/50/7c/068d1143507546f1b6430316674ab4a60ffe644bc8415b3f1aa10c538b51/pyorthanc-0.2.5.tar.gz" } ] }