source files: xvol.[ch]
(XVOL-DUMP-VOXELS-TO-FILE :FILENAME <string:filename> :VOXELS <grl:voxels> [ :FORMAT :AVS-UNIFORM-FIELD ] [ :MIN-X <float> ] [ :MAX-X <float> ] [ :MIN-Y <float> ] [ :MAX-Y <float> ] [ :MIN-Z <float> ] [ :MAX-Z <float> ] )
This is a very quick-and-dirty fn to dump the binary contents of a voxel array to a binary file, originally created to facilitate data exchange with AVS.
By default, the resulting file has no header or trailer of any sort, and nothing is done about possible byte-ordering problems: It consist solely of (say) 256x256x256 16-bit entries.
:FORMAT :AVS-UNIFORM-FIELD is specified,
then an AVS-compatible file format is written. In
this case, the MIN and MAX values will normally
also be supplied, so as to inform AVS of the
size, location and orientation of the dataset in the
MRI machine coordinate system.