Skip to content

Commit 7e57cc6

Browse files
committed
2 parents 32db579 + 13530b7 commit 7e57cc6

File tree

1 file changed

+24
-7
lines changed

1 file changed

+24
-7
lines changed

zipdcm/zip-dicom-demo.ipynb

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"WIth the custom \"zipdcm\" Python Data Source, we can read zipped (and non Zipped) up DICOM files directly to extract their metadata.\n",
2121
"\n",
2222
"Requirements:\n",
23-
"- Recommend DBR 17.0 (spark 4.0) compute\n",
23+
"- Recommend DBR 17.0 (Apache Spark 4.0) compute\n",
2424
"- Shared cluster compute compatible\n",
2525
"- Working on serverless compute fix.\n",
2626
"- Requires `pydicom==3.0.1`"
@@ -53,7 +53,8 @@
5353
}
5454
],
5555
"source": [
56-
"%pip install --quiet pydicom==3.0.1"
56+
"%pip install --quiet pydicom==3.0.1\n",
57+
"%restart_python"
5758
]
5859
},
5960
{
@@ -66,15 +67,24 @@
6667
"rowLimit": 10000
6768
},
6869
"inputWidgets": {},
69-
"nuid": "58d15465-474e-4e54-b3e2-13ad6c46b717",
70+
"nuid": "d446370a-7598-4c79-bbbc-89775c62e887",
7071
"showTitle": false,
7172
"tableResultSettingsMap": {},
7273
"title": ""
7374
}
7475
},
75-
"outputs": [],
76+
"outputs": [
77+
{
78+
"output_type": "stream",
79+
"name": "stdout",
80+
"output_type": "stream",
81+
"text": [
82+
"total 57M\n-rwxrwxrwx 1 root root 12K Aug 1 21:09 1.3.199.1.2.3712432.1.402.1107814368275696879.zip\n-rwxrwxrwx 1 root root 24M Aug 1 21:09 3.5.574.1.3.9030958.6.376.1780887819048872979.zip\n-rwxrwxrwx 1 root root 12M Aug 1 21:09 3.5.574.1.3.9030958.6.376.2860280475000825621.zip\ndrwxrwxrwx 2 root root 4.0K Aug 2 17:33 x\n-rwxrwxrwx 1 root root 12M Aug 1 21:09 x.zip\ndrwxrwxrwx 2 root root 4.0K Aug 2 17:33 y\n-rwxrwxrwx 1 root root 12M Aug 1 21:09 y.zip\n"
83+
]
84+
}
85+
],
7686
"source": [
77-
"dbutils.library.restartPython()"
87+
"%sh ls -lh ./resources/dcms"
7888
]
7989
},
8090
{
@@ -202,7 +212,8 @@
202212
"from dbx.zip_dcm_ds import ZipDCMDataSource\n",
203213
"spark.dataSource.register(ZipDCMDataSource)\n",
204214
"\n",
205-
"df = spark.read.format(\"zipdcm\").load(\"./resources\")\n",
215+
"# read DCMs with `numPartitions` parallelism.\n",
216+
"df = spark.read.format(\"zipdcm\").option('numPartitions',4).load(\"./resources\")\n",
206217
"df.display()"
207218
]
208219
}
@@ -218,9 +229,15 @@
218229
"inputWidgetPreferences": null,
219230
"language": "python",
220231
"notebookMetadata": {
232+
"mostRecentlyExecutedCommandWithImplicitDF": {
233+
"commandId": 7424973428825328,
234+
"dataframes": [
235+
"_sqldf"
236+
]
237+
},
221238
"pythonIndentUnit": 4
222239
},
223-
"notebookName": "demo",
240+
"notebookName": "zip-dicom-demo",
224241
"widgets": {}
225242
},
226243
"language_info": {

0 commit comments

Comments
 (0)