Skip to content
This repository was archived by the owner on May 20, 2026. It is now read-only.

Domain Models

Wookjin Choi edited this page May 19, 2026 · 1 revision

title: "Domain Models and Utilities" version: "1.0" last_updated: "2026-05-18" status: "active"

Domain Models and Utilities

Context: Codebase-Context

1. Nodule Tracking (utils/nodule_info.py)

The Nodules class manages the core state of annotated pulmonary nodules across the pipeline.

  • Deduplication (find_same_nodules): Uses scipy.spatial.distance.pdist to calculate the Euclidean distance between nodule centroids. Nodules within a specific distance threshold (based on bounding box size) are grouped together as identical physical entities (nnid, phys).
  • Consolidation (combine_same_nodules): Merges multiple physician annotations (e.g., from LIDC-IDRI) into a single canonical nodule record. It averages continuous metadata (e.g., volume, bounding box) and applies voting/mode selection for categorical clinical features (Subtlety, Malignancy, Spiculation).

2. Lung-RADS Estimation (utils/LungRADS.py)

Provides programmatic estimation of the Lung-RADS category (e.g., 2, 3, 4A, 4B) based on nodule characteristics (solid, part-solid, non-solid) and maximum diameter.

3. Metadata Management (utils/metadata.py)

The metadata class handles the parsing and querying of clinical datasets (LIDC, LUNGx), acting as an interface between the raw CSV files (metadata/LIDC.csv) and the processing scripts.

Clone this wiki locally