Skill Tracer
Skills › Scientific Agent Skills › imaging-data-commons › licensing_and_citation.md

licensing_and_citation.md

236 lines · skills/imaging-data-commons/references/licensing_and_citation.md at 5f2bc03

Open on GitHub

Most marks come from matching words in the file, so treat them as pointers.

1# Licensing and Citation Guide for IDC
2

Licensing and Citation Guide for IDC

Raw lines 1 to 2
3## When to Use This Guide
4
5Load this guide when:
6- A user asks whether IDC data can be used commercially, redistributed, or included in a product
7- You are assembling a cohort that mixes collections and need to know which terms govern it
8- A user is publishing results and needs formatted citations (APA, BibTeX, CSL JSON, RDF Turtle)
9- You need the parameters or output formats for citation generation
11The obligation summary — check the license, generate citations — lives in `SKILL.md`. This
12guide holds the detail behind it.
14**These are the two IDC tasks least tied to any one access path.** Licenses and citations are
15available identically from `idc-index`, the REST API, and the hosted MCP server. Use whichever
16route the session is already on rather than installing Python to answer a licensing question,
17or dropping out of an MCP session to run a script.
19| Task | `idc-index` (Python) | REST API | MCP server |
20|------|----------------------|----------|------------|
21| License breakdown for a selection | `sql_query` on `license_short_name` | `POST /v3/licenses` | `get_licenses` |
22| Citations for a selection | `citations_from_selection()` | `POST /v3/citations` | `get_citations` |
24Route-specific detail lives in `references/rest_api_guide.md` (endpoint reference, filter
25syntax, and the strict request-body validation) and
26`references/mcp_guide.md` (tool inventory). The license semantics below apply to all three.

When to Use This Guide

Load this guide when:

  • A user asks whether IDC data can be used commercially, redistributed, or included in a product
  • You are assembling a cohort that mixes collections and need to know which terms govern it
  • A user is publishing results and needs formatted citations (APA, BibTeX, CSL JSON, RDF Turtle)
  • You need the parameters or output formats for citation generation

The obligation summary — check the license, generate citations — lives in SKILL.md. This guide holds the detail behind it.

These are the two IDC tasks least tied to any one access path. Licenses and citations are available identically from idc-index, the REST API, and the hosted MCP server. Use whichever route the session is already on rather than installing Python to answer a licensing question, or dropping out of an MCP session to run a script.

Taskidc-index (Python)REST APIMCP server
License breakdown for a selectionsql_query on license_short_namePOST /v3/licensesget_licenses
Citations for a selectioncitations_from_selection()POST /v3/citationsget_citations

Route-specific detail lives in references/rest_api_guide.md (endpoint reference, filter syntax, and the strict request-body validation) and references/mcp_guide.md (tool inventory). The license semantics below apply to all three.

Raw lines 3 to 27
Uses an outside tool MCP :15
28## Licenses in IDC
30The license is IDC metadata alongside the images, not a DICOM attribute inside the file.
31Every row in the `index` table carries a `license_short_name` column; retain it with the manifest. There is no single IDC-wide license.
33The following is the official IDC v24 snapshot, reviewed 2026-09-30; query your selection again at use time.
35| License | Share of data | Commercial use | Attribution required |
36|---------|---------------|----------------|----------------------|
37| CC BY 4.0 | 74.7% | Yes | Yes |
38| CC BY 3.0 | 22.1% | Yes | Yes |
39| CC BY-NC 4.0 | 2.1% | **No** | Yes |
40| CC BY-NC 3.0 | 0.8% | **No** | Yes |
41| NLM Terms and Conditions | 0.3% | Read the terms | Yes |
43About 97% of IDC data by size permits commercial reuse; just under 3% is non-commercial. Treat
44any `license_short_name` that is not a recognizable Creative Commons string as custom, and
45report the exact value to the user rather than assuming it permits reuse.
47**Licenses attach to individual series, not to whole collections.** 39 of IDC's 176 collections
48carry more than one license — analysis results and original images within one collection can
49differ, as can series from different sources. Never conclude that a collection is
50commercially usable from one series, or from the collection's headline license: group by
51`license_short_name` over the exact selection you intend to use.
53**A combined workflow must satisfy every component license.** CC BY annotations do not
54relicense their CC BY-NC source images. Exclude restricted source series from a commercial
55cohort unless separate permission covers the intended use.
57Some commercially restricted data is in `idc-open-data-cr` (AWS) / `idc-open-cr` (GCS),
58but CC BY-NC series also occur in `idc-open-data`. Never use the bucket as a license filter. See
59`references/cloud_storage_guide.md` for bucket details.

Licenses in IDC

The license is IDC metadata alongside the images, not a DICOM attribute inside the file. Every row in the index table carries a license_short_name column; retain it with the manifest. There is no single IDC-wide license.

The following is the official IDC v24 snapshot, reviewed 2026-09-30; query your selection again at use time.

LicenseShare of dataCommercial useAttribution required
CC BY 4.074.7%YesYes
CC BY 3.022.1%YesYes
CC BY-NC 4.02.1%NoYes
CC BY-NC 3.00.8%NoYes
NLM Terms and Conditions0.3%Read the termsYes

About 97% of IDC data by size permits commercial reuse; just under 3% is non-commercial. Treat any license_short_name that is not a recognizable Creative Commons string as custom, and report the exact value to the user rather than assuming it permits reuse.

Licenses attach to individual series, not to whole collections. 39 of IDC's 176 collections carry more than one license — analysis results and original images within one collection can differ, as can series from different sources. Never conclude that a collection is commercially usable from one series, or from the collection's headline license: group by license_short_name over the exact selection you intend to use.

A combined workflow must satisfy every component license. CC BY annotations do not relicense their CC BY-NC source images. Exclude restricted source series from a commercial cohort unless separate permission covers the intended use.

Some commercially restricted data is in idc-open-data-cr (AWS) / idc-open-cr (GCS), but CC BY-NC series also occur in idc-open-data. Never use the bucket as a license filter. See references/cloud_storage_guide.md for bucket details.

Raw lines 28 to 60
61## Checking licenses

Checking licenses

Raw lines 61 to 62
63### Via `idc-index`
65```python
66from idc_index import IDCClient
67client = IDCClient()
69# Licenses across all collections
70licenses = client.sql_query("""
71 SELECT DISTINCT
72 collection_id,
73 license_short_name,
74 COUNT(DISTINCT SeriesInstanceUID) as series_count
75 FROM index
76 GROUP BY collection_id, license_short_name
77 ORDER BY collection_id
78""")
79print(licenses)
80```
82```python
83# Licenses present in one specific cohort — run this before handing a dataset to a user
84cohort_licenses = client.sql_query("""
85 SELECT license_short_name, COUNT(DISTINCT SeriesInstanceUID) as series_count
86 FROM index
87 WHERE Modality = 'MR' AND BodyPartExamined = 'BREAST'
88 GROUP BY license_short_name
89""")
90print(cohort_licenses)
91```
93```python
94# Explicit CC BY subset; custom license strings need separate review
95commercial_ok = client.sql_query("""
96 SELECT collection_id, SeriesInstanceUID
97 FROM index
98 WHERE Modality = 'CT'
99 AND license_short_name IN ('CC BY 3.0', 'CC BY 4.0')
100 LIMIT 20
101""")
102```

Via idc-index

from idc_index import IDCClient
client = IDCClient()

# Licenses across all collections
licenses = client.sql_query("""
    SELECT DISTINCT
      collection_id,
      license_short_name,
      COUNT(DISTINCT SeriesInstanceUID) as series_count
    FROM index
    GROUP BY collection_id, license_short_name
    ORDER BY collection_id
""")
print(licenses)
# Licenses present in one specific cohort — run this before handing a dataset to a user
cohort_licenses = client.sql_query("""
    SELECT license_short_name, COUNT(DISTINCT SeriesInstanceUID) as series_count
    FROM index
    WHERE Modality = 'MR' AND BodyPartExamined = 'BREAST'
    GROUP BY license_short_name
""")
print(cohort_licenses)
# Explicit CC BY subset; custom license strings need separate review
commercial_ok = client.sql_query("""
    SELECT collection_id, SeriesInstanceUID
    FROM index
    WHERE Modality = 'CT'
      AND license_short_name IN ('CC BY 3.0', 'CC BY 4.0')
    LIMIT 20
""")
Raw lines 63 to 103
104### Via the REST API
106`POST /v3/licenses` takes the filter object **under `filters`**, just like `/v3/citations`, and
107returns the per-license breakdown with series counts and sizes:
109```bash
110B=https://api.imaging.datacommons.cancer.gov/v3
111curl -s $B/licenses \
112 -H 'content-type: application/json' \
113 -d '{"filters": {"terms": {"Modality": ["MR"], "BodyPartExamined": ["BREAST"]}}}'
114```
116Response shape: `licenses[{license_short_name, series, size_TB}]`, plus `filters_applied` and
117`warnings`. Read both; a bare `terms` object returns HTTP 422 on the reviewed live build. A collection's licenses are
118also included in `GET /v3/collections/{id}`.

Via the REST API

POST /v3/licenses takes the filter object **under filters**, just like /v3/citations, and returns the per-license breakdown with series counts and sizes:

B=https://api.imaging.datacommons.cancer.gov/v3
curl -s $B/licenses \
  -H 'content-type: application/json' \
  -d '{"filters": {"terms": {"Modality": ["MR"], "BodyPartExamined": ["BREAST"]}}}'

Response shape: licenses[{license_short_name, series, size_TB}], plus filters_applied and warnings. Read both; a bare terms object returns HTTP 422 on the reviewed live build. A collection's licenses are also included in GET /v3/collections/{id}.

Raw lines 104 to 119
120### Via the MCP server
122Call `get_licenses` with the same selection you built with `build_cohort`. The result carries
123the same per-license breakdown; the CC BY vs CC BY-NC distinction above applies unchanged.

Via the MCP server

Call get_licenses with the same selection you built with build_cohort. The result carries the same per-license breakdown; the CC BY vs CC BY-NC distinction above applies unchanged.

Raw lines 120 to 124
Uses an outside tool MCP :120
125## Citations and attribution
127The `source_DOI` column links to the publications describing how each dataset was generated.
128All three routes resolve a selection into formatted citations. Also preserve required license
129links, notices, and modification statements for the intended reuse; a citation alone is not
130a complete check of every license condition.
132Generate citations from the *same* selection you downloaded, not from the collection as a
133whole — a five-series subset of a collection that spans several source publications should
134cite only the publications it actually draws on.

Citations and attribution

The source_DOI column links to the publications describing how each dataset was generated. All three routes resolve a selection into formatted citations. Also preserve required license links, notices, and modification statements for the intended reuse; a citation alone is not a complete check of every license condition.

Generate citations from the same selection you downloaded, not from the collection as a whole — a five-series subset of a collection that spans several source publications should cite only the publications it actually draws on.

Raw lines 125 to 135
136### Via `idc-index`
138```python
139# Citations for a collection (APA is the default format)
140citations = client.citations_from_selection(collection_id="rider_pilot")
141for citation in citations:
142 print(citation)
143```
145```python
146# Citations for a specific set of series — matches what you actually downloaded
147results = client.sql_query("""
148 SELECT SeriesInstanceUID FROM index
149 WHERE collection_id = 'tcga_luad' LIMIT 5
150""")
151citations = client.citations_from_selection(
152 seriesInstanceUID=list(results['SeriesInstanceUID'].values)
154```
156```python
157# BibTeX, for LaTeX manuscripts
158bibtex_citations = client.citations_from_selection(
159 collection_id="tcga_luad",
160 citation_format=IDCClient.CITATION_FORMAT_BIBTEX
162```
164`citations_from_selection()` takes the same selection filters as the download methods —
165`collection_id`, `patientId`, `studyInstanceUID`, `seriesInstanceUID` — plus `citation_format`.
166In 0.12.5 the most-specific supplied selector takes precedence; filters do not intersect.
167Use the exact series UID list from your SQL selection to keep download and citation scopes aligned.

Via idc-index

# Citations for a collection (APA is the default format)
citations = client.citations_from_selection(collection_id="rider_pilot")
for citation in citations:
    print(citation)
# Citations for a specific set of series — matches what you actually downloaded
results = client.sql_query("""
    SELECT SeriesInstanceUID FROM index
    WHERE collection_id = 'tcga_luad' LIMIT 5
""")
citations = client.citations_from_selection(
    seriesInstanceUID=list(results['SeriesInstanceUID'].values)
)
# BibTeX, for LaTeX manuscripts
bibtex_citations = client.citations_from_selection(
    collection_id="tcga_luad",
    citation_format=IDCClient.CITATION_FORMAT_BIBTEX
)

citations_from_selection() takes the same selection filters as the download methods — collection_id, patientId, studyInstanceUID, seriesInstanceUID — plus citation_format. In 0.12.5 the most-specific supplied selector takes precedence; filters do not intersect. Use the exact series UID list from your SQL selection to keep download and citation scopes aligned.

Raw lines 136 to 168
169### Via the REST API
171`POST /v3/citations` **wraps** the filter in a `filters` key, the same as `/v3/licenses`:
173```bash
174curl -s $B/citations \
175 -H 'content-type: application/json' \
176 -d '{"filters": {"terms": {"collection_id": ["rider_pilot"]}}, "citation_format": "bibtex"}'
177```
179The response separates the per-dataset `citations[]` from `idc_acknowledgment` (the IDC paper)
180and `recommendation`. Include both parts — see *What to include when publishing* below.

Via the REST API

POST /v3/citations wraps the filter in a filters key, the same as /v3/licenses:

curl -s $B/citations \
  -H 'content-type: application/json' \
  -d '{"filters": {"terms": {"collection_id": ["rider_pilot"]}}, "citation_format": "bibtex"}'

The response separates the per-dataset citations[] from idc_acknowledgment (the IDC paper) and recommendation. Include both parts — see What to include when publishing below.

Raw lines 169 to 181
182### Via the MCP server
184Call `get_citations` for a selection. It returns the per-dataset citations plus the IDC paper
185to acknowledge IDC itself, matching the REST response.

Via the MCP server

Call get_citations for a selection. It returns the per-dataset citations plus the IDC paper to acknowledge IDC itself, matching the REST response.

Raw lines 182 to 186
Uses an outside tool MCP :182
187### Citation formats
189| `idc-index` constant | REST / MCP `citation_format` | Output |
190|----------------------|------------------------------|--------|
191| `IDCClient.CITATION_FORMAT_APA` | `apa` (default) | APA string |
192| `IDCClient.CITATION_FORMAT_BIBTEX` | `bibtex` | BibTeX entry, for LaTeX |
193| `IDCClient.CITATION_FORMAT_JSON` | `csl-json` | CSL JSON |
194| `IDCClient.CITATION_FORMAT_TURTLE` | `turtle` | RDF Turtle |

Citation formats

idc-index constantREST / MCP citation_formatOutput
IDCClient.CITATION_FORMAT_APAapa (default)APA string
IDCClient.CITATION_FORMAT_BIBTEXbibtexBibTeX entry, for LaTeX
IDCClient.CITATION_FORMAT_JSONcsl-jsonCSL JSON
IDCClient.CITATION_FORMAT_TURTLEturtleRDF Turtle
Raw lines 187 to 195
Uses an outside tool MCP :189
196## What to include when publishing
1981. **The dataset citations** for every collection or series set used.
1992. **The IDC data version** — `client.get_idc_version()`, `GET /v3/version`, or the MCP
200 `get_idc_version` tool. IDC releases are versioned and series are added and revised between
201 them, so the version is what makes the selection reproducible.
2023. **The IDC platform citation**, to acknowledge IDC itself. The REST and MCP routes return
203 this as `idc_acknowledgment`. `idc-index` 0.12.5 already appends it to
204 `citations_from_selection()` for a nonempty selection; check before adding it again:
206 > Fedorov, A., et al. "National Cancer Institute Imaging Data Commons: Toward Transparency,
207 > Reproducibility, and Scalability in Imaging Artificial Intelligence." *RadioGraphics* 43.12
208 > (2023). https://doi.org/10.1148/rg.230180
2104. **The series manifest** — save `SeriesInstanceUID`, `crdc_series_uuid`, `series_aws_url`,
211 `license_short_name`, and `source_DOI` with the data/index version. UIDs alone do not pin
212 revised file content.

What to include when publishing

  1. The dataset citations for every collection or series set used.
  2. The IDC data version — client.get_idc_version(), GET /v3/version, or the MCP get_idc_version tool. IDC releases are versioned and series are added and revised between them, so the version is what makes the selection reproducible.
  3. The IDC platform citation, to acknowledge IDC itself. The REST and MCP routes return this as idc_acknowledgment. idc-index 0.12.5 already appends it to citations_from_selection() for a nonempty selection; check before adding it again:
Fedorov, A., et al. "National Cancer Institute Imaging Data Commons: Toward Transparency, Reproducibility, and Scalability in Imaging Artificial Intelligence." RadioGraphics 43.12 (2023). https://doi.org/10.1148/rg.230180
  1. The series manifest — save SeriesInstanceUID, crdc_series_uuid, series_aws_url, license_short_name, and source_DOI with the data/index version. UIDs alone do not pin revised file content.
Raw lines 196 to 213
Uses an outside tool MCP :199
214## Troubleshooting

Troubleshooting

Raw lines 214 to 215
216### Issue: Fewer citations returned than collections selected
218- **Cause:** Citations are derived from `source_DOI`, and several collections can share one
219 DOI, so a multi-collection selection may legitimately produce a shorter list.
220- **Solution:** Query `SELECT DISTINCT collection_id, source_DOI FROM index WHERE ...` to see
221 the mapping directly.

Issue: Fewer citations returned than collections selected

  • Cause: Citations are derived from source_DOI, and several collections can share one DOI, so a multi-collection selection may legitimately produce a shorter list.
  • Solution: Query SELECT DISTINCT collection_id, source_DOI FROM index WHERE ... to see the mapping directly.
Raw lines 216 to 222
223### Issue: HTTP 422 from licenses or citations
225- **Cause:** The filter was passed directly instead of wrapped in `filters`, or a key is misspelled.
226- **Solution:** Use `{"filters": {"terms": {...}}}` for both routes and inspect FastAPI
227 `detail[]`. Empty valid filters can still select the archive: read `warnings` and
228 `filters_applied` before accepting the result.

Issue: HTTP 422 from licenses or citations

  • Cause: The filter was passed directly instead of wrapped in filters, or a key is misspelled.
  • Solution: Use {"filters": {"terms": {...}}} for both routes and inspect FastAPI detail[]. Empty valid filters can still select the archive: read warnings and filters_applied before accepting the result.
Raw lines 223 to 229
230## Resources
232- **IDC Portal** — https://portal.imaging.datacommons.cancer.gov/
233- **IDC data licensing documentation** — https://learn.canceridc.dev/data/licensing
234- **`references/rest_api_guide.md`** — `/v3/licenses` and `/v3/citations` endpoint reference
235- **`references/mcp_guide.md`** — `get_licenses` and `get_citations` tool inventory
236- **`references/cloud_storage_guide.md`** — bucket separation for commercially restricted data

Resources

  • IDC Portal — https://portal.imaging.datacommons.cancer.gov/
  • IDC data licensing documentation — https://learn.canceridc.dev/data/licensing
  • **references/rest_api_guide.md** — /v3/licenses and /v3/citations endpoint reference
  • **references/mcp_guide.md** — get_licenses and get_citations tool inventory
  • **references/cloud_storage_guide.md** — bucket separation for commercially restricted data
Raw lines 230 to 236