Skip to content

Commit 3f914cb

Browse files
author
Chris Bridge
committed
Added section in user guide about load_json_dataset method
1 parent fc7e5e6 commit 3f914cb

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

docs/usage.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,20 @@ When frames are retrieved in image format, they can be converted into a *NumPy*
469469

470470
.. _cli:
471471

472+
Loading JSON Data To ``pydicom``
473+
++++++++++++++++++++++++++++++++
474+
475+
Load metadata from JSON format into a ``pydicom.dataset.Dataset`` object.
476+
A common use for this is translating metadata received from a ``RetrieveMetadata`` request:
477+
478+
.. code-block:: python
479+
480+
from dicomweb_client import load_json_dataset
481+
482+
metadata = client.retrieve_study_metadata('1.2.826.0.1.3680043.8.1055.1.20111103111148288.98361414.79379639')
483+
metadata_datasets = [load_json_dataset(ds) for ds in metadata]
484+
485+
472486
Command Line Interface (CLI)
473487
----------------------------
474488

0 commit comments

Comments
 (0)