gnome-nifti-preview

ADR 0002 — The terminal viewer: nitty, the same library, a terminal layer written by hand

Status: accepted · Date: 2026-10-27

Context

The preview needs GNOME. Medical images are just as often on a cluster, a server reached over SSH or in a container, where the only display is a terminal. Two projects show images in a terminal: niicat (Python, prints the views with the iTerm2, Kitty or Sixel protocol, chosen by an option; nothing appears in a terminal without that protocol, such as GNOME Terminal) and headjack (Rust, an interactive viewer in half blocks, ratatui and crossterm). Neither reads more than NIfTI, nor gets the orientation of an oblique or permuted image right, nor colours segmentations, nor browses 4D images.

The library already does everything a viewer needs and draws each slice as RGB8. What a terminal viewer adds is putting those pixels on a terminal and handling keys.

Decisions

Consequences