Skip to content

Commit 039a631

Browse files
author
MGH & BWH Center for Clinical Data Science
authored
Merge pull request #10 from CPBridge/doc_changes
Added section in user guide about load_json_dataset method
2 parents fc7e5e6 + a8679a1 commit 039a631

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`` or a ``SearchFor``-style request:
477+
478+
.. code-block:: python
479+
480+
from dicomweb_client.api 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)