3 #include "../global.hpp" 47 return reinterpret_cast<std::uintptr_t>(basePtr_);
95 const Type&
Value(
int sample,
int line,
int band)
const noexcept
97 return *reinterpret_cast<Type *>(basePtr_ + sample * sampleInc_ + line * lineInc_ + band * bandInc_);
111 template <
class Type>
112 Type&
Value(
int sample,
int line,
int band) noexcept
114 return *reinterpret_cast<Type*>(basePtr_ + sample * sampleInc_ + line * lineInc_ + band * bandInc_);
120 LinearAccessData(uintptr_t basePtr, intptr_t sampleInc, intptr_t lineInc, intptr_t bandInc) noexcept
121 : basePtr_(reinterpret_cast<std::uint8_t *>(basePtr))
122 , sampleInc_(sampleInc)
std::intptr_t LineInc() const noexcept
Line-increment for linear access.
Definition: linear_access_data.hpp:67
std::uintptr_t BasePtr() const noexcept
Linear access base pointer.
Definition: linear_access_data.hpp:45
Spectral Cube object.
Definition: cube.hpp:50
Root namespace for the Image Manager interface.
Definition: version.hpp:11
Linear access properties.
Definition: linear_access_data.hpp:20
const Type & Value(int sample, int line, int band) const noexcept
Gets a pixel value at a given position.
Definition: linear_access_data.hpp:95
Type & Value(int sample, int line, int band) noexcept
Gets a settable pixel value at a given position.
Definition: linear_access_data.hpp:112
LinearAccessData() noexcept=default
Create a default linear access data set.
std::intptr_t BandInc() const noexcept
Band-increment for linear access.
Definition: linear_access_data.hpp:78
std::intptr_t SampleInc() const noexcept
Sample-increment for linear access.
Definition: linear_access_data.hpp:56