====== Raw binary data file ====== The //raw binary data file// (.RAW) is an unstandardised - but usually simple - file format that is used to exchange data between programs. RAW files usually contain no header, which makes them unsuitable as a general purpose format, and this L3DT supports RAW for import and export only (though [[l3dt:algorithms:mosaics|mosaic maps]] are supported). Because RAW is not a well-defined format, there are many options available for this format. These options are accessible via the [[l3dt:userguide:io:preferences|file preferences]] window ('//File->Format preferences//' in menu), or by the [[l3dt:userguide:io:import:hf#importing_from_images|import]] and [[l3dt:userguide:io:export:active|export]] wizards. These options are shown in the window below and explained afterwards. {{ l3dt:formats:specs:raw:rawoptions.png }} ===== Mode ===== One of the wonderful things about RAW files is that everyone uses a different data format, depending on what is convenient at the time. L3DT supports eight data formats for RAW:
^ Mode ^ Value range ^ Comments ^ | 8-bit unsigned (full range) | 0->255 | Always spans full range. | | 16-bit unsigned (full range) | 0->65535 | Always spans full range. | | 16-bit unsigned (metres) | 0->65535 | Clipped to metres; does not use full range. | | 16-bit unsigned (manual scale) | 0->65535 | Clipped to manual scale steps; does not use full range. | | 16-bit signed (full range) | -32768->32767 | Scaled such that highest above sea-level is 32767 OR lowest below sea-level is -32768. | | 16-bit signed (metres) | -32768->32767 | Clipped to metres; does not use full range. | | 16-bit signed (manual scale) | -32768->32767 | Clipped to manual scale steps; does not use full range. | | 32-bit floating point (metres) | ±3.4028235×1038 | Clipped to metres; does not use full range. |
===== InvertY ===== The //InvertY// option automatically flips the //y//-axis on import/export. This is useful as L3DT uses a right-handed coordinate system in which the //y//-axis increases 'up the screen', whereas many programs use a left-handed system where the //y//-axis increases 'down the screen'. ===== Import ===== ==== HeaderSize ==== Numerous programs pack extra data into a custom header section of a raw file (such as width, hight and bits/pixel). The //HeaderSize// is the number of bytes in that header, which you must provide to L3DT so that it can skip-over the custom section and read the data correctly. ==== Width and Height ==== The //Width// and //Height// values are the number of pixels in the //x//- and //y//-axes, respectively. RAW files do not store this data, so you have to input it __manually__. ===== Export ===== ==== AppendSizeToFilename ==== L3DT can optionally append the width and height of the RAW file to the filename, which may make it easier to load in other applications. With //AppendSizeToFilename// enabled, for example, a 1024x2048 pixel RAW file that you saved as 'temp.raw' would actually be saved by L3DT as 'temp_1024x2048.raw'. This option is off by default.