radarlib 1.4.6
OdimH5v20::RayMatrix< T > Class Template Reference

OdimH5 rays matrix. More...

#include <radarlib/odimh5v20_support.hpp>

Inheritance diagram for OdimH5v20::RayMatrix< T >:
OdimH5v20::DataMatrix< T >

Public Member Functions

 RayMatrix ()
 
 RayMatrix (int rays, int bins)
 
 RayMatrix (int rays, int bins, T fillvalue)
 
void resize (const int rays, const int bins)
 Resize the matrix.
 
void resize (const int rays, const int bins, const T fillvalue)
 Resize the matrix.
 
int getRayCount () const
 Get the number of rays that can be store in the matrix (matrix rows num)
 
int getBinCount () const
 Get the number of bins that can be store in a single ray (matrix cols num)
 
void erase ()
 Set all matrix values to the current fill value.
 
void fill (T value)
 Set all matrix values to the given value.
 
T & elem (const int r, const int b)
 Reference to the element (r,b)
 
const T * get () const
 Return the pointer to the underneath data buffer.
 
int getRowCount () const
 Return the number of rows.
 
int getColCount () const
 Return the number of cols.
 

Detailed Description

template<class T>
class OdimH5v20::RayMatrix< T >

OdimH5 rays matrix.

This class represent a collection of rays stored as a matrix
The rows are the single rays. The rows elements are the bins values of the single ray The type of every value in the matrix is defined by the user using the template syntax
The internal data buffer is automatically allocated and deallocated The matrix can be resized but the previous values will be lost and the elements will be set to 0 or to the fill value specified in the constructor

See also
PolarScanData
Examples
create_odim_object.cpp, create_polar_volume.cpp, read_polar_volume.cpp, and read_polar_volume2.cpp.

Constructor & Destructor Documentation

◆ RayMatrix() [1/3]

template<class T >
OdimH5v20::RayMatrix< T >::RayMatrix ( )
\brief Create a matrix with no rays

Create an empty matrix with nor rays

The default fill value for resize operations will be 0

◆ RayMatrix() [2/3]

template<class T >
OdimH5v20::RayMatrix< T >::RayMatrix ( int rays,
int bins )
\brief Create a matrix to store a ray collection

Create an empty matrix large enough to store the given number of rays. 

Each ray can store the given number of bins The default fill value for resize operations will be 0

Parameters
raysnumber of rays
binsnumber of bins in a single ray

◆ RayMatrix() [3/3]

template<class T >
OdimH5v20::RayMatrix< T >::RayMatrix ( int rays,
int bins,
T fillvalue )
\brief Create a matrix to store a ray collection

Create an empty matrix large enough to store the given number of rays. 

Each ray can store the given number of bins The given fillvalue will be used for resize operations

Parameters
raysnumber of rays
binsnumber of bins in a single ray
fillvaluenumber of bins in a single ray

Member Function Documentation

◆ resize() [1/2]

template<class T >
void OdimH5v20::RayMatrix< T >::resize ( const int rays,
const int bins )

Resize the matrix.

Resize the ray matrix The previous matrix data will be erased and filled with the default fill value

Parameters
raysthe new rows number
binsthe new cols number

◆ resize() [2/2]

template<class T >
void OdimH5v20::RayMatrix< T >::resize ( const int rays,
const int bins,
const T fillvalue )

Resize the matrix.

Resize the ray matrix and set the new default fill value The previous matrix data will be erased and filled with the new fill value

Parameters
raysthe new rays number
binsthe new bins number
fillvaluethe new fill value to use

◆ getRayCount()

template<class T >
int OdimH5v20::RayMatrix< T >::getRayCount ( ) const

Get the number of rays that can be store in the matrix (matrix rows num)

◆ getBinCount()

template<class T >
int OdimH5v20::RayMatrix< T >::getBinCount ( ) const

Get the number of bins that can be store in a single ray (matrix cols num)

◆ erase()

template<class T >
void OdimH5v20::DataMatrix< T >::erase ( )
inherited

Set all matrix values to the current fill value.

◆ fill()

template<class T >
void OdimH5v20::DataMatrix< T >::fill ( T value)
inherited

Set all matrix values to the given value.

◆ elem()

template<class T >
T & OdimH5v20::DataMatrix< T >::elem ( const int r,
const int b )
inherited

Reference to the element (r,b)

Parameters
rrow index from 0 to rows-1
bcol index from 0 to cols-1
Examples
create_odim_object.cpp, create_polar_volume.cpp, read_polar_volume.cpp, and read_polar_volume2.cpp.

◆ get()

template<class T >
const T * OdimH5v20::DataMatrix< T >::get ( ) const
inherited

Return the pointer to the underneath data buffer.

◆ getRowCount()

template<class T >
int OdimH5v20::DataMatrix< T >::getRowCount ( ) const
inherited

Return the number of rows.

◆ getColCount()

template<class T >
int OdimH5v20::DataMatrix< T >::getColCount ( ) const
inherited

Return the number of cols.


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