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: articles/healthcare-apis/dicom/dicomweb-standard-apis-c-sharp.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ The filename, studyUID, seriesUID, and instanceUID of the sample DICOM files are
35
35
36
36
To use the DICOMweb Standard APIs, you need an instance of the DICOM service deployed. If you haven't already deployed an instance of the DICOM service, see [Deploy DICOM service using the Azure portal](deploy-dicom-services-in-azure.md).
37
37
38
-
After you've deployed an instance of the DICOM service, retrieve the URL for your app service:
38
+
After you deploy an instance of the DICOM service, retrieve the URL for your app service:
39
39
40
40
1. Sign in to the [Azure portal](https://portal.azure.com).
41
41
1. Search **Recent resources** and select your DICOM service instance.
@@ -49,7 +49,7 @@ In your application, install the following NuGet packages:
49
49
50
50
## Create a DicomWebClient
51
51
52
-
After you've deployed your DICOM service, you create a DicomWebClient. Run the code snippet to create DicomWebClient, which you use for the rest of this tutorial. Ensure you have both NuGet packages installed. If you haven't already obtained a token, see [Get access token for the DICOM service using Azure CLI](dicom-get-access-token-azure-cli.md).
52
+
After you deploy your DICOM service, you create a DicomWebClient. Run the code snippet to create DicomWebClient, which you use for the rest of this tutorial. Ensure you have both NuGet packages installed. If you haven't already obtained a token, see [Get access token for the DICOM service using Azure CLI](dicom-get-access-token-azure-cli.md).
53
53
54
54
```c#
55
55
stringwebServerUrl="{Your DicomWeb Server URL}"
@@ -60,7 +60,7 @@ client.HttpClient.DefaultRequestHeaders.Authorization = new System.Net.Http.Head
60
60
```
61
61
With the DicomWebClient, we can now perform the Store, Retrieve, Search, and Delete operations.
62
62
63
-
## Store DICOM Instances (STOW)
63
+
## Store DICOM instances (STOW)
64
64
65
65
Using the DicomWebClient that we've created, we can now store DICOM files.
Copy file name to clipboardExpand all lines: articles/healthcare-apis/dicom/dicomweb-standard-apis-curl.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,28 +42,28 @@ Once you've deployed an instance of the DICOM service, retrieve the URL for your
42
42
3. Copy the **Service URL** of your DICOM service.
43
43
4. If you haven't already obtained a token, see [Get access token for the DICOM service using Azure CLI](dicom-get-access-token-azure-cli.md).
44
44
45
-
For this code, we'll be accessing an Public Preview Azure service. It's important that you don't upload any private health information (PHI).
45
+
For this code, we access a Public Preview Azure service. It's important that you don't upload any private health information (PHI).
46
46
47
47
48
48
## Work with the DICOM service
49
49
50
-
The DICOMweb Standard makes heavy use of `multipart/related` HTTP requests combined with DICOM specific accept headers. Developers familiar with other REST-based APIs often find working with the DICOMweb Standard awkward. However, once you've it up and running, it's easy to use. It just takes a little familiarity to get started.
50
+
The DICOMweb Standard makes heavy use of `multipart/related` HTTP requests combined with DICOM specific accept headers. Developers familiar with other REST-based APIs often find working with the DICOMweb Standard awkward. However, after you get it up and running, it's easy to use. It just takes a little familiarity to get started.
51
51
52
52
The cURL commands each contain at least one, and sometimes two, variables that must be replaced. To simplify running the commands, search and replace the following variables by replacing them with your specific values:
53
53
54
-
* {Service URL} This is the URL to access your DICOM service that you provisioned in the Azure portal, for example, ```https://<workspacename-dicomservicename>.dicom.azurehealthcareapis.com```. Make sure to specify the version as part of the url when making requests. More information can be found in the [API Versioning for DICOM service Documentation](api-versioning-dicom-service.md).
54
+
* {Service URL} The service URL is the URL to access your DICOM service that you provisioned in the Azure portal, for example, ```https://<workspacename-dicomservicename>.dicom.azurehealthcareapis.com```. Make sure to specify the version as part of the url when making requests. More information can be found in the [API Versioning for DICOM service Documentation](api-versioning-dicom-service.md).
55
55
* {path-to-dicoms} - The path to the directory that contains the red-triangle.dcm file, such as `C:/dicom-server/docs/dcms`
56
56
* Ensure to use forward slashes as separators and end the directory _without_ a trailing forward slash.
57
57
58
58
59
-
## Uploading DICOM Instances (STOW)
59
+
## Upload DICOM instances (STOW)
60
60
61
61
### Store-instances-using-multipart/related
62
62
63
63
This request intends to demonstrate how to upload DICOM files using multipart/related.
64
64
65
65
>[!NOTE]
66
-
>The DICOM service is more lenient than the DICOM standard. However, the example below demonstrates a POST request that complies tightly to the standard.
66
+
>The DICOM service is more lenient than the DICOM standard. However, the example demonstrates a POST request that complies tightly to the standard.
67
67
68
68
_Details:_
69
69
@@ -76,7 +76,7 @@ _Details:_
76
76
* Body:
77
77
* Content-Type: application/dicom for each file uploaded, separated by a boundary value
78
78
79
-
Some programming languages and tools behave differently. For instance, some require you to define your own boundary. For those, you may need to use a slightly modified Content-Type header. The following have been used successfully.
79
+
Some programming languages and tools behave differently. For instance, some require you to define your own boundary. For those tools, you might need to use a slightly modified Content-Type header. The following have been used successfully.
* Content-Type: application/dicom for each file uploaded, separated by a boundary value
106
106
107
-
Some programming languages and tools behave differently. For instance, some require you to define your own boundary. For those, you may need to use a slightly modified Content-Type header. The following have been used successfully.
107
+
Some programming languages and tools behave differently. For instance, some require you to define your own boundary. For those languages and tools, you might need to use a slightly modified Content-Type header. The following have been used successfully.
@@ -163,7 +163,7 @@ curl --request GET "{Service URL}/v{version}/studies/1.2.826.0.1.3680043.8.498.1
163
163
--output "suppressWarnings.txt"
164
164
```
165
165
166
-
This cURL command will show the downloaded bytes in the output file (suppressWarnings.txt), but these aren't direct DICOM files, only a text representation of the multipart/related download.
166
+
This cURL command shows the downloaded bytes in the output file (suppressWarnings.txt), but they aren't direct DICOM files, only a text representation of the multipart/related download.
167
167
168
168
### Retrieve metadata of all instances in study
169
169
@@ -176,7 +176,7 @@ _Details:_
176
176
* Accept: application/dicom+json
177
177
* Authorization: Bearer {token value}
178
178
179
-
This cURL command will show the downloaded bytes in the output file (suppressWarnings.txt), but these aren't direct DICOM files, only a text representation of the multipart/related download.
179
+
This cURL command shows the downloaded bytes in the output file (suppressWarnings.txt), but they aren't direct DICOM files, only a text representation of the multipart/related download.
180
180
181
181
```
182
182
curl --request GET "{Service URL}/v{version}/studies/1.2.826.0.1.3680043.8.498.13230779778012324449356534479549187420/metadata"
This cURL command will show the downloaded bytes in the output file (suppressWarnings.txt), but it's not the DICOM file, only a text representation of the multipart/related download.
198
+
This cURL command shows the downloaded bytes in the output file (suppressWarnings.txt), but it's not the DICOM file, only a text representation of the multipart/related download.
199
199
200
200
```
201
201
curl --request GET "{Service URL}/v{version}/studies/1.2.826.0.1.3680043.8.498.13230779778012324449356534479549187420/series/1.2.826.0.1.3680043.8.498.45787841905473114233124723359129632652"
@@ -278,7 +278,7 @@ curl --request GET "{Service URL}/v{version}/studies/1.2.826.0.1.3680043.8.498.1
278
278
279
279
## Query DICOM (QIDO)
280
280
281
-
In the following examples, we'll search for items using their unique identifiers. You can also search for other attributes, such as `PatientName`.
281
+
In the following examples, we search for items using their unique identifiers. You can also search for other attributes, such as `PatientName`.
Copy file name to clipboardExpand all lines: articles/healthcare-apis/dicom/dicomweb-standard-apis-python.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,9 +10,9 @@ ms.date: 02/15/2022
10
10
ms.author: mmitrik
11
11
---
12
12
13
-
# Using DICOM Standard APIs with Python
13
+
# Use DICOMweb Standard APIs with Python
14
14
15
-
This article shows how to work with the DICOM® service using Python and [sample .dcm DICOM files](https://github.com/microsoft/dicom-server/tree/main/docs/dcms).
15
+
This article shows how to work with the DICOMweb service using Python and [sample .dcm DICOM® files](https://github.com/microsoft/dicom-server/tree/main/docs/dcms).
16
16
17
17
Use these sample files:
18
18
@@ -36,7 +36,7 @@ The filename, studyUID, seriesUID, and instanceUID of the sample DICOM files are
36
36
37
37
To use the DICOMweb Standard APIs, you must have an instance of the DICOM service deployed. If you haven't already deployed the DICOM service, see [Deploy DICOM service using the Azure portal](deploy-dicom-services-in-azure.md).
38
38
39
-
After you've deployed an instance of the DICOM service, retrieve the URL for your App service:
39
+
After you deploy an instance of the DICOM service, retrieve the URL for your App service:
40
40
41
41
1. Sign in to the [Azure portal](https://portal.azure.com).
42
42
1. Search **Recent resources** and select your DICOM service instance.
@@ -49,7 +49,7 @@ For this code, you access a Public Preview Azure service. It's important that yo
49
49
50
50
The DICOMweb Standard makes heavy use of `multipart/related` HTTP requests combined with DICOM specific accept headers. Developers familiar with other REST-based APIs often find working with the DICOMweb standard awkward. However, after it's up and running, it's easy to use. It just takes a little familiarity to get started.
51
51
52
-
### Import the appropriate Python libraries
52
+
### Import the Python libraries
53
53
54
54
First, import the necessary Python libraries.
55
55
@@ -138,13 +138,13 @@ if (response.status_code != 200):
138
138
print('Error! Likely not authenticated!')
139
139
```
140
140
141
-
## Uploading DICOM Instances (STOW)
141
+
## Upload DICOM instances (STOW)
142
142
143
143
The following examples highlight persisting DICOM files.
144
144
145
145
### Store instances using `multipart/related`
146
146
147
-
This example demonstrates how to upload a single DICOM file, and it uses a bit of a Python to preload the DICOM file (as bytes) into memory. By passing an array of files to the fields parameter of `encode_multipart_related`, multiple files can be uploaded in a single POST. It's sometimes used to upload several instances inside a complete series or study.
147
+
This example demonstrates how to upload a single DICOM file, and it uses a bit of a Python to preload the DICOM file (as bytes) into memory. When an array of files is passed to the fields parameter of `encode_multipart_related`, multiple files can be uploaded in a single POST. It's sometimes used to upload several instances inside a complete series or study.
This example demonstrates how to upload multiple DICOM files into the specified study. It uses a bit of a Python to preload the DICOM file (as bytes) into memory.
187
187
188
-
By passing an array of files to the fields parameter of `encode_multipart_related`, multiple files can be uploaded in a single POST. It's sometimes used to upload a complete series or study.
188
+
When an array of files is passed to the fields parameter of `encode_multipart_related`, multiple files can be uploaded in a single POST. It's sometimes used to upload a complete series or study.
0 commit comments