OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
ossimLasPointRecord0 Class Reference

Container class for LAS point record type 1. More...

#include <ossimLasPointRecord0.h>

Inheritance diagram for ossimLasPointRecord0:
ossimLasPointRecordInterface

Classes

struct  ossimLasPointRecord0Data
 

Public Member Functions

 ossimLasPointRecord0 ()
 default constructor More...
 
 ossimLasPointRecord0 (const ossimLasPointRecord0 &obj)
 
const ossimLasPointRecord0operator= (const ossimLasPointRecord0 &copy_this)
 
virtual ~ossimLasPointRecord0 ()
 destructor More...
 
virtual void readStream (std::istream &in)
 Initialize record from stream. More...
 
virtual void writeStream (std::ostream &out)
 Writes record to stream. More...
 
virtual ossim_int32 getX () const
 
virtual ossim_int32 getY () const
 
virtual ossim_int32 getZ () const
 
virtual ossim_uint16 getRed () const
 
virtual ossim_uint16 getGreen () const
 
virtual ossim_uint16 getBlue () const
 
virtual ossim_uint16 getIntensity () const
 
virtual ossim_uint8 getReturnNumber () const
 
virtual ossim_uint8 getNumberOfReturns () const
 
virtual ossim_uint8 getEdgeFlag () const
 
virtual std::ostream & print (std::ostream &out) const
 
- Public Member Functions inherited from ossimLasPointRecordInterface
virtual ~ossimLasPointRecordInterface ()
 Virtual destructor defined to squash compiler errors. More...
 

Private Member Functions

void swap ()
 Performs a swap if system byte order is not little endian. More...
 

Private Attributes

ossimLasPointRecord0Data m_record
 

Detailed Description

Container class for LAS point record type 1.

Definition at line 23 of file ossimLasPointRecord0.h.

Constructor & Destructor Documentation

◆ ossimLasPointRecord0() [1/2]

ossimLasPointRecord0::ossimLasPointRecord0 ( )

default constructor

Definition at line 72 of file ossimLasPointRecord0.cpp.

73  :
74  m_record()
75 {
76 }
ossimLasPointRecord0Data m_record

◆ ossimLasPointRecord0() [2/2]

ossimLasPointRecord0::ossimLasPointRecord0 ( const ossimLasPointRecord0 obj)

Definition at line 78 of file ossimLasPointRecord0.cpp.

79  :
80  m_record(obj.m_record)
81 {
82 }
ossimLasPointRecord0Data m_record

◆ ~ossimLasPointRecord0()

ossimLasPointRecord0::~ossimLasPointRecord0 ( )
virtual

destructor

Definition at line 93 of file ossimLasPointRecord0.cpp.

94 {
95 }

Member Function Documentation

◆ getBlue()

ossim_uint16 ossimLasPointRecord0::getBlue ( ) const
virtual
Returns
blue

Implements ossimLasPointRecordInterface.

Definition at line 149 of file ossimLasPointRecord0.cpp.

150 {
151  return 0;
152 }

◆ getEdgeFlag()

ossim_uint8 ossimLasPointRecord0::getEdgeFlag ( ) const
virtual

Implements ossimLasPointRecordInterface.

Definition at line 169 of file ossimLasPointRecord0.cpp.

References m_record, and ossimLasPointRecord0::ossimLasPointRecord0Data::m_returnByte.

Referenced by print().

170 {
171  return (0x40 & m_record.m_returnByte);
172 }
ossimLasPointRecord0Data m_record

◆ getGreen()

ossim_uint16 ossimLasPointRecord0::getGreen ( ) const
virtual
Returns
green

Implements ossimLasPointRecordInterface.

Definition at line 144 of file ossimLasPointRecord0.cpp.

145 {
146  return 0;
147 }

◆ getIntensity()

ossim_uint16 ossimLasPointRecord0::getIntensity ( ) const
virtual
Returns
intensity

Implements ossimLasPointRecordInterface.

Definition at line 154 of file ossimLasPointRecord0.cpp.

References ossimLasPointRecord0::ossimLasPointRecord0Data::m_intensity, and m_record.

155 {
156  return m_record.m_intensity;
157 }
ossimLasPointRecord0Data m_record

◆ getNumberOfReturns()

ossim_uint8 ossimLasPointRecord0::getNumberOfReturns ( ) const
virtual

Implements ossimLasPointRecordInterface.

Definition at line 164 of file ossimLasPointRecord0.cpp.

References m_record, and ossimLasPointRecord0::ossimLasPointRecord0Data::m_returnByte.

Referenced by print().

165 {
166  return (0x34 & m_record.m_returnByte);
167 }
ossimLasPointRecord0Data m_record

◆ getRed()

ossim_uint16 ossimLasPointRecord0::getRed ( ) const
virtual
Returns
red

Implements ossimLasPointRecordInterface.

Definition at line 139 of file ossimLasPointRecord0.cpp.

140 {
141  return 0;
142 }

◆ getReturnNumber()

ossim_uint8 ossimLasPointRecord0::getReturnNumber ( ) const
virtual
Returns
return number

Implements ossimLasPointRecordInterface.

Definition at line 159 of file ossimLasPointRecord0.cpp.

References m_record, and ossimLasPointRecord0::ossimLasPointRecord0Data::m_returnByte.

Referenced by print().

160 {
161  return (0x07 & m_record.m_returnByte);
162 }
ossimLasPointRecord0Data m_record

◆ getX()

ossim_int32 ossimLasPointRecord0::getX ( ) const
virtual
Returns
x

Implements ossimLasPointRecordInterface.

Definition at line 124 of file ossimLasPointRecord0.cpp.

References m_record, and ossimLasPointRecord0::ossimLasPointRecord0Data::m_x.

125 {
126  return m_record.m_x;
127 }
ossimLasPointRecord0Data m_record

◆ getY()

ossim_int32 ossimLasPointRecord0::getY ( ) const
virtual
Returns
y

Implements ossimLasPointRecordInterface.

Definition at line 129 of file ossimLasPointRecord0.cpp.

References m_record, and ossimLasPointRecord0::ossimLasPointRecord0Data::m_y.

130 {
131  return m_record.m_y;
132 }
ossimLasPointRecord0Data m_record

◆ getZ()

ossim_int32 ossimLasPointRecord0::getZ ( ) const
virtual
Returns
z

Implements ossimLasPointRecordInterface.

Definition at line 134 of file ossimLasPointRecord0.cpp.

References m_record, and ossimLasPointRecord0::ossimLasPointRecord0Data::m_z.

135 {
136  return m_record.m_z;
137 }
ossimLasPointRecord0Data m_record

◆ operator=()

const ossimLasPointRecord0 & ossimLasPointRecord0::operator= ( const ossimLasPointRecord0 copy_this)

Definition at line 84 of file ossimLasPointRecord0.cpp.

References m_record.

85 {
86  if (this != &copy_this)
87  {
88  m_record = copy_this.m_record;
89  }
90  return *this;
91 }
ossimLasPointRecord0Data m_record

◆ print()

std::ostream & ossimLasPointRecord0::print ( std::ostream &  out) const
virtual

Implements ossimLasPointRecordInterface.

Definition at line 174 of file ossimLasPointRecord0.cpp.

References getEdgeFlag(), getNumberOfReturns(), getReturnNumber(), ossimLasPointRecord0::ossimLasPointRecord0Data::m_classification, ossimLasPointRecord0::ossimLasPointRecord0Data::m_intensity, ossimLasPointRecord0::ossimLasPointRecord0Data::m_pointSourceID, m_record, ossimLasPointRecord0::ossimLasPointRecord0Data::m_scanAngleRank, ossimLasPointRecord0::ossimLasPointRecord0Data::m_userData, ossimLasPointRecord0::ossimLasPointRecord0Data::m_x, ossimLasPointRecord0::ossimLasPointRecord0Data::m_y, and ossimLasPointRecord0::ossimLasPointRecord0Data::m_z.

175 {
176  // Capture the original flags.
177  std::ios_base::fmtflags f = out.flags();
178 
179  out << std::setiosflags(std::ios_base::fixed) << std::setprecision(8);
180 
181  out << "x: " << m_record.m_x
182  << "\ny: " << m_record.m_y
183  << "\nz: " << m_record.m_z
184  << "\nintensity: " << m_record.m_intensity
185  << "\nreturn: " << int(getReturnNumber())
186  << "\nnumber_of_returns: " << int(getNumberOfReturns())
187  << "\nedge: " << (getEdgeFlag()?"true":"false")
188  << "\nclassification: " << m_record.m_classification
189  << "\nscan_angle_rank: " << int(m_record.m_scanAngleRank)
190  << "\nuser_data: " << m_record.m_userData
191  << "\npoint_source_id: " << m_record.m_pointSourceID
192  << std::endl;
193 
194  // Reset flags.
195  out.setf(f);
196  return out;
197 }
virtual ossim_uint8 getEdgeFlag() const
ossimLasPointRecord0Data m_record
virtual ossim_uint8 getNumberOfReturns() const
virtual ossim_uint8 getReturnNumber() const

◆ readStream()

void ossimLasPointRecord0::readStream ( std::istream &  in)
virtual

Initialize record from stream.

Implements ossimLasPointRecordInterface.

Definition at line 97 of file ossimLasPointRecord0.cpp.

References ossim::byteOrder(), m_record, OSSIM_BIG_ENDIAN, and swap().

98 {
99  in.read((char*)&m_record, 28);
100 
102  {
103  swap();
104  }
105 }
void swap()
Performs a swap if system byte order is not little endian.
OSSIM_DLL ossimByteOrder byteOrder()
Definition: ossimCommon.cpp:54
ossimLasPointRecord0Data m_record

◆ swap()

void ossimLasPointRecord0::swap ( )
private

◆ writeStream()

void ossimLasPointRecord0::writeStream ( std::ostream &  out)
virtual

Writes record to stream.

Implements ossimLasPointRecordInterface.

Definition at line 107 of file ossimLasPointRecord0.cpp.

References ossim::byteOrder(), m_record, OSSIM_BIG_ENDIAN, and swap().

108 {
110  {
111  // Write little endian per spec:
112  swap();
113  }
114 
115  out.write((char*)&m_record, 28);
116 
118  {
119  // Swap back to native byte order if needed:
120  swap();
121  }
122 }
void swap()
Performs a swap if system byte order is not little endian.
OSSIM_DLL ossimByteOrder byteOrder()
Definition: ossimCommon.cpp:54
ossimLasPointRecord0Data m_record

Member Data Documentation

◆ m_record

ossimLasPointRecord0Data ossimLasPointRecord0::m_record
private

The documentation for this class was generated from the following files: