CVB++ 14.0
LinearAccessData Class Referencefinal

Linear access properties. More...

#include <cvb/spectral/linear_access_data.hpp>

Public Member Functions

 LinearAccessData () noexcept=default
 Create a default linear access data set. More...
 
std::uintptr_t BasePtr () const noexcept
 Linear access base pointer. More...
 
std::intptr_t SampleInc () const noexcept
 Sample-increment for linear access. More...
 
std::intptr_t LineInc () const noexcept
 Line-increment for linear access. More...
 
std::intptr_t BandInc () const noexcept
 Band-increment for linear access. More...
 
template<class Type >
const Type & Value (int sample, int line, int band) const noexcept
 Gets a pixel value at a given position. More...
 
template<class Type >
Type & Value (int sample, int line, int band) noexcept
 Gets a settable pixel value at a given position. More...
 

Detailed Description

Linear access properties.

This object enables a fast pixel access to cubes

Constructor & Destructor Documentation

◆ LinearAccessData()

LinearAccessData ( )
defaultnoexcept

Create a default linear access data set.

Exceptions
Doesnot throw any exception.

Member Function Documentation

◆ BandInc()

std::intptr_t BandInc ( ) const
inlinenoexcept

Band-increment for linear access.

Returns
Band-increment
Exceptions
Doesnot throw any exception.
See also
BasePtr SampleInc LineInc

◆ BasePtr()

std::uintptr_t BasePtr ( ) const
inlinenoexcept

Linear access base pointer.

Returns
The base pointer.
Exceptions
Doesnot throw any exception.
See also
SampleInc LineInc BandInc

Remember that the increments to be added to the base pointer are given in bytes, not in pixels. BasePtr by design points to the pixel at location (0,0).

◆ LineInc()

std::intptr_t LineInc ( ) const
inlinenoexcept

Line-increment for linear access.

Returns
Line-increment
Exceptions
Doesnot throw any exception.
See also
BasePtr SampleInc BandInc

◆ SampleInc()

std::intptr_t SampleInc ( ) const
inlinenoexcept

Sample-increment for linear access.

Returns
Sample-increment
Exceptions
Doesnot throw any exception.
See also
BasePtr LineInc BandInc

◆ Value() [1/2]

const Type & Value ( int  sample,
int  line,
int  band 
) const
inlinenoexcept

Gets a pixel value at a given position.

Parameters
[in]sample
[in]line
[in]band
Returns
Typed readonly reference to the buffer view.
Exceptions
Doesnot throw any exception.

This method is for convenience not for performance.

◆ Value() [2/2]

Type & Value ( int  sample,
int  line,
int  band 
)
inlinenoexcept

Gets a settable pixel value at a given position.

Parameters
[in]sample
[in]line
[in]band
Returns
Typed writable reference to the buffer view.
Exceptions
Doesnot throw any exception.

This method is for convenience not for performance.