Skip to content

Commit 06d9690

Browse files
fedorovclaude
andcommitted
Document ct_index, mr_index, pt_index from idc-index 0.12.3
Three new modality-specific acquisition parameter tables added in idc-index-data 24.2.0: ct_index, mr_index, pt_index. All join on SeriesInstanceUID and are fetched on demand. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 21bb972 commit 06d9690

5 files changed

Lines changed: 106 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,21 @@ All notable changes to the IDC Claude Skill are documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/),
66
and this project adheres to [Semantic Versioning](https://semver.org/).
77

8-
## [1.6.3] - 2026-05-08
8+
## [1.6.3] - 2026-05-09
9+
10+
### Added
11+
12+
- `ct_index`, `mr_index`, `pt_index` tables (idc-index 0.12.3 / idc-index-data 24.2.0): modality-specific acquisition and reconstruction parameter indices, one row per series, all joining on `SeriesInstanceUID`
13+
- `ct_index` (21 columns): pixel spacing, slice thickness, kVp, convolution kernel, tube current min/max (dose-modulated), exposure, spiral pitch, scan options
14+
- `mr_index` (22 columns): field strength, scanning sequence, TE (array for multi-echo), TR, flip angle, DiffusionBValue (array for DWI), pixel bandwidth, receive coil, number of temporal positions
15+
- `pt_index` (21 columns): radionuclide, injected dose, reconstruction method, decay/scatter/attenuation correction, frame duration (array for dynamic PET), number of time slices
16+
- SQL query patterns for all three new tables in `references/sql_patterns.md`
17+
- Join column entries for `ct_index`, `mr_index`, `pt_index` in `references/index_tables_guide.md` and SKILL.md
18+
- Parquet file entries for `ct_index.parquet`, `mr_index.parquet`, `pt_index.parquet` in `references/parquet_access_guide.md`
919

1020
### Changed
1121

22+
- Updated idc-index reference to 0.12.3
1223
- Clarified `download_from_selection` API: added explicit warning that it takes filter keyword arguments (not a DataFrame), comparison table vs `download_dicom_series` (which has a different first-argument order), and restructured the download example as a step-by-step query → extract UIDs → pass list flow
1324
- Documented `download_dicom_series` as an alternative download method with its own signature (`seriesInstanceUID` as first arg, then `downloadDir`)
1425
- Reduced redundancy and duplication in SKILL.md for cleaner reading

SKILL.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ license: This skill is provided under the MIT License. IDC data itself has indiv
55
metadata:
66
version: 1.6.3
77
skill-author: Andrey Fedorov, @fedorov
8-
idc-index: "0.12.2"
8+
idc-index: "0.12.3"
99
idc-data-version: "v24"
1010
repository: https://github.com/ImagingDataCommons/idc-claude-skill
1111
---
@@ -145,6 +145,9 @@ Always call `client.fetch_index("table_name")` before querying any index table
145145
| `contrast_index` | 1 row = 1 series with contrast info | Contrast agent metadata: agent name, ingredient, administration route (CT, MR, PT, XA, RF) |
146146
| `volume_geometry_index` | 1 row = 1 CT/MR/PT series | 3D volume geometry validation for single-frame CT, MR, and PT series; boolean checks for orientation, spacing, dimensions, and slice positions; composite `regularly_spaced_3d_volume` flag |
147147
| `rtstruct_index` | 1 row = 1 RTSTRUCT series | RT Structure Set metadata: total ROI count, ROI names, generation algorithms, interpreted types, and the referenced image series UID |
148+
| `ct_index` | 1 row = 1 CT series | CT acquisition/reconstruction parameters: pixel spacing, slice thickness, kVp, convolution kernel, tube current (min/max for dose-modulated), exposure, spiral pitch, scan options |
149+
| `mr_index` | 1 row = 1 MR series | MR acquisition/sequence parameters: field strength, scanning sequence, TE (array for multi-echo), TR, flip angle, DiffusionBValue (array for DWI), pixel bandwidth, receive coil, number of temporal positions |
150+
| `pt_index` | 1 row = 1 PET series | PET acquisition/reconstruction/radiopharmaceutical parameters: series type, units, decay/scatter/attenuation correction, reconstruction method, radionuclide, injected dose, frame duration (array for dynamic PET) |
148151
| `prior_versions_index` | 1 row = 1 DICOM series | Series that have been removed or superseded in previous IDC releases; use only to download deprecated/historical data — do not query for current data |
149152

150153
### Joining Tables
@@ -165,6 +168,9 @@ Always call `client.fetch_index("table_name")` before querying any index table
165168
| `segmented_SeriesInstanceUID` | seg_index → index | Link segmentation to its source image series (join seg_index.segmented_SeriesInstanceUID = index.SeriesInstanceUID) |
166169
| `referenced_SeriesInstanceUID` | ann_index → index | Link annotation to its source image series (join ann_index.referenced_SeriesInstanceUID = index.SeriesInstanceUID) |
167170
| `SeriesInstanceUID` / `referenced_SeriesInstanceUID` | index, rtstruct_index | Join RTSTRUCT series to its metadata (index.SeriesInstanceUID = rtstruct_index.SeriesInstanceUID); use rtstruct_index.referenced_SeriesInstanceUID to find the source image series |
171+
| `SeriesInstanceUID` | index, ct_index | Link CT series to acquisition/reconstruction parameters |
172+
| `SeriesInstanceUID` | index, mr_index | Link MR series to sequence/acquisition parameters |
173+
| `SeriesInstanceUID` | index, pt_index | Link PET series to acquisition/radiopharmaceutical parameters |
168174

169175
**Note:** `subjects`, `updated`, and `description` appear in multiple tables but have different meanings (counts vs identifiers, different update contexts).
170176

references/index_tables_guide.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Index Tables Guide for IDC
22

3-
**Tested with:** idc-index 0.12.2 (IDC data version v24)
3+
**Tested with:** idc-index 0.12.3 (IDC data version v24)
44

55
This guide covers the structure and access patterns for IDC index tables: programmatic schema discovery, DataFrame access, and join column references. For the overview of available tables and their purposes, see the "Index Tables" section in the main SKILL.md.
66

@@ -130,6 +130,9 @@ Use this table to identify join columns between index tables. Always call `clien
130130
| `index` | `volume_geometry_index` | `index.SeriesInstanceUID = volume_geometry_index.SeriesInstanceUID` |
131131
| `index` | `rtstruct_index` | `index.SeriesInstanceUID = rtstruct_index.SeriesInstanceUID` |
132132
| `rtstruct_index` | `index` (source images) | `rtstruct_index.referenced_SeriesInstanceUID = index.SeriesInstanceUID` |
133+
| `index` | `ct_index` | `index.SeriesInstanceUID = ct_index.SeriesInstanceUID` |
134+
| `index` | `mr_index` | `index.SeriesInstanceUID = mr_index.SeriesInstanceUID` |
135+
| `index` | `pt_index` | `index.SeriesInstanceUID = pt_index.SeriesInstanceUID` |
133136

134137
For complete query examples using these joins, see `references/sql_patterns.md`.
135138

references/parquet_access_guide.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ https://storage.googleapis.com/idc-index-data-artifacts/current/release_artifact
3838
| `collections_index.parquet` || Collection-level metadata |
3939
| `analysis_results_index.parquet` || Derived dataset metadata |
4040
| `clinical_index.parquet` | ~0.2 MB | Clinical data column dictionary |
41+
| `ct_index.parquet` || CT acquisition/reconstruction parameters |
42+
| `mr_index.parquet` || MR sequence/acquisition parameters |
43+
| `pt_index.parquet` || PET acquisition/radiopharmaceutical parameters |
4144
| `prior_versions_index.parquet` || Series from previous IDC releases |
4245

4346
**Note:** the main index file is named `idc_index.parquet`, not `index.parquet`. Reference it with an alias in SQL queries (e.g., `FROM read_parquet(...) AS index`).

references/sql_patterns.md

Lines changed: 80 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SQL Query Patterns for IDC
22

3-
**Tested with:** idc-index 0.12.1 (IDC data version v24)
3+
**Tested with:** idc-index 0.12.3 (IDC data version v24)
44

55
Quick reference for common SQL query patterns when working with IDC data. For detailed examples with context, see the "Core Capabilities" section in the main SKILL.md.
66

@@ -14,6 +14,7 @@ Load this guide when you need quick-reference SQL patterns for:
1414
- Linking imaging data to clinical data
1515
- Filtering by 3D volume geometry validity (volume_geometry_index)
1616
- Finding RT Structure Set series and ROI metadata (rtstruct_index)
17+
- Filtering by CT/MR/PET acquisition parameters (ct_index, mr_index, pt_index)
1718

1819
For table schemas, DataFrame access, and join column references, see `references/index_tables_guide.md`.
1920

@@ -277,6 +278,84 @@ client.sql_query("""
277278
""")
278279
```
279280

281+
## Modality Acquisition Parameters
282+
283+
`ct_index`, `mr_index`, and `pt_index` (added in idc-index 0.12.3) expose acquisition and reconstruction parameters for CT, MR, and PET series. All join on `SeriesInstanceUID`. Dose-modulated CT acquisitions have `_min`/`_max` columns for tube current, exposure, and exposure time.
284+
285+
```python
286+
client.fetch_index("ct_index")
287+
client.fetch_index("mr_index")
288+
client.fetch_index("pt_index")
289+
290+
# CT: thin-slice series (≤2mm) with standard reconstruction
291+
client.sql_query("""
292+
SELECT i.collection_id, i.SeriesInstanceUID, i.BodyPartExamined,
293+
c.SliceThickness, c.ConvolutionKernel, c.KVP
294+
FROM index i
295+
JOIN ct_index c ON i.SeriesInstanceUID = c.SeriesInstanceUID
296+
WHERE c.SliceThickness <= 2.0
297+
AND c.ConvolutionKernel IS NOT NULL
298+
LIMIT 10
299+
""")
300+
301+
# CT: dose-modulated acquisitions (tube current varies across slices)
302+
client.sql_query("""
303+
SELECT i.collection_id, c.SeriesInstanceUID,
304+
c.XRayTubeCurrent_min, c.XRayTubeCurrent_max, c.SliceThickness
305+
FROM ct_index c
306+
JOIN index i ON c.SeriesInstanceUID = i.SeriesInstanceUID
307+
WHERE c.XRayTubeCurrent_min != c.XRayTubeCurrent_max
308+
LIMIT 10
309+
""")
310+
311+
# MR: DWI series (have non-null DiffusionBValue) at 3T
312+
client.sql_query("""
313+
SELECT i.collection_id, i.SeriesInstanceUID, i.SeriesDescription,
314+
m.MagneticFieldStrength, m.DiffusionBValue
315+
FROM index i
316+
JOIN mr_index m ON i.SeriesInstanceUID = m.SeriesInstanceUID
317+
WHERE m.DiffusionBValue IS NOT NULL
318+
AND m.MagneticFieldStrength >= 2.9
319+
LIMIT 10
320+
""")
321+
322+
# MR: multi-echo series (EchoTime stored as array with multiple values)
323+
client.sql_query("""
324+
SELECT i.collection_id, i.SeriesInstanceUID,
325+
m.EchoTime, m.EchoTrainLength, m.ScanningSequence
326+
FROM index i
327+
JOIN mr_index m ON i.SeriesInstanceUID = m.SeriesInstanceUID
328+
WHERE m.EchoTrainLength > 1
329+
LIMIT 10
330+
""")
331+
332+
# PET: FDG studies with specific reconstruction method
333+
client.sql_query("""
334+
SELECT i.collection_id, i.SeriesInstanceUID,
335+
p.RadionuclideCodeMeaning, p.ReconstructionMethod,
336+
p.Units, p.DecayCorrection
337+
FROM index i
338+
JOIN pt_index p ON i.SeriesInstanceUID = p.SeriesInstanceUID
339+
WHERE p.RadionuclideCodeMeaning LIKE '%fluorodeoxyglucose%'
340+
LIMIT 10
341+
""")
342+
343+
# PET: dynamic acquisitions (ActualFrameDuration is array with multiple values)
344+
client.sql_query("""
345+
SELECT i.collection_id, i.SeriesInstanceUID,
346+
p.NumberOfTimeSlices, p.ActualFrameDuration
347+
FROM index i
348+
JOIN pt_index p ON i.SeriesInstanceUID = p.SeriesInstanceUID
349+
WHERE p.NumberOfTimeSlices > 1
350+
LIMIT 10
351+
""")
352+
```
353+
354+
Key columns by table (use `client.indices_overview["ct_index"]["schema"]` for the full list):
355+
- **ct_index**: `SliceThickness`, `KVP`, `ConvolutionKernel`, `SpiralPitchFactor`, `XRayTubeCurrent_min/max`, `Exposure_min/max`, `PixelSpacing_row_mm/col_mm`, `Rows`, `Columns`
356+
- **mr_index**: `MagneticFieldStrength`, `ScanningSequence`, `SequenceVariant`, `MRAcquisitionType`, `EchoTime` (array), `RepetitionTime`, `FlipAngle`, `DiffusionBValue` (array), `NumberOfTemporalPositions`, `ReceiveCoilName`
357+
- **pt_index**: `RadionuclideCodeMeaning`, `Radiopharmaceutical`, `RadionuclideTotalDose`, `ReconstructionMethod`, `DecayCorrection`, `AttenuationCorrectionMethod`, `ActualFrameDuration` (array), `NumberOfTimeSlices`
358+
280359
## Resources
281360

282361
- `references/index_tables_guide.md` for table schemas, DataFrame access, and join column references

0 commit comments

Comments
 (0)