OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
Public Member Functions | Protected Attributes | Friends | List of all members
ossimplugins::DataHistogramProcessedData Class Reference

This class is able to read a data histogram record - Processed data. More...

#include <DataHistogramProcessedData.h>

Inheritance diagram for ossimplugins::DataHistogramProcessedData:
ossimplugins::RadarSatRecord

Public Member Functions

 DataHistogramProcessedData ()
 Constructor. More...
 
virtual ~DataHistogramProcessedData ()
 Destructor. More...
 
 DataHistogramProcessedData (const DataHistogramProcessedData &rhs)
 Copy constructor. More...
 
DataHistogramProcessedDataoperator= (const DataHistogramProcessedData &rhs)
 Copy operator. More...
 
RadarSatRecordInstanciate ()
 This function is able to create a new instance of the class. More...
 
RadarSatRecordClone ()
 This function is able to create a new instance of the class initialised with the data of the calling instance. More...
 
void Read (std::istream &is)
 Reads the class data from a stream. More...
 
void Write (std::ostream &os)
 Writes the class to a stream. More...
 
int get_rec_seq ()
 Record sequence number. More...
 
int get_sar_chn ()
 SAR channel indicator. More...
 
int get_ntab ()
 Number of histogram table data sets in this record. More...
 
int get_ltab ()
 Histogram table data set size. More...
 
DataHistogramRecord get_histogram1 ()
 Histogram data record #1. More...
 
DataHistogramRecord get_histogram2 ()
 Histogram data record #2. More...
 
- Public Member Functions inherited from ossimplugins::RadarSatRecord
 RadarSatRecord (std::string mnemonic)
 Constructor. More...
 
virtual ~RadarSatRecord ()
 Destructor. More...
 
 RadarSatRecord (const RadarSatRecord &rhs)
 Copy constructor. More...
 
std::string get_mnemonic ()
 

Protected Attributes

int _rec_seq
 Record sequence number. More...
 
int _sar_chn
 SAR channel indicator. More...
 
int _ntab
 Number of histogram table data sets in this record. More...
 
int _ltab
 Histogram table data set size. More...
 
DataHistogramRecord _histogram1
 Histogram data record #1. More...
 
DataHistogramRecord _histogram2
 Histogram data record #2. More...
 
- Protected Attributes inherited from ossimplugins::RadarSatRecord
std::string _mnemonic
 

Friends

std::ostream & operator<< (std::ostream &os, const DataHistogramProcessedData &data)
 This function writes the DataHistogramProcessedData in a stream. More...
 
std::istream & operator>> (std::istream &is, DataHistogramProcessedData &data)
 This function reads a DataHistogramProcessedData from a stream. More...
 

Detailed Description

This class is able to read a data histogram record - Processed data.

Warning
There is an error in the documentation for the spare at the end of the record. They say 3 bytes (A3) but they also say that the spare is on the bytes 16917, 16918, 16919 and 16920. In the data files I have, I need to use a spare of 4 bytes.

Definition at line 30 of file DataHistogramProcessedData.h.

Constructor & Destructor Documentation

◆ DataHistogramProcessedData() [1/2]

ossimplugins::DataHistogramProcessedData::DataHistogramProcessedData ( )

Constructor.

Definition at line 16 of file DataHistogramProcessedData.cpp.

Referenced by Clone(), and Instanciate().

16  : RadarSatRecord("pdr16_hist_rec")
17 {
18 }
RadarSatRecord(std::string mnemonic)
Constructor.

◆ ~DataHistogramProcessedData()

ossimplugins::DataHistogramProcessedData::~DataHistogramProcessedData ( )
virtual

Destructor.

Definition at line 20 of file DataHistogramProcessedData.cpp.

21 {
22 }

◆ DataHistogramProcessedData() [2/2]

ossimplugins::DataHistogramProcessedData::DataHistogramProcessedData ( const DataHistogramProcessedData rhs)

Copy constructor.

Definition at line 72 of file DataHistogramProcessedData.cpp.

72  :
73  RadarSatRecord(rhs),
74  _rec_seq(rhs._rec_seq),
75  _sar_chn(rhs._sar_chn),
76  _ntab(rhs._ntab),
77  _ltab(rhs._ltab),
78  _histogram1(rhs._histogram1),
79  _histogram2(rhs._histogram2)
80 {
81 
82 }
DataHistogramRecord _histogram2
Histogram data record #2.
RadarSatRecord(std::string mnemonic)
Constructor.
DataHistogramRecord _histogram1
Histogram data record #1.
int _ntab
Number of histogram table data sets in this record.

Member Function Documentation

◆ Clone()

RadarSatRecord* ossimplugins::DataHistogramProcessedData::Clone ( )
inlinevirtual

This function is able to create a new instance of the class initialised with the data of the calling instance.

Implements ossimplugins::RadarSatRecord.

Definition at line 73 of file DataHistogramProcessedData.h.

References DataHistogramProcessedData().

74  {
75  return new DataHistogramProcessedData(*this);
76  };

◆ get_histogram1()

DataHistogramRecord ossimplugins::DataHistogramProcessedData::get_histogram1 ( )
inline

Histogram data record #1.

Definition at line 128 of file DataHistogramProcessedData.h.

References _histogram1.

129  {
130  return _histogram1;
131  };
DataHistogramRecord _histogram1
Histogram data record #1.

◆ get_histogram2()

DataHistogramRecord ossimplugins::DataHistogramProcessedData::get_histogram2 ( )
inline

Histogram data record #2.

Definition at line 136 of file DataHistogramProcessedData.h.

References _histogram2.

137  {
138  return _histogram2;
139  };
DataHistogramRecord _histogram2
Histogram data record #2.

◆ get_ltab()

int ossimplugins::DataHistogramProcessedData::get_ltab ( )
inline

Histogram table data set size.

Definition at line 120 of file DataHistogramProcessedData.h.

References _ltab.

121  {
122  return _ltab;
123  };

◆ get_ntab()

int ossimplugins::DataHistogramProcessedData::get_ntab ( )
inline

Number of histogram table data sets in this record.

Definition at line 112 of file DataHistogramProcessedData.h.

References _ntab.

113  {
114  return _ntab;
115  };
int _ntab
Number of histogram table data sets in this record.

◆ get_rec_seq()

int ossimplugins::DataHistogramProcessedData::get_rec_seq ( )
inline

Record sequence number.

Definition at line 97 of file DataHistogramProcessedData.h.

References _rec_seq.

98  {
99  return _rec_seq;
100  };

◆ get_sar_chn()

int ossimplugins::DataHistogramProcessedData::get_sar_chn ( )
inline

SAR channel indicator.

Definition at line 104 of file DataHistogramProcessedData.h.

References _sar_chn.

105  {
106  return _sar_chn;
107  };

◆ Instanciate()

RadarSatRecord* ossimplugins::DataHistogramProcessedData::Instanciate ( )
inlinevirtual

This function is able to create a new instance of the class.

Implements ossimplugins::RadarSatRecord.

Definition at line 65 of file DataHistogramProcessedData.h.

References DataHistogramProcessedData().

66  {
67  return new DataHistogramProcessedData();
68  };

◆ operator=()

DataHistogramProcessedData & ossimplugins::DataHistogramProcessedData::operator= ( const DataHistogramProcessedData rhs)

Copy operator.

Definition at line 84 of file DataHistogramProcessedData.cpp.

References _histogram1, _histogram2, _ltab, _ntab, _rec_seq, and _sar_chn.

85 {
86  _histogram1 = rhs._histogram1;
87  _histogram2 = rhs._histogram2;
88  _sar_chn = rhs._sar_chn;
89  _rec_seq = rhs._rec_seq;
90  _ntab = rhs._ntab;
91  _ltab = rhs._ltab;
92  return *this;
93 }
DataHistogramRecord _histogram2
Histogram data record #2.
DataHistogramRecord _histogram1
Histogram data record #1.
int _ntab
Number of histogram table data sets in this record.

◆ Read()

void ossimplugins::DataHistogramProcessedData::Read ( std::istream &  is)
inlinevirtual

Reads the class data from a stream.

Implements ossimplugins::RadarSatRecord.

Definition at line 81 of file DataHistogramProcessedData.h.

82  {
83  is>>*this;
84  };

◆ Write()

void ossimplugins::DataHistogramProcessedData::Write ( std::ostream &  os)
inlinevirtual

Writes the class to a stream.

Implements ossimplugins::RadarSatRecord.

Definition at line 89 of file DataHistogramProcessedData.h.

90  {
91  os<<*this;
92  };

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const DataHistogramProcessedData data 
)
friend

This function writes the DataHistogramProcessedData in a stream.

Definition at line 24 of file DataHistogramProcessedData.cpp.

25 {
26  os<<"rec_seq:"<<data._rec_seq<<std::endl;
27 
28  os<<"sar_chn:"<<data._sar_chn<<std::endl;
29 
30  os<<"ntab:"<<data._ntab<<std::endl;
31 
32  os<<"ltab:"<<data._ltab<<std::endl;
33 
34  os<<data._histogram1<<std::endl;
35 
36  os<<data._histogram2<<std::endl;
37 
38  return os;
39 }

◆ operator>>

std::istream& operator>> ( std::istream &  is,
DataHistogramProcessedData data 
)
friend

This function reads a DataHistogramProcessedData from a stream.

Definition at line 41 of file DataHistogramProcessedData.cpp.

42 {
43  char buff[33];
44  buff[32] = '\0';
45 
46  is.read(buff,4);
47  buff[4] = '\0';
48  data._rec_seq = atoi(buff);
49 
50  is.read(buff,4);
51  buff[4] = '\0';
52  data._sar_chn = atoi(buff);
53 
54  is.read(buff,8);
55  buff[8] = '\0';
56  data._ntab = atoi(buff);
57 
58  is.read(buff,8);
59  buff[8] = '\0';
60  data._ltab = atoi(buff);
61 
62  is>>data._histogram1;
63 
64  is>>data._histogram2;
65 
66  char tmp[5];
67  tmp[4] = '\0';
68  is.read(tmp, 4);
69  return is;
70 }

Member Data Documentation

◆ _histogram1

DataHistogramRecord ossimplugins::DataHistogramProcessedData::_histogram1
protected

Histogram data record #1.

Definition at line 161 of file DataHistogramProcessedData.h.

Referenced by get_histogram1(), ossimplugins::operator<<(), operator=(), and ossimplugins::operator>>().

◆ _histogram2

DataHistogramRecord ossimplugins::DataHistogramProcessedData::_histogram2
protected

Histogram data record #2.

Definition at line 165 of file DataHistogramProcessedData.h.

Referenced by get_histogram2(), ossimplugins::operator<<(), operator=(), and ossimplugins::operator>>().

◆ _ltab

int ossimplugins::DataHistogramProcessedData::_ltab
protected

Histogram table data set size.

Definition at line 157 of file DataHistogramProcessedData.h.

Referenced by get_ltab(), ossimplugins::operator<<(), operator=(), and ossimplugins::operator>>().

◆ _ntab

int ossimplugins::DataHistogramProcessedData::_ntab
protected

Number of histogram table data sets in this record.

Definition at line 153 of file DataHistogramProcessedData.h.

Referenced by get_ntab(), ossimplugins::operator<<(), operator=(), and ossimplugins::operator>>().

◆ _rec_seq

int ossimplugins::DataHistogramProcessedData::_rec_seq
protected

Record sequence number.

Definition at line 139 of file DataHistogramProcessedData.h.

Referenced by get_rec_seq(), ossimplugins::operator<<(), operator=(), and ossimplugins::operator>>().

◆ _sar_chn

int ossimplugins::DataHistogramProcessedData::_sar_chn
protected

SAR channel indicator.

Definition at line 148 of file DataHistogramProcessedData.h.

Referenced by get_sar_chn(), ossimplugins::operator<<(), operator=(), and ossimplugins::operator>>().


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