dattoimg converts one or more datasets, datfile, in DAT format, to an image, imgfile. Each one-dimensional vector in each datfile is assembled into a two-dimensional tile and then placed in imgfile. The tiles are read sequentially from datfile and placed into imgfile in raster-scan order. The options -tw and -th are used to specify that rectangular tiles of dimension tilewidth x tileheight are written to imgfile from vectors of the same size from datfile. In the absence of -tw and -th, square tiles of sqrt(v) x sqrt(v) are written to imgfile, where v is the vector dimension of the vectors in datfile (v must be a perfect square). Note: both -tw and -th must be specified for rectangular tiles, and, if specified, tilewidth * tileheight must be equal to v.
dattoimg determines the type of the output image by calling QccIMGImageDetermineType(3) . If the output image is determined to be grayscale, then exactly one datfile is expected to be specified to dattoimg. Otherwise, if the output image is determined to be a color image, then exactly three datfiles are expected to be specified to dattoimg, and the three datfiles give the Y, U, and V image components in that order.
imagewidth and imageheight give the size of imgfile and must be specified. If imagewidth or imageheight are not multiples of the requested tile size, additional rows and/or columns are appended to the bottom and/or right of the image as necessary to meet the requested size. These rows and/or columns are duplicates of the last full row or column available in the image.
dattoimg calls QccIMGDatasetToImageComponent(3) for each image component in the image.
Note: converting from DAT format to PGM or PPM image format implies converting floating-point values to integer-valued pixels. Floating-point values are consequently rounded down and clipped to the range 0-255; see QccIMGImageComponentClipPixel(3) .