20 #ifndef _IMGREADERLAS_H_
21 #define _IMGREADERLAS_H_
25 #include "liblas/liblas.hpp"
32 bool filter(
const liblas::Point& point);
45 void open(
const std::string& filename);
47 liblas::Header
const& getHeader()
const;
48 bool isCompressed()
const;
49 unsigned long int getPointCount()
const;
50 void las2ascii(
const std::string& filename,
bool verbose=
false)
const;
51 template<
typename T> liblas::Bounds<T> getExtent()
const {
return getHeader().GetExtent();};
52 void getExtent(
double& ulx,
double& uly,
double& lrx,
double& lry)
const;
53 double getMinZ()
const;
54 double getMaxZ()
const;
55 void resetReader(){m_reader->Reset();};
56 void setFilter(std::vector<liblas::FilterPtr>
const& filters);
57 bool const& readNextPoint(liblas::Point& thePoint){
bool returnValue=m_reader->ReadNextPoint();thePoint=m_reader->GetPoint();
return(returnValue);};
58 liblas::Point
const& readPointAt(std::size_t n){m_reader->ReadPointAt(n);
return m_reader->GetPoint();};
60 void addReturnsFilter(std::vector<unsigned short>
const& returns);
61 void addClassFilter(std::vector<unsigned short>
const& classes);
62 void setFilters(
const std::vector<liblas::FilterPtr>& filters){m_filters=filters;setFilters();};
63 void setFilters(){m_reader->SetFilters(m_filters);};
65 void setCodec(
const std::string& filename);
66 std::string m_filename;
67 std::ifstream *m_ifstream;
68 liblas::Reader* m_reader;
69 std::vector<liblas::FilterPtr> m_filters;
72 #endif // _IMGREADERLAS_H_