Storage for an image sub-block (a.k.a render bucket) More...
#include <mitsuba/render/imageblock.h>
Inheritance diagram for mitsuba::ImageBlock:Public Member Functions | |
| ImageBlock (Bitmap::EPixelFormat fmt, const Vector2i &size, const ReconstructionFilter *filter=NULL, int channels=-1, bool warn=true) | |
| void | setOffset (const Point2i &offset) |
| Set the current block offset. More... | |
| const Point2i & | getOffset () const |
| Return the current block offset. More... | |
| void | setSize (const Vector2i &size) |
| Set the current block size. More... | |
| const Vector2i & | getSize () const |
| Return the current block size. More... | |
| int | getWidth () const |
| Return the bitmap's width in pixels. More... | |
| int | getHeight () const |
| Return the bitmap's height in pixels. More... | |
| bool | getWarn () const |
| Warn when writing bad sample values? More... | |
| void | setWarn (bool warn) |
| Warn when writing bad sample values? More... | |
| int | getBorderSize () const |
| Return the border region used by the reconstruction filter. More... | |
| int | getChannelCount () const |
| Return the number of channels stored by the image block. More... | |
| Bitmap::EPixelFormat | getPixelFormat () const |
| Return the underlying pixel format. More... | |
| Bitmap * | getBitmap () |
| Return a pointer to the underlying bitmap representation. More... | |
| const Bitmap * | getBitmap () const |
| Return a pointer to the underlying bitmap representation (const version) More... | |
| void | clear () |
| Clear everything to zero. More... | |
| void | put (const ImageBlock *block) |
| Accumulate another image block into this one. More... | |
| FINLINE bool | put (const Point2 &pos, const Spectrum &spec, Float alpha) |
| Store a single sample inside the image block. More... | |
| FINLINE bool | put (const Point2 &_pos, const Float *value) |
| Store a single sample inside the block. More... | |
| ref< ImageBlock > | clone () const |
| Create a clone of the entire image block. More... | |
| void | copyTo (ImageBlock *copy) const |
| Copy the contents of this image block to another one with the same configuration. More... | |
| virtual const Class * | getClass () const |
| Retrieve this object's class. More... | |
Implementation of the WorkResult interface | |
| void | load (Stream *stream) |
| Fill the work result with content acquired from a binary data stream. More... | |
| void | save (Stream *stream) const |
| Serialize a work result to a binary data stream. More... | |
| std::string | toString () const |
| Return a string representation. More... | |
Public Member Functions inherited from Object | |
| Object () | |
| Construct a new object. More... | |
| int | getRefCount () const |
| Return the current reference count. More... | |
| void | incRef () const |
| Increase the reference count of the object by one. More... | |
| void | decRef (bool autoDeallocate=true) const |
| Decrease the reference count of the object and possibly deallocate it. More... | |
Static Public Attributes | |
| static Class * | m_theClass |
Static Public Attributes inherited from mitsuba::WorkResult | |
| static Class * | m_theClass |
Static Public Attributes inherited from Object | |
| static Class * | m_theClass |
| Pointer to the object's class descriptor. More... | |
Protected Member Functions | |
| virtual | ~ImageBlock () |
| Virtual destructor. More... | |
Protected Member Functions inherited from mitsuba::WorkResult | |
| virtual | ~WorkResult () |
| Virtual destructor. More... | |
Protected Member Functions inherited from Object | |
| virtual | ~Object () |
| Virtual private deconstructor. (Will only be called by ref) More... | |
Protected Attributes | |
| ref< Bitmap > | m_bitmap |
| Point2i | m_offset |
| Vector2i | m_size |
| int | m_borderSize |
| const ReconstructionFilter * | m_filter |
| Float * | m_weightsX |
| Float * | m_weightsY |
| bool | m_warn |
Additional Inherited Members | |
Static Public Member Functions inherited from Object | |
| static void | staticInitialization () |
| Initializes the built-in reference count debugger (if enabled) More... | |
| static void | staticShutdown () |
| Free the memory taken by staticInitialization() More... | |
Storage for an image sub-block (a.k.a render bucket)
This class is used by image-based parallel processes and encapsulates computed rectangular regions of an image. This allows for easy and efficient distributed rendering of large images. Image blocks usually also include a border region storing contribuctions that are slightly outside of the block, which is required to support image reconstruction filters.
| mitsuba::ImageBlock::ImageBlock | ( | Bitmap::EPixelFormat | fmt, |
| const Vector2i & | size, | ||
| const ReconstructionFilter * | filter = NULL, |
||
| int | channels = -1, |
||
| bool | warn = true |
||
| ) |
Construct a new image block of the requested properties
| fmt | Specifies the pixel format – see Bitmap::EPixelFormat for a list of possibilities |
| size | Specifies the block dimensions (not accounting for additional border pixels required to support image reconstruction filters) |
| channels | Specifies the number of output channels. This is only necessary when Bitmap::EMultiChannel is chosen as the pixel format |
| warn | Warn when writing bad sample values? |
|
protectedvirtual |
Virtual destructor.
|
inline |
Clear everything to zero.
|
inline |
Create a clone of the entire image block.
|
inline |
Copy the contents of this image block to another one with the same configuration.
|
inline |
Return a pointer to the underlying bitmap representation.
|
inline |
Return a pointer to the underlying bitmap representation (const version)
|
inline |
Return the border region used by the reconstruction filter.
|
inline |
Return the number of channels stored by the image block.
|
virtual |
Retrieve this object's class.
Reimplemented from mitsuba::WorkResult.
|
inline |
Return the bitmap's height in pixels.
|
inline |
Return the current block offset.
|
inline |
Return the underlying pixel format.
|
inline |
Return the current block size.
|
inline |
Warn when writing bad sample values?
|
inline |
Return the bitmap's width in pixels.
|
virtual |
Fill the work result with content acquired from a binary data stream.
Implements mitsuba::WorkResult.
|
inline |
Accumulate another image block into this one.
|
inline |
Store a single sample inside the image block.
This variant assumes that the image block stores spectrum, alpha, and reconstruction filter weight values.
| pos | Denotes the sample position in fractional pixel coordinates |
| spec | Spectrum value assocated with the sample |
| alpha | Alpha value assocated with the sample |
false if one of the sample values was invalid, e.g. NaN or negative. A warning is also printed in this case Store a single sample inside the block.
| _pos | Denotes the sample position in fractional pixel coordinates |
| value | Pointer to an array containing each channel of the sample values. The array must match the length given by getChannelCount() |
false if one of the sample values was invalid, e.g. NaN or negative. A warning is also printed in this case
|
virtual |
Serialize a work result to a binary data stream.
Implements mitsuba::WorkResult.
|
inline |
Set the current block offset.
|
inline |
Set the current block size.
|
inline |
Warn when writing bad sample values?
|
virtual |
Return a string representation.
Implements mitsuba::WorkResult.
|
protected |
|
protected |
|
protected |
|
protected |
|
static |
|
protected |
|
protected |
|
protected |