# murgildu/research_blender_medvisor architecture

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

- Interactive diagram: https://gitdiagram.com/murgildu/research_blender_medvisor
- Repository: https://github.com/murgildu/research_blender_medvisor

## Overview

MedVision coordinates MRI analysis in two modes: Blender’s headed workflow extracts and segments a scan, then presents a 3D brain with synchronized orthogonal views; the CLI processes scans singly or in batches and supports cross-sectional and longitudinal metrics. Both use HD-BET and FSL FAST, while the CLI adds optional SIENAX and SIENA analysis and report outputs. Source excerpts show the Blender processing-to-viewer handoff and parts of CLI orchestration; README statements support documented capabilities whose wiring was not visible in the excerpts.

Main entry points: [`headless.py`](https://github.com/murgildu/research_blender_medvisor/blob/main/headless.py) (Cross-sectional analysis), [`procesar_dicom.py`](https://github.com/murgildu/research_blender_medvisor/blob/main/procesar_dicom.py) (Background extraction), [`paneles_ui.py`](https://github.com/murgildu/research_blender_medvisor/blob/main/paneles_ui.py) (Control panel), [`visor_slicer.py`](https://github.com/murgildu/research_blender_medvisor/blob/main/visor_slicer.py) (Slice viewer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["Headless analysis"]
  node_cli_entry["CLI orchestrator<br/>[headless.py]"]
  node_t1_filter["T1 selection<br/>[headless.py]"]
  node_cross_section["Cross-sectional analysis<br/>[headless.py]"]
  node_longitudinal["Longitudinal analysis<br/>[headless.py]"]
end

subgraph group_blender["Blender workflow"]
  node_ui["Control panel<br/>[paneles_ui.py]"]
  node_headed_processing["Background extraction<br/>[procesar_dicom.py]"]
  node_mesh["3D brain mesh<br/>[procesar_dicom.py]"]
  node_viewer["Slice viewer<br/>[visor_slicer.py]"]
  node_workspace["Quad-view workspace<br/>[__init__.py]"]
end

subgraph group_processing["MRI processing"]
  node_hdbet["HD-BET extraction<br/>[headless.py]"]
  node_fast["FSL FAST tissues<br/>[headless.py]"]
  node_sienax["SIENAX volumes<br/>[headless.py]"]
  node_siena["SIENA atrophy<br/>[headless.py]"]
end

subgraph group_outputs["Analysis outputs"]
  node_report_outputs["JSON and HTML reports<br/>[headless.py]"]
end

node_cli_user(("CLI user"))
node_fsl_external{{"FSL via WSL"}}
node_hdbet_external{{"HD-BET executable"}}
node_blender_user(("Blender clinician"))

node_cli_user -->|"runs"| node_cli_entry
node_cli_entry -->|"dispatches"| node_cross_section
node_cli_entry -->|"dispatches"| node_longitudinal
node_cross_section -->|"filters scans"| node_t1_filter
node_cross_section -->|"invokes"| node_hdbet
node_cross_section -->|"invokes"| node_fast
node_cross_section -->|"optionally invokes"| node_sienax
node_longitudinal -->|"invokes"| node_siena
node_hdbet -->|"runs"| node_hdbet_external
node_fast -->|"runs via WSL"| node_fsl_external
node_sienax -->|"runs via WSL"| node_fsl_external
node_siena -->|"runs via WSL"| node_fsl_external
node_cli_entry -->|"produces"| node_report_outputs
node_blender_user -->|"selects scan"| node_ui
node_ui -->|"starts extraction"| node_headed_processing
node_headed_processing -->|"runs"| node_hdbet_external
node_headed_processing -->|"runs FAST via WSL"| node_fsl_external
node_headed_processing -->|"passes volumes"| node_viewer
node_headed_processing -->|"creates"| node_mesh
node_workspace -->|"configures views"| node_ui
node_viewer -.->|"draws in"| node_workspace
node_ui -->|"controls navigation"| node_viewer

click node_cli_entry "https://github.com/murgildu/research_blender_medvisor/blob/main/headless.py"
click node_t1_filter "https://github.com/murgildu/research_blender_medvisor/blob/main/headless.py"
click node_cross_section "https://github.com/murgildu/research_blender_medvisor/blob/main/headless.py"
click node_longitudinal "https://github.com/murgildu/research_blender_medvisor/blob/main/headless.py"
click node_hdbet "https://github.com/murgildu/research_blender_medvisor/blob/main/headless.py"
click node_fast "https://github.com/murgildu/research_blender_medvisor/blob/main/headless.py"
click node_sienax "https://github.com/murgildu/research_blender_medvisor/blob/main/headless.py"
click node_siena "https://github.com/murgildu/research_blender_medvisor/blob/main/headless.py"
click node_report_outputs "https://github.com/murgildu/research_blender_medvisor/blob/main/headless.py"
click node_ui "https://github.com/murgildu/research_blender_medvisor/blob/main/paneles_ui.py"
click node_headed_processing "https://github.com/murgildu/research_blender_medvisor/blob/main/procesar_dicom.py"
click node_mesh "https://github.com/murgildu/research_blender_medvisor/blob/main/procesar_dicom.py"
click node_viewer "https://github.com/murgildu/research_blender_medvisor/blob/main/visor_slicer.py"
click node_workspace "https://github.com/murgildu/research_blender_medvisor/blob/main/__init__.py"

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_cli_entry,node_t1_filter,node_cross_section,node_longitudinal,node_cli_user toneBlue
class node_ui,node_headed_processing,node_mesh,node_viewer,node_workspace toneAmber
class node_hdbet,node_fast,node_sienax,node_siena toneMint
class node_report_outputs toneRose
class node_fsl_external,node_hdbet_external,node_blender_user toneIndigo
```

## Components

### Headless analysis

- [CLI orchestrator](https://github.com/murgildu/research_blender_medvisor/blob/main/headless.py): `headless.py`
- [T1 selection](https://github.com/murgildu/research_blender_medvisor/blob/main/headless.py): `headless.py`
- [Cross-sectional analysis](https://github.com/murgildu/research_blender_medvisor/blob/main/headless.py): `headless.py`
- [Longitudinal analysis](https://github.com/murgildu/research_blender_medvisor/blob/main/headless.py): `headless.py`

### Blender workflow

- [Control panel](https://github.com/murgildu/research_blender_medvisor/blob/main/paneles_ui.py): `paneles_ui.py`
- [Background extraction](https://github.com/murgildu/research_blender_medvisor/blob/main/procesar_dicom.py): `procesar_dicom.py`
- [3D brain mesh](https://github.com/murgildu/research_blender_medvisor/blob/main/procesar_dicom.py): `procesar_dicom.py`
- [Slice viewer](https://github.com/murgildu/research_blender_medvisor/blob/main/visor_slicer.py): `visor_slicer.py`
- [Quad-view workspace](https://github.com/murgildu/research_blender_medvisor/blob/main/__init__.py): `__init__.py`

### MRI processing

- [HD-BET extraction](https://github.com/murgildu/research_blender_medvisor/blob/main/headless.py): `headless.py`
- [FSL FAST tissues](https://github.com/murgildu/research_blender_medvisor/blob/main/headless.py): `headless.py`
- [SIENAX volumes](https://github.com/murgildu/research_blender_medvisor/blob/main/headless.py): `headless.py`
- [SIENA atrophy](https://github.com/murgildu/research_blender_medvisor/blob/main/headless.py): `headless.py`

### Analysis outputs

- [JSON and HTML reports](https://github.com/murgildu/research_blender_medvisor/blob/main/headless.py): `headless.py`

### Other components

- **CLI user**
- **FSL via WSL**
- **HD-BET executable**
- **Blender clinician**

## Connections

- CLI user → CLI orchestrator: runs
- CLI orchestrator → Cross-sectional analysis: dispatches (evidence: `headless.py`)
- CLI orchestrator → Longitudinal analysis: dispatches (evidence: `headless.py`)
- Cross-sectional analysis → T1 selection: filters scans (evidence: `headless.py`)
- Cross-sectional analysis → HD-BET extraction: invokes (evidence: `headless.py`)
- Cross-sectional analysis → FSL FAST tissues: invokes (evidence: `headless.py`)
- Cross-sectional analysis → SIENAX volumes: optionally invokes (evidence: `headless.py`)
- Longitudinal analysis → SIENA atrophy: invokes (evidence: `headless.py`)
- HD-BET extraction → HD-BET executable: runs (evidence: `headless.py`)
- FSL FAST tissues → FSL via WSL: runs via WSL
- SIENAX volumes → FSL via WSL: runs via WSL
- SIENA atrophy → FSL via WSL: runs via WSL
- CLI orchestrator → JSON and HTML reports: produces (evidence: `headless.py`)
- Blender clinician → Control panel: selects scan
- Control panel → Background extraction: starts extraction
- Background extraction → HD-BET executable: runs (evidence: `procesar_dicom.py`)
- Background extraction → FSL via WSL: runs FAST via WSL (evidence: `procesar_dicom.py`)
- Background extraction → Slice viewer: passes volumes (evidence: `procesar_dicom.py`)
- Background extraction → 3D brain mesh: creates (evidence: `procesar_dicom.py`)
- Quad-view workspace → Control panel: configures views (evidence: `__init__.py`)
- Slice viewer → Quad-view workspace: draws in
- Control panel → Slice viewer: controls navigation (evidence: `paneles_ui.py`)
