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

#include <ossimAigStatistics.h>

Public Member Functions

 ossimAigStatistics ()
 
void reset ()
 
bool writeStream (std::ostream &out)
 

Public Attributes

double theMin
 
double theMax
 
double theMean
 
double theStandardDev
 

Detailed Description

Definition at line 14 of file ossimAigStatistics.h.

Constructor & Destructor Documentation

◆ ossimAigStatistics()

ossimAigStatistics::ossimAigStatistics ( )

Definition at line 14 of file ossimAigStatistics.cpp.

15  :theMin(0.0),
16  theMax(0.0),
17  theMean(0.0),
18  theStandardDev(0.0)
19 {
20 }

Member Function Documentation

◆ reset()

void ossimAigStatistics::reset ( void  )

Definition at line 22 of file ossimAigStatistics.cpp.

References theMax, theMean, theMin, and theStandardDev.

23 {
24  theMin = 0.0;
25  theMax = 0.0;
26  theMean = 0.0;
27  theStandardDev = 0.0;
28 }

◆ writeStream()

bool ossimAigStatistics::writeStream ( std::ostream &  out)

Definition at line 30 of file ossimAigStatistics.cpp.

References ossimEndian::getSystemEndianType(), OSSIM_LITTLE_ENDIAN, ossimEndian::swap(), theMax, theMean, theMin, and theStandardDev.

Referenced by ossimArcInfoGridWriter::writeBinaryAigStats().

31 {
32  ossimEndian endian;
33  double tempDouble;
34 
36  {
37  tempDouble = theMin;
38  endian.swap(tempDouble);
39  out.write((char*)(&tempDouble), 8);
40 
41  tempDouble = theMax;
42  endian.swap(tempDouble);
43  out.write((char*)(&tempDouble), 8);
44 
45  tempDouble = theMean;
46  endian.swap(tempDouble);
47  out.write((char*)(&tempDouble), 8);
48 
49  tempDouble = theStandardDev;
50  endian.swap(tempDouble);
51  out.write((char*)(&tempDouble), 8);
52  }
53  else
54  {
55  out.write((char*)(&theMin), 8);
56  out.write((char*)(&theMax), 8);
57  out.write((char*)(&theMean), 8);
58  out.write((char*)(&theStandardDev), 8);
59  }
60 
61  return true;
62 }
ossimByteOrder getSystemEndianType() const
Definition: ossimEndian.h:78
void swap(ossim_sint8 &)
Definition: ossimEndian.h:26

Member Data Documentation

◆ theMax

double ossimAigStatistics::theMax

◆ theMean

double ossimAigStatistics::theMean

◆ theMin

double ossimAigStatistics::theMin

◆ theStandardDev

double ossimAigStatistics::theStandardDev

Definition at line 26 of file ossimAigStatistics.h.

Referenced by reset(), and writeStream().


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