tgLang

A Domain-Specific Language for Geometry Processing and Computational Imaging Workflows

Journal Article (2026)
Author(s)

Vijai K. Suriyababu (TU Delft - Electrical Engineering, Mathematics and Computer Science)

Cornelis Vuik (TU Delft - Electrical Engineering, Mathematics and Computer Science)

Matthias Möller (TU Delft - Electrical Engineering, Mathematics and Computer Science)

Research Group
Numerical Analysis
DOI related publication
https://doi.org/10.3390/jimaging12090406 Final published version
More Info
expand_more
Publication Year
2026
Language
English
Research Group
Numerical Analysis
Journal title
Journal of Imaging
Issue number
9
Volume number
12
Article number
406
Page Views
39
Reuse Rights

Other than for strictly personal use, it is not permitted to download, forward or distribute the text or part of it, without the consent of the author(s) and/or copyright holder(s), unless the work is under an open content license such as Creative Commons.

Abstract

Geometry-processing and computational-imaging workflows combine heterogeneous data structures, topology-changing edits, dense numerical fields, visualization, and repeated experimental variation. These workflows are often clear as algorithms but obscured in software by traversal boilerplate, representation conversions, build-system boundaries, and ad hoc scripting conventions. This paper presents tgLang, a domain-specific language with explicit, runtime-enforced representation types that makes meshes, point clouds, curve networks, grids, two-dimensional images, and image stacks first-class executable values. The language combines manifest types, typed arrays, modules, deterministic parallel constructs, flow-oriented queries, and runtime-provided domain operations. Its current implementation uses a stack-based bytecode virtual machine for reference semantics and dispatches representation-heavy operations to optimized C++ kernels. The evaluation is organized around complete workflows: topological hole detection, distance-field-based mean camber line extraction, voxel downsampling of point clouds, curve-network generation, surface-mesh smoothing and remeshing, image-stack edge detection, morphological image processing, and image-stack surface extraction. These examples show that a domain-aware source language can express multi-representation geometry and imaging algorithms as compact, reproducible programs while preserving explicit representation choices and a path toward deployable implementations.