OSSIM - Open Source Software Image Map
Version 1.9.0 (20180803)
src
support_data
ossimAigStatistics.cpp
Go to the documentation of this file.
1
//*******************************************************************
2
//
3
// License: See top level LICENSE.txt file.
4
//
5
// Author: Garrett Potts (gpotts@imagelinks.com)
6
//
7
//*******************************************************************
8
// $Id: ossimAigStatistics.cpp 9963 2006-11-28 21:11:01Z gpotts $
9
10
#include <ostream>
11
#include <
ossim/base/ossimEndian.h
>
12
#include <
ossim/support_data/ossimAigStatistics.h
>
13
14
ossimAigStatistics::ossimAigStatistics
()
15
:theMin(0.0),
16
theMax(0.0),
17
theMean(0.0),
18
theStandardDev(0.0)
19
{
20
}
21
22
void
ossimAigStatistics::reset
()
23
{
24
theMin
= 0.0;
25
theMax
= 0.0;
26
theMean
= 0.0;
27
theStandardDev
= 0.0;
28
}
29
30
bool
ossimAigStatistics::writeStream
(
std::ostream
& out)
31
{
32
ossimEndian
endian;
33
double
tempDouble;
34
35
if
(endian.
getSystemEndianType
() ==
OSSIM_LITTLE_ENDIAN
)
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
}
ossimAigStatistics::theMean
double theMean
Definition:
ossimAigStatistics.h:25
ossimAigStatistics::theMin
double theMin
Definition:
ossimAigStatistics.h:23
ossimAigStatistics::reset
void reset()
Definition:
ossimAigStatistics.cpp:22
ossimEndian
Definition:
ossimEndian.h:18
ossimAigStatistics::theMax
double theMax
Definition:
ossimAigStatistics.h:24
ossimAigStatistics::ossimAigStatistics
ossimAigStatistics()
Definition:
ossimAigStatistics.cpp:14
ossimEndian::getSystemEndianType
ossimByteOrder getSystemEndianType() const
Definition:
ossimEndian.h:78
ossimAigStatistics.h
ossimEndian.h
ossimAigStatistics::theStandardDev
double theStandardDev
Definition:
ossimAigStatistics.h:26
ossimAigStatistics::writeStream
bool writeStream(std::ostream &out)
Definition:
ossimAigStatistics.cpp:30
ossimEndian::swap
void swap(ossim_sint8 &)
Definition:
ossimEndian.h:26
OSSIM_LITTLE_ENDIAN
Definition:
ossimConstants.h:427
ossim::ostream
std::basic_ostream< char > ostream
Base class for char output streams.
Definition:
ossimIosFwd.h:23
Generated on Fri Aug 3 2018 08:46:45 for OSSIM - Open Source Software Image Map by
1.8.14