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

This class is able to read the header of the Signal Data Records of the image file. More...

#include <AlosPalsarSignalData.h>

Inheritance diagram for ossimplugins::AlosPalsarSignalData:
ossimplugins::AlosPalsarRecord

Public Member Functions

 AlosPalsarSignalData ()
 Constructor. More...
 
virtual ~AlosPalsarSignalData ()
 Destructor. More...
 
 AlosPalsarSignalData (const AlosPalsarSignalData &rhs)
 Copy constructor. More...
 
AlosPalsarSignalDataoperator= (const AlosPalsarSignalData &rhs)
 Copy operator. More...
 
AlosPalsarRecordInstanciate ()
 This function is able to create a new instance of the class. More...
 
AlosPalsarRecordClone ()
 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)
 Read the class data from a stream. More...
 
void Write (std::ostream &os)
 Write the class to a stream. More...
 
int get_pulse_repetition_frequency () const
 
int get_slant_range_to_1st_data_sample () const
 
- Public Member Functions inherited from ossimplugins::AlosPalsarRecord
 AlosPalsarRecord (std::string mnemonic)
 Constructor. More...
 
virtual ~AlosPalsarRecord ()
 Destructor. More...
 
 AlosPalsarRecord (const AlosPalsarRecord &rhs)
 Copy constructor. More...
 
std::string get_mnemonic ()
 

Protected Attributes

int _pulse_repetition_frequency
 pulse_repetition_frequency More...
 
int _slant_range_to_1st_data_sample
 slant_range_to_1st_data_sample More...
 
- Protected Attributes inherited from ossimplugins::AlosPalsarRecord
std::string _mnemonic
 

Friends

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

Detailed Description

This class is able to read the header of the Signal Data Records of the image file.

Definition at line 29 of file AlosPalsarSignalData.h.

Constructor & Destructor Documentation

◆ AlosPalsarSignalData() [1/2]

ossimplugins::AlosPalsarSignalData::AlosPalsarSignalData ( )

Constructor.

Definition at line 21 of file AlosPalsarSignalData.cpp.

Referenced by Clone(), and Instanciate().

21  : AlosPalsarRecord("sar_sig_dat_rec")
22 {
23 }
AlosPalsarRecord(std::string mnemonic)
Constructor.

◆ ~AlosPalsarSignalData()

ossimplugins::AlosPalsarSignalData::~AlosPalsarSignalData ( )
virtual

Destructor.

Definition at line 25 of file AlosPalsarSignalData.cpp.

26 {
27 }

◆ AlosPalsarSignalData() [2/2]

ossimplugins::AlosPalsarSignalData::AlosPalsarSignalData ( const AlosPalsarSignalData rhs)

Copy constructor.

Definition at line 181 of file AlosPalsarSignalData.cpp.

181  :
182  AlosPalsarRecord(rhs),
183  _pulse_repetition_frequency(rhs._pulse_repetition_frequency),
184  _slant_range_to_1st_data_sample(rhs._slant_range_to_1st_data_sample)
185 {
186 }
int _pulse_repetition_frequency
pulse_repetition_frequency
int _slant_range_to_1st_data_sample
slant_range_to_1st_data_sample
AlosPalsarRecord(std::string mnemonic)
Constructor.

Member Function Documentation

◆ Clone()

AlosPalsarRecord* ossimplugins::AlosPalsarSignalData::Clone ( )
inlinevirtual

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

Implements ossimplugins::AlosPalsarRecord.

Definition at line 72 of file AlosPalsarSignalData.h.

References AlosPalsarSignalData().

73  {
74  return new AlosPalsarSignalData(*this);
75  };

◆ get_pulse_repetition_frequency()

int ossimplugins::AlosPalsarSignalData::get_pulse_repetition_frequency ( ) const
inline

Definition at line 94 of file AlosPalsarSignalData.h.

References _pulse_repetition_frequency.

Referenced by ossimplugins::AlosPalsarData::saveState().

95  {
97  };
int _pulse_repetition_frequency
pulse_repetition_frequency

◆ get_slant_range_to_1st_data_sample()

int ossimplugins::AlosPalsarSignalData::get_slant_range_to_1st_data_sample ( ) const
inline

Definition at line 99 of file AlosPalsarSignalData.h.

References _slant_range_to_1st_data_sample.

Referenced by ossimplugins::AlosPalsarData::saveState().

100  {
102  };
int _slant_range_to_1st_data_sample
slant_range_to_1st_data_sample

◆ Instanciate()

AlosPalsarRecord* ossimplugins::AlosPalsarSignalData::Instanciate ( )
inlinevirtual

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

Implements ossimplugins::AlosPalsarRecord.

Definition at line 64 of file AlosPalsarSignalData.h.

References AlosPalsarSignalData().

65  {
66  return new AlosPalsarSignalData();
67  };

◆ operator=()

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

Copy operator.

Definition at line 188 of file AlosPalsarSignalData.cpp.

References _pulse_repetition_frequency, and _slant_range_to_1st_data_sample.

189 {
190  _pulse_repetition_frequency = rhs._pulse_repetition_frequency;
191  _slant_range_to_1st_data_sample = rhs._slant_range_to_1st_data_sample;
192  return *this;
193 }
int _pulse_repetition_frequency
pulse_repetition_frequency
int _slant_range_to_1st_data_sample
slant_range_to_1st_data_sample

◆ Read()

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

Read the class data from a stream.

Implements ossimplugins::AlosPalsarRecord.

Definition at line 80 of file AlosPalsarSignalData.h.

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

◆ Write()

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

Write the class to a stream.

Implements ossimplugins::AlosPalsarRecord.

Definition at line 88 of file AlosPalsarSignalData.h.

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

Friends And Related Function Documentation

◆ operator<<

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

This function writes AlosPalsarSignalData to a stream.

Definition at line 29 of file AlosPalsarSignalData.cpp.

30 {
31  os << "_pulse_repetition_frequency:"
32  << data._pulse_repetition_frequency << std::endl;
33  os << "_slant_range_to_1st_data_sample:"
34  << data._slant_range_to_1st_data_sample << std::endl;
35 
36  return os;
37 }

◆ operator>>

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

This function reads to AlosPalsarSignalData from a stream.

Definition at line 39 of file AlosPalsarSignalData.cpp.

40 {
41  ossim_uint16 tmpuint16;
42  ossim_uint32 tmpuint32;
43  ossimEndian oe;
44 
45  is.read(reinterpret_cast<char*>(&tmpuint32), 4);
47  {
48  oe.swap(tmpuint32);
49  }
50 // std::cout << "Data line number = " << tmpuint32 << std::endl;
51 
52  is.read(reinterpret_cast<char*>(&tmpuint32), 4);
54  {
55  oe.swap(tmpuint32);
56  }
57 // std::cout << "Data record index = " << tmpuint32 << std::endl;
58 
59  is.read(reinterpret_cast<char*>(&tmpuint32), 4);
61  {
62  oe.swap(tmpuint32);
63  }
64 // std::cout << "Actual count of left-fill pixels = " << tmpuint32 << std::endl;
65 
66  is.read(reinterpret_cast<char*>(&tmpuint32), 4);
68  {
69  oe.swap(tmpuint32);
70  }
71 // std::cout << "Actual count of data pixels = " << tmpuint32 << std::endl;
72 
73  is.read(reinterpret_cast<char*>(&tmpuint32), 4);
75  {
76  oe.swap(tmpuint32);
77  }
78 // std::cout << "Actual count of right-fill pixels = " << tmpuint32 << std::endl;
79 
80  is.read(reinterpret_cast<char*>(&tmpuint32), 4);
82  {
83  oe.swap(tmpuint32);
84  }
85 // std::cout << "Sensor parameters update flag = " << tmpuint32 << std::endl;
86 
87  is.read(reinterpret_cast<char*>(&tmpuint32), 4);
89  {
90  oe.swap(tmpuint32);
91  }
92 // std::cout << "Scene start year = " << tmpuint32 << std::endl;
93 
94  is.read(reinterpret_cast<char*>(&tmpuint32), 4);
96  {
97  oe.swap(tmpuint32);
98  }
99 // std::cout << "Scene start day of year = " << tmpuint32 << std::endl;
100 
101  is.read(reinterpret_cast<char*>(&tmpuint32), 4);
103  {
104  oe.swap(tmpuint32);
105  }
106 // std::cout << "Sensor acquisition milliseconds of day = " << tmpuint32 << std::endl;
107 
108  is.read(reinterpret_cast<char*>(&tmpuint16), 2);
110  {
111  oe.swap(tmpuint16);
112  }
113 // std::cout << "SAR channel indicator = " << tmpuint16 << std::endl;
114 
115  is.read(reinterpret_cast<char*>(&tmpuint16), 2);
117  {
118  oe.swap(tmpuint16);
119  }
120 // std::cout << "SAR channel code = " << tmpuint16 << std::endl;
121 
122  is.read(reinterpret_cast<char*>(&tmpuint16), 2);
124  {
125  oe.swap(tmpuint16);
126  }
127 // std::cout << "Transmitted polarization = " << tmpuint16 << std::endl;
128 
129  is.read(reinterpret_cast<char*>(&tmpuint16), 2);
131  {
132  oe.swap(tmpuint16);
133  }
134 // std::cout << "Received polarization = " << tmpuint16 << std::endl;
135 
136  is.read(reinterpret_cast<char*>(&tmpuint32), 4);
138  {
139  oe.swap(tmpuint32);
140  }
141 // std::cout << "PRF (mHz) = " << tmpuint32 << std::endl;
142  data._pulse_repetition_frequency = static_cast<int>(tmpuint32);
143 
144  is.read(reinterpret_cast<char*>(&tmpuint32), 4);
146  {
147  oe.swap(tmpuint32);
148  }
149 // std::cout << "Scan ID for SCAN SAR mode = " << tmpuint32 << std::endl;
150 
151  is.read(reinterpret_cast<char*>(&tmpuint16), 2);
153  {
154  oe.swap(tmpuint16);
155  }
156 // std::cout << "Onboard range compressed flag = " << tmpuint16 << std::endl;
157 
158  is.seekg(50, std::ios_base::cur);
159 
160  is.read(reinterpret_cast<char*>(&tmpuint32), 4);
162  {
163  oe.swap(tmpuint32);
164  }
165 // std::cout << "Slant range to 1st data sample (m) = " << tmpuint32 << std::endl;
166  data._slant_range_to_1st_data_sample = static_cast<int>(tmpuint32);
167 
168  is.read(reinterpret_cast<char*>(&tmpuint32), 4);
170  {
171  oe.swap(tmpuint32);
172  }
173 // std::cout << "Data record window position = " << tmpuint32 << std::endl;
174 
175 // std::cout << std::endl << "File pointer location = " << is.tellg() << std::endl;
176 // std::cout << std::endl;
177 
178  return is;
179 }
unsigned short ossim_uint16
unsigned int ossim_uint32
ossimByteOrder getSystemEndianType() const
Definition: ossimEndian.h:78
void swap(ossim_sint8 &)
Definition: ossimEndian.h:26

Member Data Documentation

◆ _pulse_repetition_frequency

int ossimplugins::AlosPalsarSignalData::_pulse_repetition_frequency
protected

pulse_repetition_frequency

Definition at line 102 of file AlosPalsarSignalData.h.

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

◆ _slant_range_to_1st_data_sample

int ossimplugins::AlosPalsarSignalData::_slant_range_to_1st_data_sample
protected

slant_range_to_1st_data_sample

Definition at line 115 of file AlosPalsarSignalData.h.

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


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