TerminalConverterApp
The Swift converter reads DICOM directories, QVIS, NRRD/NHDR, and PVM files, exports BorgVR datasets, or creates reproducible synthetic volumes. Import and generation write the bricked BorgVR format.
TerminalConverterApp D <input-directory> <output.data> <description> <brick-size> <overlap>
TerminalConverterApp Q <input-file> <output.data> <description> <brick-size> <overlap>
TerminalConverterApp N <input-file> <output.data> <description> <brick-size> <overlap>
TerminalConverterApp P <input-file> <output.data> <description> <brick-size> <overlap>
Mode P reads PVM, PVM2, and PVM3, including the DDS v3d and DDS v3e compression wrappers. Relative PVM voxel spacing is preserved proportionally and normalized to a longest total extent of one meter.
Descriptions containing spaces must be quoted. brick-size and overlap are positive integers.
Exporting a flat volume
TerminalConverterApp E <input.data> <output.nrrd> <lod>
Export reconstructs the selected level of detail as an uncompressed inline NRRD file. LoD 0 contains the full resolution; higher values select the stored downsampled levels. Brick overlap and boundary padding are removed, and physical voxel spacing is adjusted for the selected level.
Synthetic datasets
TerminalConverterApp C <algorithm[,algorithm...]> <bytes-per-component> <components> \
<size-x> <size-y> <size-z> <output.data> <description> \
<brick-size> <overlap>
| ID | Generator | Execution |
|---|---|---|
L | Linear test data | CPU |
F | Single-precision Mandelbulb | Metal with automatic CPU fallback |
D | Double-precision Mandelbulb | CPU |
J | Quaternion sine Julia set | Metal with automatic CPU fallback |
B | Mandelbox | Metal with automatic CPU fallback |
G | Gyroid | Metal with automatic CPU fallback |
P | 3D Shepp-Logan phantom | Metal with automatic CPU fallback |
T | Frequency chirp with brick-boundary test | Metal with automatic CPU fallback |
U | Scalar full-range UInt32 test | CPU |
GPU generators operate slice by slice, allowing large volumes to be created without keeping the complete result in GPU memory. For multi-channel data, provide one comma-separated generator identifier per channel in channel order; one identifier is applied to every channel. Multi-channel data supports 8 or 16 bits per channel, while scalar data additionally supports 32 bits.
TerminalConverterApp C F,J 2 2 512 512 512 MandelbulbJulia.data \
"Mandelbulb and quaternion Julia set" 64 2
TerminalConverterApp --help shows complete syntax; --version prints the tool version.
TerminalServerApp
The Swift server publishes .data, .tf1d, .mesh, .marker, and .measurement files from one directory. By default, it refreshes the catalog every ten seconds.
TerminalServerApp --directory /path/to/datasets \
--port 12345 --web-port 8080
--directory, -d- Directory containing datasets, transfer functions, meshes, object files, and measurements; defaults to the home directory.
--port, -p- Native BorgVR protocol port.
--max-bricks, -m- Maximum number of bricks per GETBRICKS request.
--password- Optional password for native and WebGPU clients.
--scan-interval- Catalog refresh interval in seconds;
0disables rescanning. --web-port- Enables the embedded WebGPU server on this port.
--web-http- Uses local HTTP instead of HTTPS and binds only to
localhost. --web-certificate- PKCS#12 certificate as
.p12or.pfx; supply its password with--web-certificate-password. --log-file- Also appends log output to the specified file.
Synchronization
TerminalServerApp --directory /srv/borgvr \
--sync-server server-a.example 12345 300 secret \
--sync-server server-b.example 12345 300
--sync-server is repeatable. The interval must be at least ten seconds; the optional password is not echoed in runtime output. Datasets, transfer functions, marker files, and mesh assets are synchronized, incomplete dataset transfers resume, and alternate sources are tried after a stall.
BORGVRServerCPP
The C++17 server is the cross-platform alternative for macOS, Linux, and Windows. On macOS or Linux, make first builds a small bootstrap program that embeds the contents of web/ into the server using LZ4 compression.
cd BORGVRServerCPP
make
make CONFIG=debug
make run ARGS="--directory /path/to/datasets --port 12345 --max-bricks 64 --web-port 8080"
The C++ server uses the same option names as the Swift server, including --directory, --port, --max-bricks, --log-file, and repeatable --sync-server entries.
BORGVRServerCPP --directory /data/BorgVR --port 12345 --max-bricks 64 \
--sync-server 192.168.1.10 12345 300 secret
A Visual Studio solution is also included for Windows. The generated files src/GeneratedWebAssets.cpp and src/GeneratedWebAssets.h are build artifacts and are not tracked in the repository.
Output and automation
While either server is running, l0 selects developer/debug output, l1 normal information, l2 warnings, and l3 errors only. l lists the available datasets; i repeats the startup and configuration information.
Both Swift tools report their version with --version and return a non-zero exit status for invalid arguments. The converter logs dimensions, brick counts, compression statistics, value range, metadata, file size, and elapsed time, making it suitable for reproducible pipelines.

