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 liblas::Reader* getReader(){
return m_reader;};
56 void resetReader(){m_reader->Reset();};
57 void setFilter(std::vector<liblas::FilterPtr>
const& filters);
58 bool const& readNextPoint(){
return(m_reader->ReadNextPoint());};
59 bool const& readNextPoint(liblas::Point& thePoint);
60 liblas::Point
const& getPoint(){
return m_reader->GetPoint();};
61 liblas::Point
const& readPointAt(std::size_t n){m_reader->ReadPointAt(n);
return m_reader->GetPoint();};
63 void addReturnsFilter(std::vector<unsigned short>
const& returns);
64 void addClassFilter(std::vector<unsigned short>
const& classes);
65 void setFilters(
const std::vector<liblas::FilterPtr>& filters){m_filters=filters;setFilters();};
66 void setFilters(){m_reader->SetFilters(m_filters);};
68 void setCodec(
const std::string& filename);
69 std::string m_filename;
70 std::ifstream *m_ifstream;
71 liblas::Reader* m_reader;
72 std::vector<liblas::FilterPtr> m_filters;
75 #endif // _IMGREADERLAS_H_