forked from shintadono/laszip.net
-
Notifications
You must be signed in to change notification settings - Fork 0
/
LASreadItemRaw_RGBNIR14.cs
48 lines (45 loc) · 1.45 KB
/
LASreadItemRaw_RGBNIR14.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//===============================================================================
//
// FILE: lasreaditemraw_rgbnir12.cs
//
// CONTENTS:
//
// Implementation of LASreadItemRaw for RGBNIR14 items.
//
// PROGRAMMERS:
//
// [email protected] - http://rapidlasso.com
//
// COPYRIGHT:
//
// (c) 2005-2012, martin isenburg, rapidlasso - tools to catch reality
// (c) of the C# port 2014 by Shinta <[email protected]>
//
// This is free software; you can redistribute and/or modify it under the
// terms of the GNU Lesser General Licence as published by the Free Software
// Foundation. See the COPYING file for more information.
//
// This software is distributed WITHOUT ANY WARRANTY and without even the
// implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//
// CHANGE HISTORY: omitted for easier Copy&Paste (pls see the original)
//
//===============================================================================
using System;
using System.IO;
namespace laszip.net
{
class LASreadItemRaw_RGBNIR14 : LASreadItemRaw
{
public LASreadItemRaw_RGBNIR14() { }
public override void read(laszip_point item)
{
byte[] buf=new byte[8];
if(instream.Read(buf, 0, 8)!=8) throw new EndOfStreamException();
item.rgb[0]=BitConverter.ToUInt16(buf, 0);
item.rgb[1]=BitConverter.ToUInt16(buf, 2);
item.rgb[2]=BitConverter.ToUInt16(buf, 4);
item.rgb[3]=BitConverter.ToUInt16(buf, 6);
}
}
}