Skip to content

Commit

Permalink
Doc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
scaramallion committed Nov 8, 2023
1 parent 75883fd commit 3b36edf
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2
jobs:
build:
docker:
- image: circleci/python:3.10
- image: cimg/python:3.10
steps:
- checkout
- run:
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ If you're new to *pynetdicom* then start here:
* **Basics**: :doc:`Installation</tutorials/installation>` |
:doc:`Writing your first SCU</tutorials/create_scu>` |
:doc:`Writing your first SCP</tutorials/create_scp>` |
:doc:`Adding new SOP Classes`
:doc:`Registering a new SOP Class</tutorials/register_sop_class>`


.. _index_guide:
Expand Down
2 changes: 2 additions & 0 deletions docs/reference/service_classes.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.. _api_serviceclasses:

.. py:module:: pynetdicom.service_class
Service Classes (:mod:`pynetdicom.service_class`)
==================================================

Expand Down
1 change: 1 addition & 0 deletions docs/reference/sop_classes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ SOP Class Utilities
.. autosummary::
:toctree: generated/

register_uid
SOPClass
uid_to_sop_class
uid_to_service_class
Expand Down
21 changes: 11 additions & 10 deletions docs/tutorials/register_sop_class.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ Registering a new SOP Class

.. currentmodule:: pynetdicom

You may occasionally come across a private SOP Class UID, or perhaps there's
a public one from a recent release of the DICOM Standard that hasn't
yet been added to *pynetdicom*. In this short tutorial you'll learn how to
register your own UID with *pynetdicom*.
You may occasionally come across a private SOP Class UID you like to be able
to receive, or perhaps there's a public SOP Class from a recent release of the
DICOM Standard that hasn't yet been added to *pynetdicom*. In this short
tutorial you'll learn how to register your own UID so it can be used like
the SOP Classes included by *pynetdicom*.

To register new UIDs we use the :func:`~pynetdicom.sop_class.register_uid` function,
which takes the UID to be registered, a `keyword` that will be used as the
variable name for the new UID and the *pynetdicom* :mod:`~pynetdicom.service_class`
to register the UID with::
variable name for the new UID and the *pynetdicom*
:mod:`~pynetdicom.service_class` to register the UID with::

from pynetdicom import register_uid
from pynetdicom.service_class import StorageServiceClass
Expand All @@ -39,12 +40,12 @@ used like other UIDs::
ae = AE()
# or ae.add_supported_context("1.2.246.352.70.1.70")
ae.add_supported_context(PrivateRTPlanStorage)
ae.start_server(("localhost", 11112), evt_handlers=[evt.EVT_C_STORE, handle_store])
ae.start_server(("localhost", 11112), evt_handlers=[(evt.EVT_C_STORE, handle_store)])


When registering a new UID with the :class:`~pynetdicom.QueryRetrieveServiceClass`,
you must also specify which of the three DIMSE message types the UID is to be
used with::
When registering a new UID with the
:class:`~pynetdicom.service_class.QueryRetrieveServiceClass`, you must also
specify which of the three DIMSE-C message types the UID is to be used with::

from pynetdicom import register_uid
from pynetdicom.service_class import QueryRetrieveServiceClass
Expand Down

0 comments on commit 3b36edf

Please sign in to comment.