isce3 0.25.0
Loading...
Searching...
No Matches
isce3::product::SubSwaths Class Reference

Sub-swaths metadata of a SAR dataset. More...

#include <SubSwaths.h>

Public Member Functions

 SubSwaths (const int length, const int width, const int n=1)
 Construct a new SubSwaths object.
 
 SubSwaths (const int length, const int width, const std::vector< isce3::core::Matrix< int > > &v)
 Construct a new SubSwaths object.
 
int numSubSwaths () const
 Get number of sub-swaths.
 
void numSubSwaths (const int n)
 Set number of sub-swaths.
 
const isce3::core::Matrix< int > & getValidSamplesArray (const int n) const
 Get valid samples for a sub-swath's array indexed from 1 (1st sub-swath)
 
void setValidSamplesArray (const int n, const isce3::core::Matrix< int > &v)
 Set valid samples for a sub-swath's array indexed from 1 (1st sub-swath)
 
const std::vector< isce3::core::Matrix< int > > & getValidSamplesArraysVect () const
 Get valid samples sub-swaths vector of arrays.
 
void setValidSamplesArraysVect (const std::vector< isce3::core::Matrix< int > > &v)
 Set valid samples sub-swaths vector of arrays.
 
int getSampleSubSwath (const int azimuth_index, const int range_index) const
 Test if a radar sample belongs to a sub-swath or if it is invalid.
 
int operator() (const int azimuth_index, const int range_index) const
 Test if a radar sample belongs to a sub-swath or if it is invalid.
 
int length () const
 Get the radar grid length.
 
void length (const int &t)
 Set the radar grid length.
 
int width () const
 Get the radar grid width.
 
void width (const int &t)
 Set the radar grid width.
 

Detailed Description

Sub-swaths metadata of a SAR dataset.

This class holds attributes of a SAR dataset such as arrays that indicate valid samples within each sub-swath. The class also provides a method (getSampleSubSwath()) to test if a given radar sample (identified by its associated range and azimuth index) belongs to a certain sub-swath or not, in which case the radar sample is considered invalid.

Constructor & Destructor Documentation

◆ SubSwaths() [1/2]

isce3::product::SubSwaths::SubSwaths ( const int length,
const int width,
const int n = 1 )
inline

Construct a new SubSwaths object.

Parameters
[in]lengthRadar grid length
[in]widthRadar grid width
[in]nNumber of sub-swaths

◆ SubSwaths() [2/2]

isce3::product::SubSwaths::SubSwaths ( const int length,
const int width,
const std::vector< isce3::core::Matrix< int > > & v )
inline

Construct a new SubSwaths object.

Parameters
[in]lengthRadar grid length
[in]widthRadar grid width
[in]vvector of arrays of dimensions Lx2 (for each sub-swath) indicating the indices of the first valid range sample and next sample after the last valid sample for each azimuth line.

Member Function Documentation

◆ getSampleSubSwath()

int isce3::product::SubSwaths::getSampleSubSwath ( const int azimuth_index,
const int range_index ) const

Test if a radar sample belongs to a sub-swath or if it is invalid.

Returns the 1-based index of the subswath that contains the pixel indexed by azimuth_index and range_index. If the pixel was not a member of any subswath, returns 0.

If the dataset does not have sub-swaths valid-samples metadata, the dataset is considered to have a single sub-swath and all samples are treated as belonging to that first sub-swath. If sub-swath valid-samples are not provided for an existing sub-swath s (i.e. that subswath vector is empty), all samples of that sub-swath s will be considered valid. If more than one sub-swath has no sub-swaths valid-samples information, only the first sub-swath without valid-samples information will be returned. If the index of the first valid range sample is greater than or equal to the index of the last valid sample, it is considered that the azimuth line does not have valid samples.

Parameters
[in]azimuth_indexAzimuth index
[in]range_indexRange index
Returns
The number of the first sub-swath that contains the radar sample, or zero, if the radar sample is invalid (i.e., not contained in any sub-swaths).

◆ getValidSamplesArray()

const isce3::core::Matrix< int > & isce3::product::SubSwaths::getValidSamplesArray ( const int n) const

Get valid samples for a sub-swath's array indexed from 1 (1st sub-swath)

Parameters
[in]nsubswath index (1-based)
Returns
array of dimensions Lx2 indicating the indices of the first valid range sample and next sample after the last valid range sample for each azimuth line of sub-swath n.

◆ getValidSamplesArraysVect()

const std::vector< isce3::core::Matrix< int > > & isce3::product::SubSwaths::getValidSamplesArraysVect ( ) const
inline

Get valid samples sub-swaths vector of arrays.

Returns
vector of arrays of dimensions Lx2 (for each sub-swath) indicating the indices of the first valid range sample and next sample after the last valid sample for each azimuth line. If the index of the first valid range sample is greater or equal to the index of the last valid sample, it is considered that the azimuth line does not have valid samples.

◆ operator()()

int isce3::product::SubSwaths::operator() ( const int azimuth_index,
const int range_index ) const
inline

Test if a radar sample belongs to a sub-swath or if it is invalid.

Returns the 1-based index of the subswath that contains the pixel indexed by azimuth_index and range_index. If the pixel was not a member of any subswath, returns 0.

If the dataset does not have sub-swaths valid-samples metadata, the dataset is considered to have a single sub-swath and all samples are treated as belonging to that first sub-swath. If sub-swath valid-samples are not provided for an existing sub-swath s (i.e. that subswath vector is empty), all samples of that sub-swath s will be considered valid. If more than one sub-swath has no sub-swaths valid-samples information, only the first sub-swath without valid-samples information will be returned. If the index of the first valid range sample is greater than or equal to the index of the last valid sample, it is considered that the azimuth line does not have valid samples.

Parameters
[in]azimuth_indexAzimuth index
[in]range_indexRange index
Returns
The number of the first sub-swath that contains the radar sample, or zero, if the radar sample is invalid (i.e., not contained in any sub-swaths).

◆ setValidSamplesArray()

void isce3::product::SubSwaths::setValidSamplesArray ( const int n,
const isce3::core::Matrix< int > & v )

Set valid samples for a sub-swath's array indexed from 1 (1st sub-swath)

Parameters
[in]nsubswath index (1-based)
[in]varray of dimensions Lx2 indicating the indices of the first valid range sample and next sample after the last valid range sample for each azimuth line of sub-swath n. If the index of the first valid range sample is greater or equal to the index of the last valid sample, it is considered that the azimuth line does not have valid samples.

◆ setValidSamplesArraysVect()

void isce3::product::SubSwaths::setValidSamplesArraysVect ( const std::vector< isce3::core::Matrix< int > > & v)
inline

Set valid samples sub-swaths vector of arrays.

Parameters
[in]vvector of arrays of dimensions Lx2 (for each sub-swath) indicating the indices of the first valid range sample and next sample after the last valid sample for each azimuth line. If the index of the first valid range sample is greater or equal to the index of the last valid sample, it is considered that the azimuth line does not have valid samples.

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

Generated for ISCE3.0 by doxygen 1.13.2.