Mitsuba Renderer  0.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mitsuba::ReconstructionFilter Class Referenceabstract

Generic interface to separable image reconstruction filters. More...

#include <mitsuba/core/rfilter.h>

+ Inheritance diagram for mitsuba::ReconstructionFilter:

Public Types

enum  EBoundaryCondition {
  EClamp = 0, ERepeat, EMirror, EZero,
  EOne
}
 When resampling data to a different resolution using Resampler::resample(), this enumeration specifies how lookups outside of the input domain are handled. More...
 

Public Member Functions

Float getRadius () const
 Return the filter's width. More...
 
int getBorderSize () const
 Return the block border size required when rendering with this filter. More...
 
virtual Float eval (Float x) const =0
 Evaluate the filter function. More...
 
Float evalDiscretized (Float x) const
 Perform a lookup into the discretized version. More...
 
void serialize (Stream *stream, InstanceManager *manager) const
 Serialize the filter to a binary data stream. More...
 
void configure ()
 Configure the object (called once after construction) More...
 
virtual const ClassgetClass () const
 Retrieve this object's class. More...
 
- Public Member Functions inherited from mitsuba::ConfigurableObject
virtual void setParent (ConfigurableObject *parent)
 Notify the ConfigurableObject instance about its parent object. More...
 
virtual void addChild (const std::string &name, ConfigurableObject *child)
 Add a child (default implementation throws an error) More...
 
void addChild (ConfigurableObject *child)
 Add an unnamed child. More...
 
const std::string & getID () const
 Return the identifier associated with this instance (or "unnamed") More...
 
void setID (const std::string &name)
 Set the identifier associated with this instance. More...
 
const PropertiesgetProperties () const
 Return the properties object that was originally used to create this instance. More...
 
- Public Member Functions inherited from mitsuba::SerializableObject
 SerializableObject (Stream *stream, InstanceManager *manager)
 Unserialize a serializable object. 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...
 
virtual std::string toString () const
 Return a human-readable string representation of the object's contents. More...
 

Static Public Attributes

static Classm_theClass
 
- Static Public Attributes inherited from mitsuba::ConfigurableObject
static Classm_theClass
 
- Static Public Attributes inherited from mitsuba::SerializableObject
static Classm_theClass
 
- Static Public Attributes inherited from Object
static Classm_theClass
 Pointer to the object's class descriptor. More...
 

Protected Member Functions

 ReconstructionFilter (const Properties &props)
 Create a new reconstruction filter. More...
 
 ReconstructionFilter (Stream *stream, InstanceManager *manager)
 Unserialize a filter. More...
 
virtual ~ReconstructionFilter ()
 Virtual destructor. More...
 
- Protected Member Functions inherited from mitsuba::ConfigurableObject
virtual ~ConfigurableObject ()
 Virtual destructor. More...
 
 ConfigurableObject (const Properties &props)
 Construct a configurable object. More...
 
 ConfigurableObject (Stream *stream, InstanceManager *manager)
 Unserialize a configurable object. More...
 
- Protected Member Functions inherited from mitsuba::SerializableObject
 SerializableObject ()
 Construct a serializable object. More...
 
virtual ~SerializableObject ()
 Virtual deconstructor. More...
 
- Protected Member Functions inherited from Object
virtual ~Object ()
 Virtual private deconstructor. (Will only be called by ref) More...
 

Protected Attributes

Float m_radius
 
Float m_scaleFactor
 
Float m_values [31+1]
 
int m_borderSize
 
- Protected Attributes inherited from mitsuba::ConfigurableObject
Properties m_properties
 

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...
 

Detailed Description

Generic interface to separable image reconstruction filters.

When resampling bitmaps or adding radiance-valued samples to a rendering in progress, Mitsuba first convolves them with a so-called image reconstruction filter. Various kinds are implemented as subclasses of this interface.

Because image filters are generally too expensive to evaluate for each sample, the implementation of this class internally precomputes an discrete representation (resolution given by MTS_FILTER_RESOLUTION)

Member Enumeration Documentation

When resampling data to a different resolution using Resampler::resample(), this enumeration specifies how lookups outside of the input domain are handled.

See Also
Resampler
Enumerator
EClamp 

Clamp to the outermost sample position.

ERepeat 

Assume that the input repeats in a periodic fashion.

EMirror 

Assume that the input is mirrored along the boundary.

EZero 

Assume that the input function is zero outside of the defined domain.

EOne 

Assume that the input function is equal to one outside of the defined domain.

Constructor & Destructor Documentation

mitsuba::ReconstructionFilter::ReconstructionFilter ( const Properties props)
protected

Create a new reconstruction filter.

mitsuba::ReconstructionFilter::ReconstructionFilter ( Stream stream,
InstanceManager manager 
)
protected

Unserialize a filter.

virtual mitsuba::ReconstructionFilter::~ReconstructionFilter ( )
protectedvirtual

Virtual destructor.

Member Function Documentation

void mitsuba::ReconstructionFilter::configure ( )
virtual

Configure the object (called once after construction)

Reimplemented from mitsuba::ConfigurableObject.

virtual Float mitsuba::ReconstructionFilter::eval ( Float  x) const
pure virtual

Evaluate the filter function.

Float mitsuba::ReconstructionFilter::evalDiscretized ( Float  x) const
inline

Perform a lookup into the discretized version.

int mitsuba::ReconstructionFilter::getBorderSize ( ) const
inline

Return the block border size required when rendering with this filter.

virtual const Class* mitsuba::ReconstructionFilter::getClass ( ) const
virtual

Retrieve this object's class.

Reimplemented from mitsuba::ConfigurableObject.

Float mitsuba::ReconstructionFilter::getRadius ( ) const
inline

Return the filter's width.

void mitsuba::ReconstructionFilter::serialize ( Stream stream,
InstanceManager manager 
) const
virtual

Serialize the filter to a binary data stream.

Reimplemented from mitsuba::ConfigurableObject.

Member Data Documentation

int mitsuba::ReconstructionFilter::m_borderSize
protected
Float mitsuba::ReconstructionFilter::m_radius
protected
Float mitsuba::ReconstructionFilter::m_scaleFactor
protected
Class* mitsuba::ReconstructionFilter::m_theClass
static
Float mitsuba::ReconstructionFilter::m_values[31+1]
protected

The documentation for this class was generated from the following file: