Skip to content

Commit d3b22c6

Browse files
adapted queries to use ann_index
1 parent 5483e3a commit d3b22c6

1 file changed

Lines changed: 10 additions & 17 deletions

File tree

notebooks/collections_demos/bonemarrowwsi_pediatricleukemia.ipynb

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
"outputs": [],
116116
"source": [
117117
"idc_client = IDCClient() # set-up idc_client\n",
118-
"idc_client.fetch_index('sm_instance_index')"
118+
"idc_client.fetch_index('ann_index') # fetch index for ANN objects"
119119
]
120120
},
121121
{
@@ -164,7 +164,7 @@
164164
"id": "1-ZR8MkhFqKX"
165165
},
166166
"source": [
167-
"Next, let's have a look on the available annotation (ANN) files. The following query collects information about ANN files on series-level."
167+
"Next, let's have a look on the available annotation (ANN) files. The following query collects information about ANN files on series-level from idc-index's `ann_index`."
168168
]
169169
},
170170
{
@@ -177,18 +177,14 @@
177177
"source": [
178178
"query_anns = '''\n",
179179
"SELECT\n",
180-
" SeriesDescription,\n",
181180
" SeriesInstanceUID,\n",
182-
" ANY_VALUE(StudyInstanceUID) AS StudyInstanceUID,\n",
183-
" ANY_VALUE(Modality) AS Modality,\n",
184-
" ANY_VALUE(ReferencedSeriesSequence[SAFE_OFFSET(0)].SeriesInstanceUID) AS referencedSeriesInstanceUID\n",
181+
" SeriesDescription,\n",
182+
" StudyInstanceUID,\n",
183+
" referencedSeriesInstanceUID\n",
185184
"FROM\n",
186-
" index\n",
185+
" ann_index\n",
187186
"WHERE\n",
188-
" collection_id = 'bonemarrowwsi_pediatricleukemia' AND Modality='ANN'\n",
189-
"GROUP BY\n",
190-
" SeriesInstanceUID,\n",
191-
" SeriesDescription\n",
187+
" collection_id = 'bonemarrowwsi_pediatricleukemia'\n",
192188
"ORDER BY\n",
193189
" referencedSeriesInstanceUID\n",
194190
"'''\n",
@@ -366,10 +362,9 @@
366362
" SELECT\n",
367363
" SeriesInstanceUID\n",
368364
" FROM\n",
369-
" index\n",
365+
" ann_index\n",
370366
" WHERE\n",
371367
" collection_id = 'bonemarrowwsi_pediatricleukemia'\n",
372-
" AND Modality='ANN'\n",
373368
" AND LOWER(SeriesDescription) LIKE '%monolayer%'\n",
374369
" ORDER BY\n",
375370
" SeriesInstanceUID\n",
@@ -1135,10 +1130,9 @@
11351130
" SELECT\n",
11361131
" SeriesInstanceUID,\n",
11371132
" FROM\n",
1138-
" index\n",
1133+
" ann_index\n",
11391134
" WHERE\n",
11401135
" collection_id = 'bonemarrowwsi_pediatricleukemia'\n",
1141-
" AND Modality='ANN'\n",
11421136
" AND LOWER(SeriesDescription) LIKE '%{query_word}%'\n",
11431137
" ORDER BY\n",
11441138
" SeriesInstanceUID\n",
@@ -1149,10 +1143,9 @@
11491143
" SELECT\n",
11501144
" SeriesInstanceUID,\n",
11511145
" FROM\n",
1152-
" index\n",
1146+
" ann_index\n",
11531147
" WHERE\n",
11541148
" collection_id = 'bonemarrowwsi_pediatricleukemia'\n",
1155-
" AND Modality='ANN'\n",
11561149
" ORDER BY\n",
11571150
" SeriesInstanceUID\n",
11581151
" LIMIT {ann_to_process}\n",

0 commit comments

Comments
 (0)