A fast, modern DICOM image viewer built with Go and the Fyne toolkit.
Try it in the browser: https://jpfielding.github.io/goxel/ (loads a ~17 MB sample CT on first visit).
- Multi-format DICOM support - Load single files, directories, or multi-frame DICOM
- 3D Volume Rendering - Real-time volume visualization with adjustable opacity and thresholds
- 2D Slice Navigation - Browse through axial slices with window/level controls
- Medical Imaging Presets - Built-in window presets for Soft Tissue, Bone, Lung, Brain, and Liver
- Material Segmentation - Color-coded tissue classification (Background, Soft Tissue, Dense Tissue, Bone, Metal)
- JPEG-LS Compression - Native support for lossless DICOM compression
- Cross-platform - Runs on macOS, Linux, and Windows, and in the browser (WebAssembly + WebGL2)
- Responsive layout - Desktop panels, or phone portrait/landscape layouts with a tab bar and paged controls
go install github.com/jpfielding/goxel/cmd@latestOr build from source:
git clone https://github.com/jpfielding/goxel.git
cd goxel
make build-ctl # bin/goxel (needs cgo for OpenGL)make build-wasm # bin/web: goxel.wasm, wasm_exec.js, index.html, samples/
make serve-wasm # builds, then serves bin/web on http://127.0.0.1:8080build-wasm needs no cgo. The Pages workflow (.github/workflows/pages.yml)
publishes bin/web from main; set the repository's Pages source to
"GitHub Actions" once.
Known limits of the browser build:
- One file at a time from the file picker (with several selected, the largest is loaded); no folder open and no drag-and-drop.
- Volumes over 32 M voxels are halved on each axis for the 3D texture.
- About 40 MB of wasm (about 12 MB gzipped) before the sample loads.
- Without WebGL2 the 3D view falls back to the CPU renderer, which is slow in single-threaded wasm.
- Touch: one-finger drag and pinch are translated to mouse and wheel input; two-finger pan is not supported (use Pan on the Camera page).
- Finding boxes and the axis gizmo are drawn on desktop only.
# Open a DICOM file
goxel goxel -p /path/to/file.dcm
# Open a directory of DICOM slices
goxel goxel -p /path/to/dicom/directoryCombine multiple DICOM slice files into a single multi-frame DICOM with optional compression:
# Merge with JPEG-LS compression (default)
goxel merge -i /path/to/slices -o output.dcm
# Merge without compression
goxel merge -i /path/to/slices -o output.dcm -c=falsegoxel decode -u /path/to/file.dcm| Control | Action |
|---|---|
| Drag / Shift + drag / scroll | Orbit / pan / zoom the 3D view |
| View along X Y Z, Fit view | Camera presets |
| Focus volume / Focus slice | Enlarge one view; Esc exits |
| Slice plane, Cutaway | Outline the 2D slice in 3D, or cut the volume at it |
| 3D windowing | Center, Width, Opacity, Density |
| Palette | Materials / Threat / Grayscale, Quality, Material bands editor |
| Lighting | Depth cue, Ambient, Diffuse, Specular |
| Slice group, arrow keys | Plane, slice, Previous / Next |
| 2D windowing, Image | Center/Width, Zoom, Composite projection |
pkg/
├── dicom/ # DICOM parser and writer
│ ├── module/ # DICOM IOD modules (Patient, Study, Series, etc.)
│ ├── tag/ # DICOM tag definitions
│ └── transfer/ # Transfer syntax handling
├── compress/ # Image compression codecs
│ ├── jpegls/ # JPEG-LS lossless
│ ├── jpegli/ # JPEG lossless
│ ├── jpeg2k/ # JPEG 2000
│ └── rle/ # Run-length encoding
├── volume/ # 3D volume rendering
└── goxel/ # Fyne UI application
Inspired by the Fyne DICOM Viewer. Aided heavily by Claude.ai, esp in the opengl work.
MIT
