60 size_t num_points = lasreader->
npoints;
63 floatArr points (
new float[3 * num_points]);
64 floatArr intensities (
new float[num_points]);
68 for(
size_t i = 0; i < num_points; i++)
70 size_t buf_pos = 3 * i;
72 points[buf_pos] = lasreader->
point.
x;
73 points[buf_pos + 1] = lasreader->
point.
y;
74 points[buf_pos + 2] = lasreader->
point.
z;
88 p_buffer->setPointArray(points, num_points);
89 p_buffer->addFloatChannel(intensities,
"intensities", num_points, 1);
90 p_buffer->setColorArray(colors, num_points);
101 cout <<
timestamp <<
"LasIO::read(): Unable to open file " << filename << endl;
110 std::cerr <<
"LASIO: Saving not yet implemented." << endl;
A class to handle point information with an arbitrarily large number of attribute channels...
static Timestamp timestamp
A global time stamp object for program runtime measurement.
boost::shared_array< unsigned char > ucharArr
std::shared_ptr< PointBuffer > PointBufferPtr
void set_file_name(const char *file_name, BOOL unique=FALSE)
boost::shared_array< float > floatArr
std::shared_ptr< Model > ModelPtr
virtual void save(string filename)
Save the loaded elements to the given file.
virtual ModelPtr read(string filename)
Parse the given file and load supported elements.