Simple raster container.
More...
#include <BRAY_Raster.h>
|
| BRAY_Raster () |
|
| BRAY_Raster (exint xres, exint yres, PXL_Packing pack, PXL_DataFormat fmt, const void *raster=nullptr) |
|
| ~BRAY_Raster () |
|
void | setupReference (PXL_Raster &rp, bool for_write) const |
|
void | freeRaster () |
| Clear storage. More...
|
|
void | resize (exint xres, exint yres, PXL_Packing pack, PXL_DataFormat fmt) |
|
void | createFrom (const BRAY_Raster &rp) |
|
void | copyPropertiesFrom (const BRAY_Raster &rp) |
|
void | copyDataFrom (const BRAY_Raster &rp) |
|
void | copyDataFrom (const PXL_Raster &rp) |
|
void | zeroPixels () |
|
void | clearToFloat (float val) |
|
const void * | raster () const |
| Read access to the raster. More...
|
|
template<typename T > |
const T * | rasterAs () const |
| Read access to the raster as a given type. More...
|
|
void * | writeRaster () |
| Write access to the raster. More...
|
|
template<typename T > |
T * | writeRasterAs () |
| Write access to the raster as a given type. More...
|
|
const void * | scanline (exint y) const |
| Read access to a given scanline. More...
|
|
const void * | pixel (exint x, exint y) const |
| Read access to a given pixel. More...
|
|
template<typename T > |
const T * | pixelAs (exint x, exint y) const |
| Read access to a given pixel as a given type. More...
|
|
void * | writePixel (exint x, exint y) const |
| Write access to a given pixel. More...
|
|
template<typename T > |
T * | writePixelAs (exint x, exint y) const |
| Write access to a given pixel as a given type. More...
|
|
bool | isValid () const |
|
bool | isWritable () const |
|
void | makeWriteable () |
|
PXL_Packing | packing () const |
|
PXL_DataFormat | dataFormat () const |
|
exint | npixels () const |
|
exint | nchannels () const |
|
exint | xres () const |
|
exint | yres () const |
|
exint | pixelBytes () const |
|
exint | scanBytes () const |
|
exint | imageBytes () const |
|
void | setStorage (PXL_Packing pack, PXL_DataFormat fmt) |
|
void | dump () const |
|
void | dump (UT_JSONWriter &w) const |
|
bool | checkpoint (UT_JSONWriter &w) const |
|
bool | loadCheckpoint (UT_JSONParser &p) |
|
UT_InclusiveRect | findDataWindow () const |
| Find the window where non-zero data exists. More...
|
|
int64 | getMemoryUsage () const |
|
bool | save (const char *filename) const |
|
Simple raster container.
Definition at line 30 of file BRAY_Raster.h.
BRAY_Raster::BRAY_Raster |
( |
| ) |
|
|
inline |
Construct a raster. It's possible to have a reference to external raster data instead of allocating a raster.
Definition at line 35 of file BRAY_Raster.h.
BRAY_Raster::~BRAY_Raster |
( |
| ) |
|
|
inline |
void BRAY_Raster::dump |
( |
| ) |
const |
Find the window where non-zero data exists.
void BRAY_Raster::freeRaster |
( |
| ) |
|
int64 BRAY_Raster::getMemoryUsage |
( |
| ) |
const |
|
inline |
exint BRAY_Raster::imageBytes |
( |
| ) |
const |
|
inline |
bool BRAY_Raster::isValid |
( |
| ) |
const |
|
inline |
bool BRAY_Raster::isWritable |
( |
| ) |
const |
|
inline |
void BRAY_Raster::makeWriteable |
( |
| ) |
|
static int64 BRAY_Raster::memoryUsed |
( |
| ) |
|
|
static |
exint BRAY_Raster::nchannels |
( |
| ) |
const |
|
inline |
exint BRAY_Raster::npixels |
( |
| ) |
const |
|
inline |
static int64 BRAY_Raster::peakMemoryUsed |
( |
| ) |
|
|
static |
template<typename T >
const T* BRAY_Raster::pixelAs |
( |
exint |
x, |
|
|
exint |
y |
|
) |
| const |
|
inline |
Read access to a given pixel as a given type.
Definition at line 173 of file BRAY_Raster.h.
exint BRAY_Raster::pixelBytes |
( |
| ) |
const |
|
inline |
const void* BRAY_Raster::raster |
( |
| ) |
const |
|
inline |
template<typename T >
const T* BRAY_Raster::rasterAs |
( |
| ) |
const |
|
inline |
Read access to the raster as a given type.
Definition at line 145 of file BRAY_Raster.h.
bool BRAY_Raster::save |
( |
const char * |
filename | ) |
const |
exint BRAY_Raster::scanBytes |
( |
| ) |
const |
|
inline |
const void* BRAY_Raster::scanline |
( |
exint |
y | ) |
const |
|
inline |
void BRAY_Raster::setupReference |
( |
PXL_Raster & |
rp, |
|
|
bool |
for_write |
|
) |
| const |
Set up a PXL_Raster to reference the data in this raster. If you need to write to the PXL_Raster, for_write
should be true. This will assert that isWritable()
is also true.
template<typename T >
T* BRAY_Raster::writePixelAs |
( |
exint |
x, |
|
|
exint |
y |
|
) |
| const |
|
inline |
Write access to a given pixel as a given type.
Definition at line 187 of file BRAY_Raster.h.
void* BRAY_Raster::writeRaster |
( |
| ) |
|
|
inline |
template<typename T >
T* BRAY_Raster::writeRasterAs |
( |
| ) |
|
|
inline |
Write access to the raster as a given type.
Definition at line 158 of file BRAY_Raster.h.
exint BRAY_Raster::xres |
( |
| ) |
const |
|
inline |
exint BRAY_Raster::yres |
( |
| ) |
const |
|
inline |
void BRAY_Raster::zeroPixels |
( |
| ) |
|
|
inline |
The documentation for this class was generated from the following file: