You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/usage.rst
+13-4Lines changed: 13 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -111,17 +111,26 @@ To interact with servers requiring certificate-based authentication, you can pro
111
111
To interact with a server of the Google Healthcare API requiring OpenID Connect based authentication and authorization, provide a session authenticated using the Google Cloud Platform (GCP) credentials.
112
112
See `GCP documentation <https://cloud.google.com/docs/authentication/production>`_ for details.
113
113
114
-
Note that GCP authentication requires installation of the package distribution with the ``gcp`` extra requirements: ``$ pip install dicomweb-client[gcp]``.
114
+
The library provides the ``gcp`` extension, which facilitates interacting with the DICOMweb interface of the Google Healthcare API.
115
+
Note that the ``gcp`` extension is optional and requires installation of the package distribution with the ``gcp`` extra requirements: ``$ pip install dicomweb-client[gcp]``.
115
116
116
117
.. code-block:: python
117
118
118
119
from dicomweb_client.api import DICOMwebClient
119
-
from dicomweb_client.session_utils import create_session_from_gcp_credentials
120
+
from dicomweb_client.ext.gcp.session_utils import create_session_from_gcp_credentials
121
+
from dicomweb_client.ext.gcp.uri import GoogleCloudHealthcareURL
120
122
121
123
session = create_session_from_gcp_credentials()
122
124
125
+
url = GoogleCloudHealthcareURL(
126
+
project_id='my-project',
127
+
location='us-east4',
128
+
dataset_id='my-dataset',
129
+
dicom_store_id='my-store'
130
+
)
131
+
123
132
client = DICOMwebClient(
124
-
url="https://mydicomwebserver.com",
133
+
url=str(url),
125
134
session=session
126
135
)
127
136
@@ -258,7 +267,7 @@ Search for series filtering by *Modality*:
258
267
259
268
.. code-block:: python
260
269
261
-
series = client.search_for_series(search_filters={'Modality': 'CT'})
270
+
series = client.search_for_series(search_filters={'Modality': 'SM'})
0 commit comments