|
115 | 115 | "outputs": [], |
116 | 116 | "source": [ |
117 | 117 | "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" |
119 | 119 | ] |
120 | 120 | }, |
121 | 121 | { |
|
164 | 164 | "id": "1-ZR8MkhFqKX" |
165 | 165 | }, |
166 | 166 | "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`." |
168 | 168 | ] |
169 | 169 | }, |
170 | 170 | { |
|
177 | 177 | "source": [ |
178 | 178 | "query_anns = '''\n", |
179 | 179 | "SELECT\n", |
180 | | - " SeriesDescription,\n", |
181 | 180 | " 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", |
185 | 184 | "FROM\n", |
186 | | - " index\n", |
| 185 | + " ann_index\n", |
187 | 186 | "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", |
192 | 188 | "ORDER BY\n", |
193 | 189 | " referencedSeriesInstanceUID\n", |
194 | 190 | "'''\n", |
|
366 | 362 | " SELECT\n", |
367 | 363 | " SeriesInstanceUID\n", |
368 | 364 | " FROM\n", |
369 | | - " index\n", |
| 365 | + " ann_index\n", |
370 | 366 | " WHERE\n", |
371 | 367 | " collection_id = 'bonemarrowwsi_pediatricleukemia'\n", |
372 | | - " AND Modality='ANN'\n", |
373 | 368 | " AND LOWER(SeriesDescription) LIKE '%monolayer%'\n", |
374 | 369 | " ORDER BY\n", |
375 | 370 | " SeriesInstanceUID\n", |
|
1135 | 1130 | " SELECT\n", |
1136 | 1131 | " SeriesInstanceUID,\n", |
1137 | 1132 | " FROM\n", |
1138 | | - " index\n", |
| 1133 | + " ann_index\n", |
1139 | 1134 | " WHERE\n", |
1140 | 1135 | " collection_id = 'bonemarrowwsi_pediatricleukemia'\n", |
1141 | | - " AND Modality='ANN'\n", |
1142 | 1136 | " AND LOWER(SeriesDescription) LIKE '%{query_word}%'\n", |
1143 | 1137 | " ORDER BY\n", |
1144 | 1138 | " SeriesInstanceUID\n", |
|
1149 | 1143 | " SELECT\n", |
1150 | 1144 | " SeriesInstanceUID,\n", |
1151 | 1145 | " FROM\n", |
1152 | | - " index\n", |
| 1146 | + " ann_index\n", |
1153 | 1147 | " WHERE\n", |
1154 | 1148 | " collection_id = 'bonemarrowwsi_pediatricleukemia'\n", |
1155 | | - " AND Modality='ANN'\n", |
1156 | 1149 | " ORDER BY\n", |
1157 | 1150 | " SeriesInstanceUID\n", |
1158 | 1151 | " LIMIT {ann_to_process}\n", |
|
0 commit comments