Sample listing to read an LTF file in Pascal: {---------------------------------------------------------} Procedure read_header; Begin read_header; end; {---------------------------------------------------------} Procedure read_tags; Begin Repeat TagId = read_byte; TagLen = read_byte; if TagLen=255 then Taglen := read_longint; (DWord in Delphi) Case Tagid of TagColorTable :read_colortable; {1} TagHersteller :read_manufacturer; {2} TagImageName: :read_framename; {3} TagSetPPS :read_pps; {4} TagImage1 :read_tagimage1; {10} Else Tag_skip_unknown end; until Tagid=TagEnd; {0=End} {---------------------------------------------------------} Begin {Start} read_header; read_tags; end. {------------------------ End Pascal----------------------}
Type | Description - order |
---|---|
U8 | 8 Bit unsigned, 0..255 |
S8 | 8 Bit signed, -128..127 |
U16 | 16 Bit unsigned, 0..65535 (2 Bytes MSB/LSB) |
S16 | 16 Bit signed, -32768..32767 (2 Bytes MSB/LSB) |
U32 | 32 Bit unsigned (4 Bytes UpperMSB/UpperLSB/LowerMSB/LowerLSB) |
S32 | 32 Bit signed (4 Bytes UpperMSB/UpperLSB/LowerMSB/LowerLSB) |
STRING | ASCII-String in C-Format (zero terminated) |
ByteOffset | Len/Type | Description |
---|---|---|
0 | 3 - char | "L","T","F" - ASCII-"LTF" |
3 | U8 | Version number (aktualy 0) |
4 | U32 | Total_Tags: number of Tags in this file( only for info) |
8 | U32 | TagImage1count: number of TagImage1 in this file |
12 | U32 | reserved, must be zero ! |
ByteOffset | Len/Type | Description |
---|---|---|
0 | U8 | TagId: Type of Tag's (example, 0=EndTag) |
1 | U8 | TagSLen: Len in bytes of Tagdata(0..254),if = 255 then the following entry |
2 | U32 | TagLLen: Len in bytes of Tagdata. <-- only if TagSLen = 255 |
2/6 | ?? | TagData |
ByteOffset | Len/Type | Value - Description |
---|---|---|
0 | U8 | TagId = 0 |
1 | U8 | TagSLen = 0 |
ByteOffset | Len/Type | Value - Description |
---|---|---|
0 | U8 | TagId = 1 |
1 | U8 | TagSLen = 255 |
2 | U32 | TagLLen: Len of following data in bytes (2 + ColTabsize * 3). |
6 | U16 | ColTabsize: number of entries (1..65535) |
8.. | U8 | Red 0..255 |
9.. | U8 | Green 0..255 |
10.. | U8 | Blue 0..255 |
ByteOffset | Len/Type | Value - Description |
---|---|---|
0 | U8 | TagId = 2 |
1 | U8 | TagSLen: Len of following data in bytes(max.254) |
2 | STRING | Manufacturer |
ByteOffset | Len/Type | Value - Description |
---|---|---|
0 | U8 | TagId = 3 |
1 | U8 | TagSLen: Len of following data in bytes(max.254) |
2 | U16 | Frame_nr: Number of Image. |
4 | STRING | ImageName |
ByteOffset | Len/Type | Value - Description |
---|---|---|
0 | U8 | TagId = 4 |
1 | U8 | TagSLen = 4 |
2 | U32 | PPS: Points per Second |
ByteOffset | Len/Type | Value - Description |
---|---|---|
0 | U8 | TagId = 10 |
1 | U8 | TagSLen = 255 |
2 | U32 | TagLLen: Len of following data in bytes. |
6 | U16 | Image_Nr: Imagenumber in this file (0...65535) |
8 | U16 | Points_Total: number of points (1...65535) in this Image. |
10 | U8 | Frame_Repeat: (0 = once, can be ignored but should not) |
11 | U8 | Pointtype (see below) |
12.. | LTF-Point | LTF-Point[Points_Total] |
ByteOffset | Len | Description |
---|---|---|
0 | S8 | X, Bit7 is signbit |
1 | S8 | Y, Bit7 is signbit |
2 | S8 | Z, Bit7 is signbit |
3 | U8 | Attribut: Bit 7=1=Blank(0=Light) Bit's 6..0 colortablenumber 0..127 |
ByteOffset | Len | Description |
---|---|---|
0 | S8 | X, Bit7 is signbit |
1 | S8 | Y, Bit7 is signbit |
2 | U8 | Attribut: Bit 7=1=Blank(0=Light) Bit's 6..0 colortablenumber 0..127 |
ByteOffset | Len | Description |
---|---|---|
0 | S8 | X, upper 8 Bit of 12, Bit11 is signbit |
1 | S8 | Y, upper 8 Bit of 12, Bit11 is signbit |
2 | S8 | Z, upper 8 Bit of 12, Bit11 is signbit |
3 | U8 | Bits 7..4 lower 4 Bit of X, Bits 3..0 lower 4 Bit of Y. |
4 | U8 | Bits 7..4 lower 4 Bit of Z, Bits 3..0 are reserved and must be zero ! |
5 | U8 | Attribut: Bit 7=1=Blank(0=Light) Bit's 6..0 colortablenumber 0..127 |
ByteOffset | Len | Description |
---|---|---|
0 | S8 | X, upper 8 Bit of 12, Bit11 is signbit |
1 | S8 | Y, upper 8 Bit of 12, Bit11 is signbit |
2 | U8 | Bits 7..4 lower 4 Bit of X, Bits 3..0 lower 4 Bit of Y. |
3 | U8 | Attribut: Bit 7=1=Blank(0=Light) Bit's 6..0 colortablenumber 0..127 |
ByteOffset | Len | Description |
---|---|---|
0 | S16 | X, Bit15 is signbit |
2 | S16 | Y, Bit15 is signbit |
4 | S16 | Z, Bit15 is signbit |
6 | U16 | Attribut: Bit 15=1=Blank(0=Light) Bit's 14..12 are reserved and must be zero ! Bit's 11..0 colortablenumber 0..4095 |
ByteOffset | Len | Description |
---|---|---|
0 | S16 | X, Bit15 is signbit |
2 | S16 | Y, Bit15 is signbit |
4 | U16 | Attribut: Bit 15=1=Blank(0=Light) Bit's 14..12 are reserved and must be zero ! Bit's 11..0 colortablenumber 0..4095 |
ByteOffset | Len | Description |
---|---|---|
0 | S8 | X, upper 8 Bit of 12, Bit11 is signbit |
1 | S8 | Y, upper 8 Bit of 12, Bit11 is signbit |
2 | U8 | Bits 7..4 lower 4 Bit of X, Bits 3..0 lower 4 Bit of Y. |
4 | U8 | Bits 7..4 lower 4 Bit of Z, Bits 3..0 are reserved and must be zero ! |
6 | U16 | Attribut: Bit 15=1=Blank(0=Light) Bit's 14..12 are reserved and must be zero ! Bit's 11..0 colortablenumber 0..4095 |
ByteOffset | Len | Description |
---|---|---|
0 | S8 | X-Koord, upper 8 Bit of 12, Bit11 is signbit |
1 | S8 | Y-Koord, upper 8 Bit of 12, Bit11 is signbit |
2 | U8 | Bits 7..4 lower 4 Bit of X, Bits 3..0 lower 4 Bit of Y. |
4 | U16 | Attribut: Bit 15=1=Blank(0=Light) Bit's 14..12 are reserved and must be zero ! Bit's 11..0 colortablenumber 0..4095 |
ByteOffset | Len | Description |
---|---|---|
0 | S16 | X, Bit15 is signbit |
2 | S16 | Y, Bit15 is signbit |
4 | S16 | Z, Bit15 is signbit |
6 | U16 | Attribut: Bit 15=1=Blank(0=Light) then 3 * 5 Bits Red,Green,Blue |
ByteOffset | Len | Description |
---|---|---|
0 | S16 | X, Bit15 is signbit |
2 | S16 | Y, Bit15 is signbit |
6 | U16 | Attribut: Bit 15=1=Blank(0=Light) then 3 * 5 Bits Red,Green,Blue |
ByteOffset | Len | Description |
---|---|---|
0 | S16 | X, Bit15 is signbit |
2 | S16 | Y, Bit15 is signbit |
4 | S16 | Z, Bit15 is signbit |
6 | U8 | Attribut: Bit 7=1=Blank(0=Light) Bit's 6..0 are reserved and must be zero ! |
7 | U8 | Red 0..255 |
8 | U8 | Green 0..255 |
9 | U8 | Blue 0..255 |
ByteOffset | Len | Description |
---|---|---|
0 | S16 | X, Bit15 is signbit |
2 | S16 | Y, Bit15 is signbit |
4 | U8 | Attribut: Bit 7=1=Blank(0=Light) Bit's 6..0 are reserved and must be zero ! |
5 | U8 | Red 0..255 |
6 | U8 | Green 0..255 |
7 | U8 | Blue 0..255 |
ByteOffset | Len | Description |
---|---|---|
0 | S32 | X, Bit31 is signbit |
4 | S32 | Y, Bit31 is signbit |
8 | S32 | Z, Bit31 is signbit |
12 | U8 | Attribut: Bit 7=1=Blank(0=Light) Bit's 6..0 are reserved and must be zero ! |
13 | U8 | Red 0..255 |
14 | U8 | Green 0..255 |
15 | U8 | Blue 0..255 |
ByteOffset | Len | Description |
---|---|---|
0 | S32 | X, Bit31 is signbit |
4 | S32 | Y, Bit31 is signbit |
8 | U8 | Attribut: Bit 7=1=Blank(0=Light) Bit's 6..0 are reserved and must be zero ! |
9 | U8 | Red 0..255 |
10 | U8 | Green 0..255 |
11 | U8 | Blue 0..255 |
Colornumber | Red | Green | Blue |
---|---|---|---|
0 | 255 | 0 | 0 |
1 | 255 | 16 | 0 |
2 | 255 | 32 | 0 |
3 | 255 | 48 | 0 |
4 | 255 | 64 | 0 |
5 | 255 | 80 | 0 |
6 | 255 | 96 | 0 |
7 | 255 | 112 | 0 |
8 | 255 | 128 | 0 |
9 | 255 | 144 | 0 |
10 | 255 | 160 | 0 |
11 | 255 | 176 | 0 |
12 | 255 | 192 | 0 |
13 | 255 | 208 | 0 |
14 | 255 | 224 | 0 |
15 | 255 | 240 | 0 |
16 | 255 | 255 | 0 |
17 | 224 | 255 | 0 |
18 | 192 | 255 | 0 |
19 | 160 | 255 | 0 |
20 | 128 | 255 | 0 |
21 | 96 | 255 | 0 |
22 | 64 | 255 | 0 |
23 | 32 | 255 | 0 |
24 | 0 | 255 | 0 |
25 | 0 | 255 | 32 |
26 | 0 | 255 | 64 |
27 | 0 | 255 | 96 |
28 | 0 | 255 | 128 |
29 | 0 | 255 | 160 |
30 | 0 | 255 | 192 |
31 | 0 | 255 | 224 |
32 | 0 | 130 | 255 |
33 | 0 | 114 | 255 |
34 | 0 | 104 | 255 |
35 | 10 | 96 | 255 |
36 | 0 | 82 | 255 |
37 | 0 | 74 | 255 |
38 | 0 | 64 | 255 |
39 | 0 | 32 | 255 |
40 | 0 | 0 | 255 |
41 | 32 | 0 | 255 |
42 | 64 | 0 | 255 |
43 | 96 | 0 | 255 |
44 | 128 | 0 | 255 |
45 | 160 | 0 | 255 |
46 | 192 | 0 | 255 |
47 | 224 | 0 | 255 |
48 | 255 | 0 | 255 |
49 | 255 | 32 | 255 |
50 | 255 | 64 | 255 |
51 | 255 | 96 | 255 |
52 | 255 | 128 | 255 |
53 | 255 | 160 | 255 |
54 | 255 | 192 | 255 |
55 | 255 | 224 | 255 |
56 | 255 | 255 | 255 |
57 | 255 | 224 | 224 |
58 | 255 | 255 | 255 |
59 | 255 | 160 | 160 |
60 | 255 | 128 | 128 |
61 | 255 | 96 | 96 |
62 | 255 | 64 | 64 |
63 | 255 | 32 | 32 |
63 | 255 | 32 | 32 |
64..4095 | 255 | 32 | 32 |
28_9_00