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

Abstract film base class - used to store samples generated by Integrator implementations. More...

#include <mitsuba/render/film.h>

+ Inheritance diagram for mitsuba::Film:

Public Member Functions

const Vector2igetSize () const
 Ignoring the crop window, return the resolution of the underlying sensor. More...
 
const Vector2igetCropSize () const
 Return the size of the crop window. More...
 
const Point2igetCropOffset () const
 Return the offset of the crop window. More...
 
virtual void clear ()=0
 Clear the film. More...
 
virtual void put (const ImageBlock *block)=0
 Merge an image block into the film. More...
 
virtual void setBitmap (const Bitmap *bitmap, Float multiplier=1.0f)=0
 Overwrite the film with the given bitmap and optionally multiply it by a scalar. More...
 
virtual void addBitmap (const Bitmap *bitmap, Float multiplier=1.0f)=0
 Accumulate a bitmap on top of the radiance values stored in the film. More...
 
virtual void setDestinationFile (const fs::path &filename, uint32_t blockSize)=0
 Set the target filename (with or without extension) More...
 
virtual void develop (const Scene *scene, Float renderTime)=0
 Develop the film and write the result to the previously specified filename. More...
 
virtual bool develop (const Point2i &offset, const Vector2i &size, const Point2i &targetOffset, Bitmap *target) const =0
 Develop the contents of a subregion of the film and store it inside the given bitmap. More...
 
virtual bool destinationExists (const fs::path &basename) const =0
 Does the destination file already exist? More...
 
bool hasHighQualityEdges () const
 
virtual bool hasAlpha () const =0
 Return whether or not this film records the alpha channel. More...
 
ReconstructionFiltergetReconstructionFilter ()
 Return the image reconstruction filter. More...
 
const ReconstructionFiltergetReconstructionFilter () const
 Return the image reconstruction filter (const version) More...
 
virtual const ClassgetClass () const
 Retrieve this object's class. More...
 
ConfigurableObject interface
virtual void addChild (const std::string &name, ConfigurableObject *child)
 Add a child node. More...
 
void addChild (ConfigurableObject *child)
 Add an unnamed child. More...
 
virtual void configure ()
 Configure the film. More...
 
virtual void serialize (Stream *stream, InstanceManager *manager) const
 Serialize this film to a binary data stream. More...
 
- Public Member Functions inherited from mitsuba::ConfigurableObject
virtual void setParent (ConfigurableObject *parent)
 Notify the ConfigurableObject instance about its parent object. 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

 Film (const Properties &props)
 Create a film. More...
 
 Film (Stream *stream, InstanceManager *manager)
 Unserialize a film. More...
 
virtual ~Film ()
 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

Point2i m_cropOffset
 
Vector2i m_size
 
Vector2i m_cropSize
 
bool m_highQualityEdges
 
ref< ReconstructionFilterm_filter
 
- 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

Abstract film base class - used to store samples generated by Integrator implementations.

To avoid lock-related bottlenecks when rendering with many cores, rendering threads first store results in an "image block", which is then committed to the film.

Constructor & Destructor Documentation

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

Create a film.

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

Unserialize a film.

virtual mitsuba::Film::~Film ( )
protectedvirtual

Virtual destructor.

Member Function Documentation

virtual void mitsuba::Film::addBitmap ( const Bitmap bitmap,
Float  multiplier = 1.0f 
)
pure virtual

Accumulate a bitmap on top of the radiance values stored in the film.

virtual void mitsuba::Film::addChild ( const std::string &  name,
ConfigurableObject child 
)
virtual

Add a child node.

Reimplemented from mitsuba::ConfigurableObject.

void mitsuba::Film::addChild ( ConfigurableObject child)
inline

Add an unnamed child.

virtual void mitsuba::Film::clear ( )
pure virtual

Clear the film.

virtual void mitsuba::Film::configure ( )
virtual

Configure the film.

Reimplemented from mitsuba::ConfigurableObject.

virtual bool mitsuba::Film::destinationExists ( const fs::path &  basename) const
pure virtual

Does the destination file already exist?

virtual void mitsuba::Film::develop ( const Scene scene,
Float  renderTime 
)
pure virtual

Develop the film and write the result to the previously specified filename.

virtual bool mitsuba::Film::develop ( const Point2i offset,
const Vector2i size,
const Point2i targetOffset,
Bitmap target 
) const
pure virtual

Develop the contents of a subregion of the film and store it inside the given bitmap.

This may fail when the film does not have an explicit representation of the bitmap in question (e.g. when it is writing to a tiled EXR image)

Returns
true upon success
virtual const Class* mitsuba::Film::getClass ( ) const
virtual

Retrieve this object's class.

Reimplemented from mitsuba::ConfigurableObject.

const Point2i& mitsuba::Film::getCropOffset ( ) const
inline

Return the offset of the crop window.

const Vector2i& mitsuba::Film::getCropSize ( ) const
inline

Return the size of the crop window.

ReconstructionFilter* mitsuba::Film::getReconstructionFilter ( )
inline

Return the image reconstruction filter.

const ReconstructionFilter* mitsuba::Film::getReconstructionFilter ( ) const
inline

Return the image reconstruction filter (const version)

const Vector2i& mitsuba::Film::getSize ( ) const
inline

Ignoring the crop window, return the resolution of the underlying sensor.

virtual bool mitsuba::Film::hasAlpha ( ) const
pure virtual

Return whether or not this film records the alpha channel.

bool mitsuba::Film::hasHighQualityEdges ( ) const
inline

Should regions slightly outside the image plane be sampled to improve the quality of the reconstruction at the edges? This only makes sense when reconstruction filters other than the box filter are used.

virtual void mitsuba::Film::put ( const ImageBlock block)
pure virtual

Merge an image block into the film.

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

Serialize this film to a binary data stream.

Reimplemented from mitsuba::ConfigurableObject.

virtual void mitsuba::Film::setBitmap ( const Bitmap bitmap,
Float  multiplier = 1.0f 
)
pure virtual

Overwrite the film with the given bitmap and optionally multiply it by a scalar.

virtual void mitsuba::Film::setDestinationFile ( const fs::path &  filename,
uint32_t  blockSize 
)
pure virtual

Set the target filename (with or without extension)

Member Data Documentation

Point2i mitsuba::Film::m_cropOffset
protected
Vector2i mitsuba::Film::m_cropSize
protected
ref<ReconstructionFilter> mitsuba::Film::m_filter
protected
bool mitsuba::Film::m_highQualityEdges
protected
Vector2i mitsuba::Film::m_size
protected
Class* mitsuba::Film::m_theClass
static

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