Skip to content

Commit

Permalink
Update usage section of documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
hackermd committed Oct 14, 2022
1 parent e05b596 commit 0425753
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -557,10 +557,14 @@ A common use for this is translating metadata received from a ``RetrieveMetadata

.. code-block:: python
from dicomweb_client.api import load_json_dataset
from pydicom.dataset import Dataset
metadata = client.retrieve_study_metadata('1.2.826.0.1.3680043.8.1055.1.20111103111148288.98361414.79379639')
metadata_datasets = [load_json_dataset(ds) for ds in metadata]
metadata_datasets = [Dataset.from_json(ds) for ds in metadata]
Note that the metadata may include references to BulkData elements.
By default, BulkData elements will not be handled and the values not be automatically retrieved.
To handle BulkData elements and retrieve their values, one has to provide a ``bulk_data_uri_handler`` callable to the `pydicom.dataset.Dataset.from_json() <https://pydicom.github.io/pydicom/dev/reference/generated/pydicom.dataset.Dataset.html#pydicom.dataset.Dataset.from_json>`_ method.


Command Line Interface (CLI)
Expand Down

0 comments on commit 0425753

Please sign in to comment.