| 
    Nori 
   | 
 
Weighted pixel storage for a rectangular subregion of an image. More...
#include <block.h>
Public Member Functions | |
| ImageBlock (const Vector2i &size, const ReconstructionFilter *filter) | |
| ~ImageBlock () | |
| Release all memory.   | |
| void | setOffset (const Point2i &offset) | 
| Configure the offset of the block within the main image.   | |
| const Point2i & | getOffset () const | 
| Return the offset of the block within the main image.   | |
| void | setSize (const Point2i &size) | 
| Configure the size of the block within the main image.   | |
| const Vector2i & | getSize () const | 
| Return the size of the block within the main image.   | |
| int | getBorderSize () const | 
| Return the border size in pixels.   | |
| Bitmap * | toBitmap () const | 
| Turn the block into a proper bitmap.   | |
| void | clear () | 
| Clear all contents.   | |
| void | put (const Point2f &pos, const Color3f &value) | 
| Record a sample with the given position and radiance value.   | |
| void | put (ImageBlock &b) | 
| Merge another image block into this one.   | |
| void | lock () const | 
| Lock the image block (using an internal mutex)   | |
| void | unlock () const | 
| Unlock the image block.   | |
| QString | toString () const | 
| Return a human-readable string summary.   | |
Protected Attributes | |
| Point2i | m_offset | 
| Vector2i | m_size | 
| int | m_borderSize | 
| float * | m_filter | 
| float | m_filterRadius | 
| float * | m_weightsX | 
| float * | m_weightsY | 
| float | m_lookupFactor | 
| QMutex | m_mutex | 
Weighted pixel storage for a rectangular subregion of an image.
This class implements storage for a rectangular subregion of a larger image that is being rendered. For each pixel, it records color values along with a weight that specifies the accumulated influence of nearby samples on the pixel (according to the used reconstruction filter).
When rendering with filters, the samples in a rectangular region will generally also contribute to pixels just outside of this region. For that reason, this class also stores information about a small border region around the rectangle, whose size depends on the properties of the reconstruction filter.
| ImageBlock::ImageBlock | ( | const Vector2i & | size, | 
| const ReconstructionFilter * | filter | ||
| ) | 
Create a new image block of the specified maximum size
| size | Desired maximum size of the block | 
| filter | Samples will be convolved with the image reconstruction filter provided here. | 
| ImageBlock::~ImageBlock | ( | ) | 
Release all memory.
| int ImageBlock::getBorderSize | ( | ) |  const [inline] | 
        
| const Point2i& ImageBlock::getOffset | ( | ) |  const [inline] | 
        
| const Vector2i& ImageBlock::getSize | ( | ) |  const [inline] | 
        
| void ImageBlock::lock | ( | ) |  const [inline] | 
        
| void ImageBlock::put | ( | ImageBlock & | b | ) | 
Merge another image block into this one.
During the merge operation, this function locks the destination block using a mutex.
Record a sample with the given position and radiance value.
| void ImageBlock::setOffset | ( | const Point2i & | offset | ) |  [inline] | 
        
| void ImageBlock::setSize | ( | const Point2i & | size | ) |  [inline] | 
        
| Bitmap* ImageBlock::toBitmap | ( | ) | const | 
Turn the block into a proper bitmap.
This entails normalizing all pixels and discarding the border region.
| QString ImageBlock::toString | ( | ) | const | 
Return a human-readable string summary.
| void ImageBlock::unlock | ( | ) |  const [inline] | 
        
int ImageBlock::m_borderSize [protected] | 
        
float* ImageBlock::m_filter [protected] | 
        
float ImageBlock::m_filterRadius [protected] | 
        
float ImageBlock::m_lookupFactor [protected] | 
        
QMutex ImageBlock::m_mutex [mutable, protected] | 
        
Point2i ImageBlock::m_offset [protected] | 
        
Vector2i ImageBlock::m_size [protected] | 
        
float* ImageBlock::m_weightsX [protected] | 
        
float * ImageBlock::m_weightsY [protected] |