Skip to content

Commit 9284566

Browse files
committed
remove cell output
1 parent c83f908 commit 9284566

File tree

1 file changed

+49
-38
lines changed

1 file changed

+49
-38
lines changed

notebooks/getting_started/part1_prerequisites.ipynb

Lines changed: 49 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
{
44
"cell_type": "markdown",
55
"metadata": {
6-
"colab_type": "text",
7-
"id": "view-in-github"
6+
"id": "view-in-github",
7+
"colab_type": "text"
88
},
99
"source": [
1010
"<a href=\"https://colab.research.google.com/github/ImagingDataCommons/IDC-Tutorials/blob/master/notebooks/getting_started/part1_prerequisites.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
@@ -54,8 +54,11 @@
5454
},
5555
{
5656
"cell_type": "code",
57-
"execution_count": 1,
58-
"metadata": {},
57+
"execution_count": null,
58+
"metadata": {
59+
"id": "--TqvNmxDnmF",
60+
"outputId": "c161dbbc-9ddd-47d3-f02c-79ed1f59c864"
61+
},
5962
"outputs": [
6063
{
6164
"name": "stdout",
@@ -122,7 +125,9 @@
122125
},
123126
{
124127
"cell_type": "markdown",
125-
"metadata": {},
128+
"metadata": {
129+
"id": "G5Ag44i0DnmH"
130+
},
126131
"source": [
127132
"`idc-index` contains the two main components:\n",
128133
"* index: a table containing most important metadata attributes describing DICOM series contained in IDC\n",
@@ -133,8 +138,10 @@
133138
},
134139
{
135140
"cell_type": "code",
136-
"execution_count": 2,
137-
"metadata": {},
141+
"execution_count": null,
142+
"metadata": {
143+
"id": "nOFBo8J6DnmH"
144+
},
138145
"outputs": [],
139146
"source": [
140147
"from idc_index import index\n",
@@ -144,24 +151,31 @@
144151
},
145152
{
146153
"cell_type": "markdown",
147-
"metadata": {},
154+
"metadata": {
155+
"id": "6gs3Q__BDnmI"
156+
},
148157
"source": [
149-
"IDC data is versioned. When you work with `idc-index` it is important to take note of the IDC data release for the installed package. If you check IDC Portal, you will see the current version of IDC data in the bottom left corner. \n",
158+
"IDC data is versioned. When you work with `idc-index` it is important to take note of the IDC data release for the installed package. If you check IDC Portal, you will see the current version of IDC data in the bottom left corner.\n",
150159
"\n",
151160
"<img src=\"https://github.com/ImagingDataCommons/IDC-Tutorials/releases/download/0.2.0/Tutorial-version.gif\" alt=\"select\" width=\"800\"/>\n"
152161
]
153162
},
154163
{
155164
"cell_type": "markdown",
156-
"metadata": {},
165+
"metadata": {
166+
"id": "yGXb8zPEDnmI"
167+
},
157168
"source": [
158169
"It is always a good idea to confirm the version of IDC data for the `idc-index` package!"
159170
]
160171
},
161172
{
162173
"cell_type": "code",
163-
"execution_count": 3,
164-
"metadata": {},
174+
"execution_count": null,
175+
"metadata": {
176+
"id": "11L-clQFDnmJ",
177+
"outputId": "e552d78d-f63e-4ff9-b7bf-a38dd2911746"
178+
},
165179
"outputs": [
166180
{
167181
"data": {
@@ -180,7 +194,9 @@
180194
},
181195
{
182196
"cell_type": "markdown",
183-
"metadata": {},
197+
"metadata": {
198+
"id": "AsvLbg0wDnmJ"
199+
},
184200
"source": [
185201
"Now that you have `idc-index` install, among many other things, you can download files corresponding to the individual collections, patients, or studies to your computer.\n",
186202
"\n",
@@ -191,7 +207,9 @@
191207
},
192208
{
193209
"cell_type": "markdown",
194-
"metadata": {},
210+
"metadata": {
211+
"id": "Z43rsoBfDnmK"
212+
},
195213
"source": [
196214
"If you followed the demo above precisely, you shuld have this string in your clipboard: `1.2.840.113654.2.55.68425808326883186792123057288612355322`. This identifier is all that is needed to fetch the files contained in that DICOM study with just a single function call using `idc-index`! In the following cell these files will be downloaded to the current directory.\n",
197215
"\n",
@@ -200,8 +218,11 @@
200218
},
201219
{
202220
"cell_type": "code",
203-
"execution_count": 4,
204-
"metadata": {},
221+
"execution_count": null,
222+
"metadata": {
223+
"id": "O-ekzGMpDnmK",
224+
"outputId": "1ff56d0c-b783-42ad-d3d0-a978428c9c72"
225+
},
205226
"outputs": [
206227
{
207228
"name": "stderr",
@@ -230,7 +251,9 @@
230251
},
231252
{
232253
"cell_type": "markdown",
233-
"metadata": {},
254+
"metadata": {
255+
"id": "8NfsIdtTDnmK"
256+
},
234257
"source": [
235258
"Once the download is completed, you can check the current directory to examine the content. Note that files are downloaded in to a folder hierarchy to make navigation easier. The default hierarchy is `collection_id` > `PatientID` > `StudyInstanceUID` > `Modality`_`SeriesInstanceUID`. You can configure this hierarchy - see documentation for the `download_from_selection()` function [here](https://idc-index.readthedocs.io/en/latest/api/idc_index.html#idc_index.index.IDCClient.download_from_selection).\n",
236259
"\n",
@@ -251,11 +274,11 @@
251274
"\n",
252275
"To get started with BigQuery you need is a Google account (google identity) and a web browser. If you don't have a Google account, you can learn how to get one [here](https://accounts.google.com/signup/v2/webcreateaccount?dsh=308321458437252901&continue=https%3A%2F%2Faccounts.google.com%2FManageAccount&flowName=GlifWebSignIn&flowEntry=SignUp#FirstName=&LastName=). Note that you do NOT need a Gmail email account - [you can use your non-Gmail email address to create one instead](https://support.google.com/accounts/answer/27441?hl=en#existingemail).\n",
253276
"\n",
254-
"[!WARNING] \n",
277+
"[!WARNING]\n",
255278
"\n",
256279
"The code cells in this section of the notebook should work if you run it in Google Colab. They will not work on your computer!\n",
257280
"\n",
258-
"[!WARNING] \n",
281+
"[!WARNING]\n",
259282
"\n",
260283
"If you have a Google account that was provided by your organization, it may not be suitable for this tutorial if the organization managing your account has restrictions in place related to GCP! If you experience issues using your organization account, please switch to a personal one (you can create one just for the purposes of this tutorial, if you prefer)."
261284
]
@@ -266,9 +289,9 @@
266289
"id": "PPIHDykYodXO"
267290
},
268291
"source": [
269-
"The first step is to activate Google Cloud Platform product for the Google account you will be using. \n",
292+
"The first step is to activate Google Cloud Platform product for the Google account you will be using.\n",
270293
"\n",
271-
"You do not need to connect your credit card, and you will not need any special permissions or credits to create a project and use it in the subsequent parts of this tutorial series. \n",
294+
"You do not need to connect your credit card, and you will not need any special permissions or credits to create a project and use it in the subsequent parts of this tutorial series.\n",
272295
"\n",
273296
"To activate Google Cloud Platform for your account, follow these steps.\n",
274297
"\n",
@@ -289,24 +312,12 @@
289312
},
290313
{
291314
"cell_type": "code",
292-
"execution_count": 5,
315+
"execution_count": null,
293316
"metadata": {
294317
"cellView": "form",
295318
"id": "SJ29fuYyodXP"
296319
},
297-
"outputs": [
298-
{
299-
"ename": "ModuleNotFoundError",
300-
"evalue": "No module named 'google'",
301-
"output_type": "error",
302-
"traceback": [
303-
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
304-
"\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)",
305-
"Cell \u001b[0;32mIn[5], line 8\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mos\u001b[39;00m\n\u001b[1;32m 6\u001b[0m os\u001b[38;5;241m.\u001b[39menviron[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mGCP_PROJECT_ID\u001b[39m\u001b[38;5;124m\"\u001b[39m] \u001b[38;5;241m=\u001b[39m my_ProjectID\n\u001b[0;32m----> 8\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mgoogle\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mcolab\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m auth\n\u001b[1;32m 9\u001b[0m auth\u001b[38;5;241m.\u001b[39mauthenticate_user()\n",
306-
"\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'google'"
307-
]
308-
}
309-
],
320+
"outputs": [],
310321
"source": [
311322
"#@title Enter your Project ID\n",
312323
"# initialize this variable with your Google Cloud Project ID!\n",
@@ -413,8 +424,8 @@
413424
],
414425
"metadata": {
415426
"colab": {
416-
"include_colab_link": true,
417-
"provenance": []
427+
"provenance": [],
428+
"include_colab_link": true
418429
},
419430
"gpuClass": "standard",
420431
"kernelspec": {
@@ -437,4 +448,4 @@
437448
},
438449
"nbformat": 4,
439450
"nbformat_minor": 0
440-
}
451+
}

0 commit comments

Comments
 (0)