# rumethsandinu/neobreath architecture

> Architecture diagram of the GitHub repository rumethsandinu/neobreath, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rumethsandinu/neobreath
- Repository: https://github.com/rumethsandinu/neobreath

## Overview

This research repository explores rare lung cancer subtype classification from anatomical CT and functional PET imaging. The documented workflow prepares and preprocesses DICOM data into 2.5D NumPy volumes, synthesizes additional PET samples, trains modality-specific and late-fusion classifiers, and evaluates results. The preprocessing entry points and reusable conversion, intensity, volume, and logging modules are visible in source excerpts. Generative and classification capabilities are documented in the README and represented by their existing experiment directories; their notebook-level wiring was not sampled.

Main entry points: [`experiment/ct_preprocessing.py`](https://github.com/rumethsandinu/neobreath/blob/main/experiment/ct_preprocessing.py) (CT preprocessing), [`experiment/pet_preprocessing.py`](https://github.com/rumethsandinu/neobreath/blob/main/experiment/pet_preprocessing.py) (PET preprocessing), [`experiment/classification/PET`](https://github.com/rumethsandinu/neobreath/tree/main/experiment/classification/PET) (PET classifiers), [`experiment/classification/Fusion`](https://github.com/rumethsandinu/neobreath/tree/main/experiment/classification/Fusion) (Late fusion)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Data preparation"]
  node_dataset[("Lung PET-CT data")]
  node_data_pipeline["Dataset pipelines"]
end

subgraph group_prep["Image preprocessing"]
  node_ct_entry["CT preprocessing"]
  node_pet_entry["PET preprocessing"]
  node_dicom["DICOM conversion<br/>[dicom_converter.py]"]
  node_intensity["Intensity processing"]
  node_volume["Volume trimming"]
  node_logger["Preprocessing logger<br/>[logger.py]"]
  node_volumes[("Preprocessed volumes")]
end

subgraph group_gen["PET generation"]
  node_pet_gen["PET generative models"]
  node_synthetic_pet[("Generated PET samples")]
end

subgraph group_classify["Classification and evaluation"]
  node_ct_models["CT classifiers"]
  node_pet_models["PET classifiers"]
  node_fusion["Late fusion"]
  node_analysis["Evaluation and insights"]
end

node_researcher(("Researcher"))

node_researcher -->|"inspects data"| node_data_pipeline
node_data_pipeline -->|"prepares"| node_dataset
node_dataset -->|"provides DICOM"| node_ct_entry
node_dataset -->|"provides DICOM"| node_pet_entry
node_ct_entry -->|"loads slices"| node_dicom
node_ct_entry -->|"converts intensities"| node_intensity
node_ct_entry -->|"trims volume"| node_volume
node_ct_entry -->|"saves CT volumes"| node_volumes
node_ct_entry -->|"configures logging"| node_logger
node_pet_entry -->|"loads slices"| node_dicom
node_pet_entry -->|"converts intensities"| node_intensity
node_pet_entry -->|"trims volume"| node_volume
node_pet_entry -->|"saves PET volumes"| node_volumes
node_pet_entry -->|"configures logging"| node_logger
node_volumes -.->|"trains generation"| node_pet_gen
node_pet_gen -.->|"synthesizes samples"| node_synthetic_pet
node_volumes -.->|"trains classifiers"| node_ct_models
node_volumes -.->|"trains classifiers"| node_pet_models
node_synthetic_pet -.->|"augments training"| node_pet_models
node_ct_models -.->|"combines predictions"| node_fusion
node_pet_models -.->|"combines predictions"| node_fusion
node_fusion -.->|"reports results"| node_analysis
node_researcher -.->|"reviews results"| node_analysis

click node_data_pipeline "https://github.com/rumethsandinu/neobreath/tree/main/data/Pipelines"
click node_ct_entry "https://github.com/rumethsandinu/neobreath/blob/main/experiment/ct_preprocessing.py"
click node_pet_entry "https://github.com/rumethsandinu/neobreath/blob/main/experiment/pet_preprocessing.py"
click node_dicom "https://github.com/rumethsandinu/neobreath/blob/main/experiment/preprocessing/dicom_converter.py"
click node_intensity "https://github.com/rumethsandinu/neobreath/blob/main/experiment/preprocessing/intensity_processing.py"
click node_volume "https://github.com/rumethsandinu/neobreath/blob/main/experiment/preprocessing/volume_processing.py"
click node_logger "https://github.com/rumethsandinu/neobreath/blob/main/experiment/utils/logger.py"
click node_pet_gen "https://github.com/rumethsandinu/neobreath/tree/main/experiment/generative-augmentation"
click node_ct_models "https://github.com/rumethsandinu/neobreath/tree/main/experiment/classification/CT"
click node_pet_models "https://github.com/rumethsandinu/neobreath/tree/main/experiment/classification/PET"
click node_fusion "https://github.com/rumethsandinu/neobreath/tree/main/experiment/classification/Fusion"
click node_analysis "https://github.com/rumethsandinu/neobreath/tree/main/experiment/classification"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_dataset,node_data_pipeline toneBlue
class node_ct_entry,node_pet_entry,node_dicom,node_intensity,node_volume,node_logger,node_volumes toneAmber
class node_pet_gen,node_synthetic_pet toneMint
class node_ct_models,node_pet_models,node_fusion,node_analysis toneRose
class node_researcher toneIndigo
```

## Components

### Data preparation

- **Lung PET-CT data**
- [Dataset pipelines](https://github.com/rumethsandinu/neobreath/tree/main/data/Pipelines): `data/Pipelines`

### Image preprocessing

- [CT preprocessing](https://github.com/rumethsandinu/neobreath/blob/main/experiment/ct_preprocessing.py): `experiment/ct_preprocessing.py`
- [PET preprocessing](https://github.com/rumethsandinu/neobreath/blob/main/experiment/pet_preprocessing.py): `experiment/pet_preprocessing.py`
- [DICOM conversion](https://github.com/rumethsandinu/neobreath/blob/main/experiment/preprocessing/dicom_converter.py): `experiment/preprocessing/dicom_converter.py`
- [Intensity processing](https://github.com/rumethsandinu/neobreath/blob/main/experiment/preprocessing/intensity_processing.py): `experiment/preprocessing/intensity_processing.py`
- [Volume trimming](https://github.com/rumethsandinu/neobreath/blob/main/experiment/preprocessing/volume_processing.py): `experiment/preprocessing/volume_processing.py`
- [Preprocessing logger](https://github.com/rumethsandinu/neobreath/blob/main/experiment/utils/logger.py): `experiment/utils/logger.py`
- **Preprocessed volumes**

### PET generation

- [PET generative models](https://github.com/rumethsandinu/neobreath/tree/main/experiment/generative-augmentation): `experiment/generative-augmentation`
- **Generated PET samples**

### Classification and evaluation

- [CT classifiers](https://github.com/rumethsandinu/neobreath/tree/main/experiment/classification/CT): `experiment/classification/CT`
- [PET classifiers](https://github.com/rumethsandinu/neobreath/tree/main/experiment/classification/PET): `experiment/classification/PET`
- [Late fusion](https://github.com/rumethsandinu/neobreath/tree/main/experiment/classification/Fusion): `experiment/classification/Fusion`
- [Evaluation and insights](https://github.com/rumethsandinu/neobreath/tree/main/experiment/classification): `experiment/classification`

### Other components

- **Researcher**

## Connections

- Researcher → Dataset pipelines: inspects data (evidence: `README.md`)
- Dataset pipelines → Lung PET-CT data: prepares (evidence: `README.md`)
- Lung PET-CT data → CT preprocessing: provides DICOM (evidence: `README.md`)
- Lung PET-CT data → PET preprocessing: provides DICOM (evidence: `README.md`)
- CT preprocessing → DICOM conversion: loads slices (evidence: `experiment/ct_preprocessing.py`)
- CT preprocessing → Intensity processing: converts intensities (evidence: `experiment/ct_preprocessing.py`)
- CT preprocessing → Volume trimming: trims volume (evidence: `experiment/ct_preprocessing.py`)
- CT preprocessing → Preprocessed volumes: saves CT volumes (evidence: `experiment/ct_preprocessing.py`)
- CT preprocessing → Preprocessing logger: configures logging (evidence: `experiment/ct_preprocessing.py`)
- PET preprocessing → DICOM conversion: loads slices (evidence: `experiment/pet_preprocessing.py`)
- PET preprocessing → Intensity processing: converts intensities (evidence: `experiment/pet_preprocessing.py`)
- PET preprocessing → Volume trimming: trims volume (evidence: `experiment/pet_preprocessing.py`)
- PET preprocessing → Preprocessed volumes: saves PET volumes (evidence: `experiment/pet_preprocessing.py`)
- PET preprocessing → Preprocessing logger: configures logging (evidence: `experiment/pet_preprocessing.py`)
- Preprocessed volumes → PET generative models: trains generation (evidence: `README.md`)
- PET generative models → Generated PET samples: synthesizes samples (evidence: `README.md`)
- Preprocessed volumes → CT classifiers: trains classifiers (evidence: `README.md`)
- Preprocessed volumes → PET classifiers: trains classifiers (evidence: `README.md`)
- Generated PET samples → PET classifiers: augments training (evidence: `README.md`)
- CT classifiers → Late fusion: combines predictions (evidence: `README.md`)
- PET classifiers → Late fusion: combines predictions (evidence: `README.md`)
- Late fusion → Evaluation and insights: reports results (evidence: `README.md`)
- Researcher → Evaluation and insights: reviews results (evidence: `README.md`)
