imgnet CLI#
imgnet#
IMGNET CLI - toolkit for facilitating access to standardized medical imaging datasets for cancer research and clinical AI applications.
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--quiet, -q |
boolean | Suppress all logging except errors, overrides verbosity options. | False |
--verbose, -v |
integer range (0 and above) |
Increase verbosity of logging, overrides environment variable. (0-3: ERROR, WARNING, INFO, DEBUG). | 0 |
--version |
boolean | Show the version and exit. | False |
-h, --help |
boolean | Show this message and exit. | False |
Subcommands
- collections: Inspect indexed collections.
- download: Download instances from a manifest file or a query token.
- query: Query indexed datasets and save selected series for downstream use.
- update-index: Update the indexed datasets: download from Hugging Face.
collections#
Inspect indexed collections.
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help, -h |
boolean | Show this message and exit. | False |
Subcommands
- info: Show basic metadata for a collection; use --tags for queryable columns.
- overview: Show a comprehensive visual overview of the full index.
- summary: Display the collections summary.
info#
Show basic metadata for a collection; use --tags for queryable columns.
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help, -h |
boolean | Show this message and exit. | False |
--tags, -t |
boolean | Include supported query tags per modality (for building rules). | False |
--json |
boolean | Print metadata as JSON instead of a table. | False |
overview#
Show a comprehensive visual overview of the full index.
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help, -h |
boolean | Show this message and exit. | False |
--update, -u |
boolean | Rebuild the collections summary before generating the overview. | False |
summary#
Display the collections summary.
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help, -h |
boolean | Show this message and exit. | False |
--update, -u |
boolean | Update the collections summary. | False |
download#
Download instances from a manifest file or a query token.
MANIFEST_OR_TOKEN: Path to a manifest CSV, or a query token from imgnet query.
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--output-dir, -o |
directory | Path to the output directory. | None |
--process, -p |
boolean | Process all dicom files in the output directory using imgtools. | False |
--delete-srcdata |
boolean | Delete the source data after processing. | False |
--help |
boolean | Show this message and exit. | False |
query#
Query indexed datasets and save selected series for downstream use.
Saves query_results.csv, valid_query.json, and valid_query_schema.json
to the output directory. Pipe the output into imgnet download to
retrieve the matched series.
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--output-dir, -o |
directory | Path to the output directory. | None |
--input-path, -i |
file | Path to a valid query json. | None |
--collections, -c |
text | List of collections to query, or 'all' to query every collection (example: -c collection1 collection2) |
['all'] |
--modalities, -m |
text | List of modality queries (example: -m CT,RTSTRUCT CT,SEG) |
['all'] |
--file_type, -ft |
choice (all | dicom | nifti) |
Restrict query to a specific file type (e.g. 'dicom', 'nifti'). Use 'all' (default) for no restriction. | None |
--rules, -r |
text | JSON string of filter rules. | None |
--help |
boolean | Show this message and exit. | False |
update-index#
Update the indexed datasets: download from Hugging Face.
Examples:
imgnet update-index --path /custom/indexed_datasets
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--path, -p |
path | Path to the indexed_datasets directory. Defaults to $IMGNET_INDEX_DIR/indexed_datasets or platform user data dir. | None |
--help |
boolean | Show this message and exit. | False |