

Using the two examples to convert the data to dsp format.Ĭonvert it to a bw file (one pixel is one unsigned char):Ĭonvert it to the format required for a dsp file (nu16):Ĭonvert it to a pix file (one pixel is defined by three unsigned chars):Ĭonvert it to the format required for a dsp file: If you use the cv command, the output format is "nus" for network unsigned shorts. BRL-CAD has a couple of dozen tools that you can use for converting existing data into that raw format, such as the 'cv' command or the 'bw-d' and 'd-u' commands among other similar tool chains. The data format for the DSP primitive is network-ordered unsigned short integers (nu16). The DSP can then be transformed to other orientations and positions. See the 'dsp_add' tool for combining two existing DSP data files into one.Ī DSP primitive is an array of cells initially defined by points in the X-Y plane as positive heights from Z = 0. For the DSP, the main parameters are: the source of the height data, the width (number of points in the X direction) and length (number of points in the Y direction) of the input data, width/length/height scaling factors, and whether to smoothly interpolate between cells (0 = do not interpolate, 1 = interpolate). If you type the 'in' command, it will prompt you for each parameter individually and that should help some. If the data were in png image format, for example (which is basically 3-channel 8-bit integer data), the data could be prepared with a combination of 'png-pix', 'pix-bw', and 'cv'.

Our various command-line data converters can help bring data in from pretty much any existing format, including image data, via various processing commands. The DSP takes unsigned short (16-bit) integer data. A black and white (gray scale) image (png format):Įx1.png: PNG image, 142 x 150, 8-bit gray+alpha, non-interlacedĮx2.png: PNG image, 152 x 150, 8-bit/color RGBA, non-interlaced We will use two examples to illustrate the next few sections.ġ.
#Brl cad program size manual#
