pynetdicom | A Python implementation of the DICOM networking protocol | Messaging library

 by   pydicom Python Version: 2.1.0 License: MIT

kandi X-RAY | pynetdicom Summary

kandi X-RAY | pynetdicom Summary

pynetdicom is a Python library typically used in Messaging applications. pynetdicom has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has low support. You can install using 'pip install pynetdicom' or download it from GitHub, PyPI.

A Python implementation of the DICOM networking protocol
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              pynetdicom has a low active ecosystem.
              It has 431 star(s) with 160 fork(s). There are 31 watchers for this library.
              There were 1 major release(s) in the last 6 months.
              There are 37 open issues and 402 have been closed. On average issues are closed in 75 days. There are 2 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of pynetdicom is 2.1.0

            kandi-Quality Quality

              pynetdicom has 0 bugs and 0 code smells.

            kandi-Security Security

              pynetdicom has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              pynetdicom code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              pynetdicom is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              pynetdicom releases are available to install and integrate.
              Deployable package is available in PyPI.
              Build file is available. You can build the component from source.
              pynetdicom saves you 54792 person hours of effort in developing the same functionality from scratch.
              It has 66531 lines of code, 4715 functions and 115 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed pynetdicom and discovered the below as its top functions. This is intended to give you an instant insight into pynetdicom implemented functionality, and help decide if they suit your requirements.
            • Send a C - STORE request
            • Abort a source
            • Parses a received status message from the peer
            • Abort the association
            • Send a C - FIND request to the peer
            • Pretty print a dataset
            • Decode a dataset from a bytestring
            • Wrap the find response
            • Handles a move request
            • Receive an association
            • Send C -ECHO request to the peer
            • Event handler
            • Build a presentation context
            • Start the reactor
            • Adds a presentation context
            • Handle SCP
            • Start an association server
            • Send a C - MOVE request
            • Setup argument parser
            • Create a connection to the server
            • Send a C - GET request
            • Print debug information
            • Send an association request
            • Process SCP request
            • Parse an association request
            • Adds a supported context
            Get all kandi verified functions for this library.

            pynetdicom Key Features

            No Key Features are available at this moment for pynetdicom.

            pynetdicom Examples and Code Snippets

            No Code Snippets are available at this moment for pynetdicom.

            Community Discussions

            QUESTION

            Get called_/calling_ae_title
            Asked 2021-Nov-07 at 21:53

            I'm implementing SCP and I'm not sure how to get calling_/called_ae_title correctly. I'd like to get called_/calling_ae_title during connection(client sending DICOM image) on the server side. I don't enforce called_ae_title(ae.require_called_aet = False), but set default AE title in SCP. I'd like to use the called_/calling_ae_title for audit purpose. So, what I can see from the debug log from pytnetdicom SCP that this information is available in the A-ASSOCIATE-RQ PDU

            ...

            ANSWER

            Answered 2021-Nov-07 at 21:53

            When you're creating a new A_ASSOCIATE_RQ instance you're getting its default values (i.e. b'Default') because it hasn't been used in any associations.

            If you want the actual Calling AE Title used by an association requestor then information about the local and peer's association negotiation proposals is available via the Association.acceptor and Association.requestor properties:

            Source https://stackoverflow.com/questions/69850987

            QUESTION

            C-FIND Study by patient-ID and date
            Asked 2021-Oct-01 at 08:24

            I would like to download the chest x-ray file which matches a specified Patient ID and a Study Date from PACS.
            If I specify the date in the C-FIND-Request, I can't get any matched result.
            Could you suggest what's wrong with my query?
            Thank you very much~

            • I use pynetdicom to interact with GE's PACS.
            • The example records in PACS are:
               Study Date Modality Patient ID Online
               -------------------------------------------------------
               2021/08/21 XA   12345678 Y
               2021/08/19 US   12345678 Y
               2021/08/11 US   12345678 Y
               2021/08/09 US   12345678 Y
               2021/08/02 US   12345678 Y
               2021/07/16 CR   12345678 Y
               The records from 2021/08/02 to 2021/08/21 are related study.
               My target is the one taken on 2021/07/16.
            • Start with C-ECHO, then send C-FIND, low priority
              I have tried
              (1) C-FIND under patient root, patient level
              (2) C-FIND under study root, study level
              And if I specify the date(StudyDate = "20210716"), I can't get any matched result.
            • Following are the log of pynetdicom for C-FIND under patient root, patient level.

            (1) Case: condition only on Patient ID

            ...

            ANSWER

            Answered 2021-Oct-01 at 06:37

            (2) C-FIND under study root, study level

            Source https://stackoverflow.com/questions/69401226

            QUESTION

            How to display Series data from DICOM C-FIND results?
            Asked 2021-Sep-29 at 06:32

            I'm new to DICOM and was wondering how I would be able to return results of a C-FIND similar to how applications like Osirix display them after a query.

            I'm doing this strictly in Python with pynetdicom and displaying results back in a GUI. At the moment, I've extracted each identifier separately with regex to display, but this doesn't enable me to incorporate each individual series. I'm running my queries at the 'STUDY' level.

            I can query/retrieve and display the identifiers from other PACS, but I'm not sure how to go about displaying the examination results from other PACS databases at the study level and then be able to drop-down and view each series.

            I'm just about complete with this test project, and can currently read in DICOM files, add to database upon receiving them, Query/retrieve from various PACS. Display and transfer images received to another archive from local folder. I just cannot figure out the above, there has to be a better way of doing this than how I have it currently configured. See image of how I am currently returning results.

            I'm sure this is possible with pynetdicom, I'm just not sure how to go about doing this.

            ...

            ANSWER

            Answered 2021-Sep-29 at 05:50

            To expand from Study- to Series-Level you would basically form a request like this:

            Source https://stackoverflow.com/questions/69365287

            QUESTION

            pynetdicom not working correctly with Windows Task Scheduler
            Asked 2021-Aug-30 at 16:38

            I am using a modified version of this pynetdicom script (the second example on this page) to download DICOM images to an office computer. Here is what the script does:

            1. Opens a connection with PACS
            2. Searches for DICOM images that match the current date for a given patient's medical record number and accession number.
            3. If DICOM images are found that match the given criteria, then an SCP server connection is started to initiate the downloading of images to a folder on the local computer.

            The script works when it is run using the Spyder IDE. I have created a scheduled task with Windows Task Scheduler and it works correctly if the script has first been run with the Spyder IDE and only if Spyder remains open and all variables have not been cleared.

            However, if Spyder is closed or the Spyder kernel is restarted, then when the script is run through task scheduler, it will run correctly until it gets to the part where the SCP server calls the handle_store function that downloads images from PACS. The script does not call the handle_store function and the connection eventually times out.

            I thought the solution would be changing the default working directory in Task Scheduler, but that did not work. Any ideas what is going on and how to fix this?

            ...

            ANSWER

            Answered 2021-Aug-30 at 16:38

            Okay, I did some more digging and found the source of the problem. In order to get images to download to my computer Python needs to be allowed through our corporate firewall. I had already allowed pythonw.exe through the firewall but not python.exe. Once both of these Python files were allowed through the firewall the script will run as expected when started with Windows Task Scheduler.

            Source https://stackoverflow.com/questions/68908266

            QUESTION

            Issue with Setting the Command Set in N_CREATE Response, pydicom
            Asked 2021-Jul-05 at 08:24

            I'm working on a MPPS SCP as described here: MPPS SCP as a basic framework.

            I've been able to test it a bit with DVTk, with some tools that are available here: DVTk

            Most of it seems to be working correctly, but the issue I seem to be having is that the response is suppose to have tags with group 0000 returned in the "Command Set" and not in the returned DataSet itself: I actually did set them in the DataSet just to verify that I am getting the correct values, e.g.:

            ...

            ANSWER

            Answered 2021-Jul-05 at 08:24

            The Command Group Length (0000,0000) is the total number of bytes of your binary encoded message. This should usually be set by the toolkit that you are using (see commend from Scaramillion).

            Your command type is an N-CREATE Response, and usually this comes without any dataset. Not knowing the DVT script, I assume that your script does not expect a dataset being attached to the command set.

            I.e. (0008, 0016) SOP Class UID should not be present (it is already part of the Command Set as (0000,0002) Affected SOP Class UID), and (0000, 0800) Command Data Set Type should be set to 0x0101 to indicate that no data set is following the command set.

            At least this counts for a successful N-CREATE operation.

            Source https://stackoverflow.com/questions/68247938

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install pynetdicom

            You can install using 'pip install pynetdicom' or download it from GitHub, PyPI.
            You can use pynetdicom like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • PyPI

            pip install pynetdicom

          • CLONE
          • HTTPS

            https://github.com/pydicom/pynetdicom.git

          • CLI

            gh repo clone pydicom/pynetdicom

          • sshUrl

            git@github.com:pydicom/pynetdicom.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Messaging Libraries

            Try Top Libraries by pydicom

            pydicom

            by pydicomPython

            deid

            by pydicomPython

            contrib-pydicom

            by pydicomPython

            pylibjpeg

            by pydicomPython

            dicom-database

            by pydicomCSS