# agniveshsp/r-view-tool architecture

> Architecture diagram of the GitHub repository agniveshsp/r-view-tool, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/agniveshsp/r-view-tool
- Repository: https://github.com/agniveshsp/r-view-tool

## Overview

R-View Tool is a desktop batch image-annotation application. Users load an image set, navigate it as a queue, annotate individual images or a shared overlay canvas, then render and save selected results; filename sequences can also be displayed and imprinted. The sampled code supports the canvas, rendering, input, and file-handling boundaries shown below. Other README capabilities, including zoom and project persistence, are represented at their documented subsystem level because the relevant implementation was not fully sampled.

Main entry points: [`main.py`](https://github.com/agniveshsp/r-view-tool/blob/master/main.py) (App and workflow), [`graphics_manager.py`](https://github.com/agniveshsp/r-view-tool/blob/master/graphics_manager.py) (Image annotations), [`keybinds.py`](https://github.com/agniveshsp/r-view-tool/blob/master/keybinds.py) (Input bindings), [`image_processor.py`](https://github.com/agniveshsp/r-view-tool/blob/master/image_processor.py) (Render compositor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Application UI"]
  node_app["App and workflow<br/>[main.py]"]
  node_outliner["Image outliner<br/>[outliner.py]"]
  node_keybinds["Input bindings<br/>[keybinds.py]"]
end

subgraph group_annotation["Annotation"]
  node_tools["Tool controls<br/>[tools.py]"]
  node_base_gm["Image annotations"]
  node_overlay_gm["Shared overlay"]
  node_text["Text insertion<br/>[tools.py]"]
end

subgraph group_render["Batch rendering"]
  node_image_processing["Render compositor<br/>[image_processor.py]"]
end

subgraph group_files["Images and projects"]
  node_image_inputs["Image set<br/>[main.py]"]
  node_sequence["Sequence extraction<br/>[file_handler.py]"]
  node_file_handler["File operations<br/>[file_handler.py]"]
  node_project_state[("Project and settings<br/>[main.py]")]
end

node_user(("User"))
node_output["Rendered images"]

node_user -->|"operates"| node_app
node_app -->|"creates"| node_outliner
node_outliner -->|"selects image"| node_app
node_app -->|"binds input"| node_keybinds
node_keybinds -->|"navigates"| node_app
node_keybinds -->|"selects tool"| node_tools
node_keybinds -->|"dispatches gestures"| node_base_gm
node_tools -->|"configures drawing"| node_base_gm
node_tools -->|"opens text entry"| node_text
node_text -->|"submits text"| node_base_gm
node_app -->|"creates canvas manager"| node_base_gm
node_app -->|"creates overlay manager"| node_overlay_gm
node_app -->|"loads image set"| node_image_inputs
node_image_inputs -->|"extracts codes"| node_sequence
node_app -->|"loads and saves"| node_file_handler
node_file_handler -->|"persists project"| node_project_state
node_app -->|"renders queued images"| node_image_processing
node_image_processing -->|"reads drawings"| node_base_gm
node_image_processing -->|"reads overlay"| node_overlay_gm
node_image_processing -->|"writes rendered files"| node_output

click node_app "https://github.com/agniveshsp/r-view-tool/blob/master/main.py"
click node_outliner "https://github.com/agniveshsp/r-view-tool/blob/master/outliner.py"
click node_keybinds "https://github.com/agniveshsp/r-view-tool/blob/master/keybinds.py"
click node_tools "https://github.com/agniveshsp/r-view-tool/blob/master/tools.py"
click node_base_gm "https://github.com/agniveshsp/r-view-tool/blob/master/graphics_manager.py"
click node_overlay_gm "https://github.com/agniveshsp/r-view-tool/blob/master/graphics_manager.py"
click node_text "https://github.com/agniveshsp/r-view-tool/blob/master/tools.py"
click node_image_processing "https://github.com/agniveshsp/r-view-tool/blob/master/image_processor.py"
click node_image_inputs "https://github.com/agniveshsp/r-view-tool/blob/master/main.py"
click node_sequence "https://github.com/agniveshsp/r-view-tool/blob/master/file_handler.py"
click node_file_handler "https://github.com/agniveshsp/r-view-tool/blob/master/file_handler.py"
click node_project_state "https://github.com/agniveshsp/r-view-tool/blob/master/main.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_app,node_outliner,node_keybinds,node_user toneBlue
class node_tools,node_base_gm,node_overlay_gm,node_text toneAmber
class node_image_processing toneMint
class node_image_inputs,node_sequence,node_file_handler,node_project_state toneRose
class node_output toneIndigo
```

## Components

### Application UI

- [App and workflow](https://github.com/agniveshsp/r-view-tool/blob/master/main.py): `main.py`
- [Image outliner](https://github.com/agniveshsp/r-view-tool/blob/master/outliner.py): `outliner.py`
- [Input bindings](https://github.com/agniveshsp/r-view-tool/blob/master/keybinds.py): `keybinds.py`

### Annotation

- [Tool controls](https://github.com/agniveshsp/r-view-tool/blob/master/tools.py): `tools.py`
- [Image annotations](https://github.com/agniveshsp/r-view-tool/blob/master/graphics_manager.py): `graphics_manager.py`
- [Shared overlay](https://github.com/agniveshsp/r-view-tool/blob/master/graphics_manager.py): `graphics_manager.py`
- [Text insertion](https://github.com/agniveshsp/r-view-tool/blob/master/tools.py): `tools.py`

### Batch rendering

- [Render compositor](https://github.com/agniveshsp/r-view-tool/blob/master/image_processor.py): `image_processor.py`

### Images and projects

- [Image set](https://github.com/agniveshsp/r-view-tool/blob/master/main.py): `main.py`
- [Sequence extraction](https://github.com/agniveshsp/r-view-tool/blob/master/file_handler.py): `file_handler.py`
- [File operations](https://github.com/agniveshsp/r-view-tool/blob/master/file_handler.py): `file_handler.py`
- [Project and settings](https://github.com/agniveshsp/r-view-tool/blob/master/main.py): `main.py`

### Other components

- **User**
- **Rendered images**

## Connections

- User → App and workflow: operates
- App and workflow → Image outliner: creates
- Image outliner → App and workflow: selects image
- App and workflow → Input bindings: binds input
- Input bindings → App and workflow: navigates
- Input bindings → Tool controls: selects tool
- Input bindings → Image annotations: dispatches gestures
- Tool controls → Image annotations: configures drawing
- Tool controls → Text insertion: opens text entry
- Text insertion → Image annotations: submits text
- App and workflow → Image annotations: creates canvas manager
- App and workflow → Shared overlay: creates overlay manager
- App and workflow → Image set: loads image set
- Image set → Sequence extraction: extracts codes
- App and workflow → File operations: loads and saves
- File operations → Project and settings: persists project
- App and workflow → Render compositor: renders queued images
- Render compositor → Image annotations: reads drawings
- Render compositor → Shared overlay: reads overlay
- Render compositor → Rendered images: writes rendered files
