# naclzno/tor architecture

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

- Interactive diagram: https://gitdiagram.com/naclzno/tor
- Repository: https://github.com/naclzno/tor

## Overview

This repository implements a LiDAR point-cloud snow-denoising framework, with standalone TOR and EWM classification executables and a separate evaluation executable. The documented research workflow also includes ground removal and registration across three frames, but the provided tree and excerpts do not show implementations of those stages, so they are represented only as documented, unverified stages. The graph focuses on supported runtime behavior; relationships to the unsampled filter and method headers are limited to calls visible in the executable sources.

Main entry points: [`src/filters/ewm.cc`](https://github.com/naclzno/tor/blob/main/src/filters/ewm.cc) (EWM executable), [`src/filters/tor.cc`](https://github.com/naclzno/tor/blob/main/src/filters/tor.cc) (TOR executable), [`src/eva.cc`](https://github.com/naclzno/tor/blob/main/src/eva.cc) (Evaluation executable), [`include/methods/point.hh`](https://github.com/naclzno/tor/blob/main/include/methods/point.hh) (Point-cloud methods)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Denoising workflow"]
  node_ground["Ground filtering"]
  node_registration["Frame registration"]
  node_tor_exec["TOR executable<br/>[tor.cc]"]
  node_ewm_exec["EWM executable<br/>[ewm.cc]"]
  node_preprocessing["Preprocessing<br/>[preprocessing.hh]"]
  node_point_methods["Point-cloud methods<br/>[point.hh]"]
  node_timer["Runtime timer<br/>[timer.hh]"]
  node_classified["Classified clouds"]
  node_original_data["Original point clouds<br/>[H1.txt]"]
end

subgraph group_filters["Filtering methods"]
  node_tor_filter["TOR filter<br/>[tor.hh]"]
  node_tor_e["TOR metrics<br/>[tor-e.hh]"]
  node_dror_filter["DROR filter<br/>[dror-e.hh]"]
  node_ewm_scoring["EWM scoring<br/>[ewm.hh]"]
end

subgraph group_evaluation["Evaluation"]
  node_evaluation_input["Evaluation labels"]
  node_evaluation_exec["Evaluation executable<br/>[eva.cc]"]
  node_evaluation_methods["Evaluation metrics<br/>[eva.hh]"]
end

node_driver(("LiDAR input"))

node_driver -.->|"provides frames"| node_ground
node_ground -.->|"filters ground"| node_registration
node_registration -.->|"provides frames"| node_tor_exec
node_driver -->|"loads cloud"| node_tor_exec
node_driver -->|"loads cloud"| node_ewm_exec
node_tor_exec -->|"preprocesses"| node_preprocessing
node_ewm_exec -->|"preprocesses"| node_preprocessing
node_tor_exec -->|"converts points"| node_point_methods
node_ewm_exec -->|"converts points"| node_point_methods
node_tor_exec -->|"filters cloud"| node_tor_filter
node_ewm_exec -->|"computes metrics"| node_tor_filter
node_ewm_exec -->|"filters cloud"| node_dror_filter
node_ewm_exec -.->|"computes metrics"| node_tor_e
node_ewm_exec -->|"scores metrics"| node_ewm_scoring
node_tor_exec -->|"writes classes"| node_classified
node_ewm_exec -->|"writes classes"| node_classified
node_tor_exec -->|"measures runtime"| node_timer
node_ewm_exec -->|"measures runtime"| node_timer
node_evaluation_input -->|"supplies labels"| node_evaluation_exec
node_evaluation_exec -->|"loads and converts"| node_point_methods
node_evaluation_exec -->|"computes metrics"| node_evaluation_methods

click node_tor_exec "https://github.com/naclzno/tor/blob/main/src/filters/tor.cc"
click node_ewm_exec "https://github.com/naclzno/tor/blob/main/src/filters/ewm.cc"
click node_preprocessing "https://github.com/naclzno/tor/blob/main/include/methods/preprocessing.hh"
click node_tor_filter "https://github.com/naclzno/tor/blob/main/include/filters/tor.hh"
click node_tor_e "https://github.com/naclzno/tor/blob/main/include/filters/tor-e.hh"
click node_dror_filter "https://github.com/naclzno/tor/blob/main/include/filters/dror-e.hh"
click node_ewm_scoring "https://github.com/naclzno/tor/blob/main/include/methods/ewm.hh"
click node_point_methods "https://github.com/naclzno/tor/blob/main/include/methods/point.hh"
click node_timer "https://github.com/naclzno/tor/blob/main/include/methods/timer.hh"
click node_original_data "https://github.com/naclzno/tor/blob/main/data/snow/og/H1.txt"
click node_evaluation_exec "https://github.com/naclzno/tor/blob/main/src/eva.cc"
click node_evaluation_methods "https://github.com/naclzno/tor/blob/main/include/methods/eva.hh"

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_ground,node_registration,node_tor_exec,node_ewm_exec,node_preprocessing,node_point_methods,node_timer,node_classified,node_original_data toneBlue
class node_tor_filter,node_tor_e,node_dror_filter,node_ewm_scoring toneAmber
class node_evaluation_input,node_evaluation_exec,node_evaluation_methods toneMint
class node_driver toneIndigo
```

## Components

### Denoising workflow

- **Ground filtering**
- **Frame registration**
- [TOR executable](https://github.com/naclzno/tor/blob/main/src/filters/tor.cc): `src/filters/tor.cc`
- [EWM executable](https://github.com/naclzno/tor/blob/main/src/filters/ewm.cc): `src/filters/ewm.cc`
- [Preprocessing](https://github.com/naclzno/tor/blob/main/include/methods/preprocessing.hh): `include/methods/preprocessing.hh`
- [Point-cloud methods](https://github.com/naclzno/tor/blob/main/include/methods/point.hh): `include/methods/point.hh`
- [Runtime timer](https://github.com/naclzno/tor/blob/main/include/methods/timer.hh): `include/methods/timer.hh`
- **Classified clouds**
- [Original point clouds](https://github.com/naclzno/tor/blob/main/data/snow/og/H1.txt): `data/snow/og/H1.txt`

### Filtering methods

- [TOR filter](https://github.com/naclzno/tor/blob/main/include/filters/tor.hh): `include/filters/tor.hh`
- [TOR metrics](https://github.com/naclzno/tor/blob/main/include/filters/tor-e.hh): `include/filters/tor-e.hh`
- [DROR filter](https://github.com/naclzno/tor/blob/main/include/filters/dror-e.hh): `include/filters/dror-e.hh`
- [EWM scoring](https://github.com/naclzno/tor/blob/main/include/methods/ewm.hh): `include/methods/ewm.hh`

### Evaluation

- **Evaluation labels**
- [Evaluation executable](https://github.com/naclzno/tor/blob/main/src/eva.cc): `src/eva.cc`
- [Evaluation metrics](https://github.com/naclzno/tor/blob/main/include/methods/eva.hh): `include/methods/eva.hh`

### Other components

- **LiDAR input**

## Connections

- LiDAR input → Ground filtering: provides frames (evidence: `README.md`)
- Ground filtering → Frame registration: filters ground (evidence: `README.md`)
- Frame registration → TOR executable: provides frames (evidence: `README.md`)
- LiDAR input → TOR executable: loads cloud (evidence: `src/filters/tor.cc`)
- LiDAR input → EWM executable: loads cloud (evidence: `src/filters/ewm.cc`)
- TOR executable → Preprocessing: preprocesses (evidence: `src/filters/tor.cc`)
- EWM executable → Preprocessing: preprocesses (evidence: `src/filters/ewm.cc`)
- TOR executable → Point-cloud methods: converts points (evidence: `src/filters/tor.cc`)
- EWM executable → Point-cloud methods: converts points (evidence: `src/filters/ewm.cc`)
- TOR executable → TOR filter: filters cloud (evidence: `src/filters/tor.cc`)
- EWM executable → TOR filter: computes metrics (evidence: `src/filters/ewm.cc`)
- EWM executable → DROR filter: filters cloud (evidence: `src/filters/ewm.cc`)
- EWM executable → TOR metrics: computes metrics
- EWM executable → EWM scoring: scores metrics (evidence: `src/filters/ewm.cc`)
- TOR executable → Classified clouds: writes classes (evidence: `src/filters/tor.cc`)
- EWM executable → Classified clouds: writes classes (evidence: `src/filters/ewm.cc`)
- TOR executable → Runtime timer: measures runtime (evidence: `src/filters/tor.cc`)
- EWM executable → Runtime timer: measures runtime (evidence: `src/filters/ewm.cc`)
- Evaluation labels → Evaluation executable: supplies labels (evidence: `src/eva.cc`)
- Evaluation executable → Point-cloud methods: loads and converts (evidence: `src/eva.cc`)
- Evaluation executable → Evaluation metrics: computes metrics (evidence: `src/eva.cc`)
