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

This class is able to read a radiometric data record. More...

#include <RadiometricData.h>

Inheritance diagram for ossimplugins::RadiometricData:
ossimplugins::RadarSatRecord

Public Member Functions

 RadiometricData ()
 Constructor. More...
 
 ~RadiometricData ()
 Destructor. More...
 
 RadiometricData (const RadiometricData &rhs)
 Copy constructor. More...
 
RadiometricDataoperator= (const RadiometricData &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_seq_num ()
 Record sequence number. More...
 
int get_n_data ()
 
Number of data fields More...
 
int get_field_size ()
 
Field size in bytes More...
 
std::string get_chan_ind ()
 SAR channel indicator. More...
 
std::string get_table_desig ()
 
Table designator More...
 
int get_n_samp ()
 
Number of lookup table samples More...
 
std::string get_samp_type ()
 
Sample type designator More...
 
int get_samp_inc ()
 
Increment between table entries, range samples More...
 
double * get_lookup_tab ()
 
Output scaling gain table More...
 
double get_noise_scale ()
 
Thermal noise reference level More...
 
double get_offset ()
 
Scaling offset More...
 
double get_calib_const ()
 
Calibration constant 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 _seq_num
 Record sequence number. More...
 
int _n_data
 
Number of data fields More...
 
int _field_size
 
Field size in bytes More...
 
std::string _chan_ind
 SAR channel indicator. More...
 
std::string _table_desig
 
Table designator More...
 
int _n_samp
 
Number of lookup table samples More...
 
std::string _samp_type
 
Sample type designator More...
 
int _samp_inc
 
Increment between table entries, range samples More...
 
double _lookup_tab [512]
 
Output scaling gain table More...
 
double _noise_scale
 
Thermal noise reference level More...
 
double _offset
 
Scaling offset More...
 
double _calib_const
 
Calibration constant More...
 
- Protected Attributes inherited from ossimplugins::RadarSatRecord
std::string _mnemonic
 

Friends

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

Detailed Description

This class is able to read a radiometric data record.

Definition at line 25 of file RadiometricData.h.

Constructor & Destructor Documentation

◆ RadiometricData() [1/2]

ossimplugins::RadiometricData::RadiometricData ( )

Constructor.

Definition at line 17 of file RadiometricData.cpp.

Referenced by Clone(), and Instanciate().

17  : RadarSatRecord("radi_data_rec")
18 {
19 }
RadarSatRecord(std::string mnemonic)
Constructor.

◆ ~RadiometricData()

ossimplugins::RadiometricData::~RadiometricData ( )

Destructor.

Definition at line 21 of file RadiometricData.cpp.

22 {
23 }

◆ RadiometricData() [2/2]

ossimplugins::RadiometricData::RadiometricData ( const RadiometricData rhs)

Copy constructor.

Definition at line 125 of file RadiometricData.cpp.

References _calib_const, _chan_ind, _field_size, _lookup_tab, _n_data, _n_samp, _noise_scale, _offset, _samp_inc, _samp_type, _seq_num, and _table_desig.

125  :
126  RadarSatRecord(rhs)
127 {
128 
129  _seq_num = rhs._seq_num;
130 
131  _n_data = rhs._n_data;
132 
133  _field_size = rhs._field_size;
134 
135  _chan_ind = rhs._chan_ind;
136 
137  _table_desig = rhs._table_desig;
138 
139  _n_samp = rhs._n_samp;
140 
141  _samp_type = rhs._samp_type;
142 
143  _samp_inc = rhs._samp_inc;
144 
145  for (int i=0;i<512;i++)
146  {
147  _lookup_tab[i] = rhs._lookup_tab[i];
148  }
149 
150  _noise_scale = rhs._noise_scale;
151 
152  _offset = rhs._offset;
153 
154  _calib_const = rhs._calib_const;
155 }
double _calib_const
Calibration constant
std::string _samp_type
Sample type designator
double _offset
Scaling offset
double _noise_scale
Thermal noise reference level
int _field_size
Field size in bytes
RadarSatRecord(std::string mnemonic)
Constructor.
int _samp_inc
Increment between table entries, range samples
int _n_data
Number of data fields
std::string _chan_ind
SAR channel indicator.
int _n_samp
Number of lookup table samples
std::string _table_desig
Table designator
int _seq_num
Record sequence number.
double _lookup_tab[512]
Output scaling gain table

Member Function Documentation

◆ Clone()

RadarSatRecord* ossimplugins::RadiometricData::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 68 of file RadiometricData.h.

References RadiometricData().

69  {
70  return new RadiometricData(*this);
71  };

◆ get_calib_const()

double ossimplugins::RadiometricData::get_calib_const ( )
inline


Calibration constant

Definition at line 173 of file RadiometricData.h.

References _calib_const.

174  {
175  return _calib_const;
176  };
double _calib_const
Calibration constant

◆ get_chan_ind()

std::string ossimplugins::RadiometricData::get_chan_ind ( )
inline

SAR channel indicator.

Definition at line 114 of file RadiometricData.h.

References _chan_ind.

115  {
116  return _chan_ind;
117  };
std::string _chan_ind
SAR channel indicator.

◆ get_field_size()

int ossimplugins::RadiometricData::get_field_size ( )
inline


Field size in bytes

Definition at line 106 of file RadiometricData.h.

References _field_size.

107  {
108  return _field_size;
109  };
int _field_size
Field size in bytes

◆ get_lookup_tab()

double* ossimplugins::RadiometricData::get_lookup_tab ( )
inline


Output scaling gain table

Definition at line 150 of file RadiometricData.h.

References _lookup_tab.

151  {
152  return _lookup_tab;
153  };
double _lookup_tab[512]
Output scaling gain table

◆ get_n_data()

int ossimplugins::RadiometricData::get_n_data ( )
inline


Number of data fields

Definition at line 99 of file RadiometricData.h.

References _n_data.

100  {
101  return _n_data;
102  };
int _n_data
Number of data fields

◆ get_n_samp()

int ossimplugins::RadiometricData::get_n_samp ( )
inline


Number of lookup table samples

Definition at line 129 of file RadiometricData.h.

References _n_samp.

130  {
131  return _n_samp;
132  };
int _n_samp
Number of lookup table samples

◆ get_noise_scale()

double ossimplugins::RadiometricData::get_noise_scale ( )
inline


Thermal noise reference level

Definition at line 158 of file RadiometricData.h.

References _noise_scale.

159  {
160  return _noise_scale;
161  };
double _noise_scale
Thermal noise reference level

◆ get_offset()

double ossimplugins::RadiometricData::get_offset ( )
inline


Scaling offset

Definition at line 166 of file RadiometricData.h.

References _offset.

167  {
168  return _offset;
169  };
double _offset
Scaling offset

◆ get_samp_inc()

int ossimplugins::RadiometricData::get_samp_inc ( )
inline


Increment between table entries, range samples

Definition at line 143 of file RadiometricData.h.

References _samp_inc.

144  {
145  return _samp_inc;
146  };
int _samp_inc
Increment between table entries, range samples

◆ get_samp_type()

std::string ossimplugins::RadiometricData::get_samp_type ( )
inline


Sample type designator

Definition at line 136 of file RadiometricData.h.

References _samp_type.

137  {
138  return _samp_type;
139  };
std::string _samp_type
Sample type designator

◆ get_seq_num()

int ossimplugins::RadiometricData::get_seq_num ( )
inline

Record sequence number.

Definition at line 92 of file RadiometricData.h.

References _seq_num.

93  {
94  return _seq_num;
95  };
int _seq_num
Record sequence number.

◆ get_table_desig()

std::string ossimplugins::RadiometricData::get_table_desig ( )
inline


Table designator

Definition at line 122 of file RadiometricData.h.

References _table_desig.

123  {
124  return _table_desig;
125  };
std::string _table_desig
Table designator

◆ Instanciate()

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

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

Implements ossimplugins::RadarSatRecord.

Definition at line 60 of file RadiometricData.h.

References RadiometricData().

61  {
62  return new RadiometricData();
63  };

◆ operator=()

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

Copy operator.

Definition at line 157 of file RadiometricData.cpp.

References _calib_const, _chan_ind, _field_size, _lookup_tab, _n_data, _n_samp, _noise_scale, _offset, _samp_inc, _samp_type, _seq_num, and _table_desig.

158 {
159  _seq_num = rhs._seq_num;
160 
161  _n_data = rhs._n_data;
162 
163  _field_size = rhs._field_size;
164 
165  _chan_ind = rhs._chan_ind;
166 
167  _table_desig = rhs._table_desig;
168 
169  _n_samp = rhs._n_samp;
170 
171  _samp_type = rhs._samp_type;
172 
173  _samp_inc = rhs._samp_inc;
174 
175  for (int i=0;i<512;i++)
176  {
177  _lookup_tab[i] = rhs._lookup_tab[i];
178  }
179 
180  _noise_scale = rhs._noise_scale;
181 
182  _offset = rhs._offset;
183 
184  _calib_const = rhs._calib_const;
185 
186  return *this;
187 }
double _calib_const
Calibration constant
std::string _samp_type
Sample type designator
double _offset
Scaling offset
double _noise_scale
Thermal noise reference level
int _field_size
Field size in bytes
int _samp_inc
Increment between table entries, range samples
int _n_data
Number of data fields
std::string _chan_ind
SAR channel indicator.
int _n_samp
Number of lookup table samples
std::string _table_desig
Table designator
int _seq_num
Record sequence number.
double _lookup_tab[512]
Output scaling gain table

◆ Read()

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

Reads the class data from a stream.

Implements ossimplugins::RadarSatRecord.

Definition at line 76 of file RadiometricData.h.

77  {
78  is>>*this;
79  };

◆ Write()

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

Writes the class to a stream.

Implements ossimplugins::RadarSatRecord.

Definition at line 84 of file RadiometricData.h.

85  {
86  os<<*this;
87  };

Friends And Related Function Documentation

◆ operator<<

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

This function writes the RadiometricData in a stream.

Definition at line 25 of file RadiometricData.cpp.

26 {
27  os<<"seq_num:"<<data._seq_num<<std::endl;
28 
29  os<<"n_data:"<<data._n_data<<std::endl;
30 
31  os<<"field_size:"<<data._field_size<<std::endl;
32 
33  os<<"chan_ind:"<<data._chan_ind.c_str()<<std::endl;
34 
35  os<<"table_desig:"<<data._table_desig.c_str()<<std::endl;
36 
37  os<<"n_samp:"<<data._n_samp<<std::endl;
38 
39  os<<"samp_type:"<<data._samp_type.c_str()<<std::endl;
40 
41  os<<"samp_inc:"<<data._samp_inc<<std::endl;
42 
43  for (int i=0;i<512;i++)
44  {
45  os<<"lookup_tab["<<i<<"]:"<<data._lookup_tab[i]<<std::endl;
46  }
47 
48  os<<"noise_scale:"<<data._noise_scale<<std::endl;
49 
50  os<<"offset:"<<data._offset<<std::endl;
51 
52  os<<"calib_const:"<<data._calib_const<<std::endl;
53 
54  return os;
55 }

◆ operator>>

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

This function reads a RadiometricData from a stream.

Definition at line 57 of file RadiometricData.cpp.

58 {
59  char buf[1513];
60  buf[1512] = '\0';
61 
62 
63  is.read(buf,4);
64  buf[4] = '\0';
65  data._seq_num = atoi(buf);
66 
67  is.read(buf,4);
68  buf[4] = '\0';
69  data._n_data = atoi(buf);
70 
71  is.read(buf,8);
72  buf[8] = '\0';
73  data._field_size = atoi(buf);
74 
75  is.read(buf,4);
76  buf[4] = '\0';
77  data._chan_ind = buf;
78 
79  is.read(buf,4);
80 
81  is.read(buf,24);
82  buf[24] = '\0';
83  data._table_desig = buf;
84 
85  is.read(buf,8);
86  buf[8] = '\0';
87  data._n_samp = atoi(buf);
88 
89  is.read(buf,16);
90  buf[16] = '\0';
91  data._samp_type = buf;
92 
93  is.read(buf,4);
94  buf[4] = '\0';
95  data._samp_inc = atoi(buf);
96 
97  for (int i=0;i<512;i++)
98  {
99  is.read(buf,16);
100  buf[16] = '\0';
101  data._lookup_tab[i] = atof(buf);
102  }
103 
104  is.read(buf,4);
105 
106  is.read(buf,16);
107  buf[16] = '\0';
108  data._noise_scale = atof(buf);
109 
110  is.read(buf,16);
111 
112  is.read(buf,16);
113  buf[16] = '\0';
114  data._offset = atof(buf);
115 
116  is.read(buf,16);
117  buf[16] = '\0';
118  data._calib_const = atof(buf);
119 
120  is.read(buf,1512);
121 
122  return is;
123 }

Member Data Documentation

◆ _calib_const

double ossimplugins::RadiometricData::_calib_const
protected


Calibration constant

Definition at line 231 of file RadiometricData.h.

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

◆ _chan_ind

std::string ossimplugins::RadiometricData::_chan_ind
protected

SAR channel indicator.

Definition at line 196 of file RadiometricData.h.

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

◆ _field_size

int ossimplugins::RadiometricData::_field_size
protected


Field size in bytes

Definition at line 191 of file RadiometricData.h.

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

◆ _lookup_tab

double ossimplugins::RadiometricData::_lookup_tab[512]
protected


Output scaling gain table

Definition at line 217 of file RadiometricData.h.

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

◆ _n_data

int ossimplugins::RadiometricData::_n_data
protected


Number of data fields

Definition at line 187 of file RadiometricData.h.

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

◆ _n_samp

int ossimplugins::RadiometricData::_n_samp
protected


Number of lookup table samples

Definition at line 205 of file RadiometricData.h.

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

◆ _noise_scale

double ossimplugins::RadiometricData::_noise_scale
protected


Thermal noise reference level

Definition at line 222 of file RadiometricData.h.

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

◆ _offset

double ossimplugins::RadiometricData::_offset
protected

◆ _samp_inc

int ossimplugins::RadiometricData::_samp_inc
protected


Increment between table entries, range samples

Definition at line 213 of file RadiometricData.h.

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

◆ _samp_type

std::string ossimplugins::RadiometricData::_samp_type
protected


Sample type designator

Definition at line 209 of file RadiometricData.h.

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

◆ _seq_num

int ossimplugins::RadiometricData::_seq_num
protected

Record sequence number.

Definition at line 176 of file RadiometricData.h.

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

◆ _table_desig

std::string ossimplugins::RadiometricData::_table_desig
protected

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