Image Utilities (IU)
 All Data Structures Namespaces Functions Variables Typedefs Enumerations Friends Groups Pages
Public Member Functions
iu::OpenEXROutputFile Class Reference

Interfaces the OpenEXR library with the Imageutilities. More...

#include <openexrio.h>

Public Member Functions

 OpenEXROutputFile (const std::string &filename, iu::Size< 2 > size)
 OpenEXROutputFile constructor. Opens a file for writing. More...
 
void add_channel (const std::string &name, iu::ImageCpu_8u_C1 &img)
 add the channel name with image data img to the OpenEXR file. unsigned char data will be converted to uint32. More...
 
void add_channel (const std::string &name, iu::ImageCpu_32u_C1 &img)
 add the channel name with image data img to the OpenEXR file. More...
 
void add_channel (const std::string &name, iu::ImageCpu_32f_C1 &img)
 add the channel name with image data img to the OpenEXR file. More...
 
void add_channel (const std::string &name1, const std::string &name2, iu::ImageCpu_32f_C2 &img)
 Convenience method to add a 2-channel image to the OpenEXR file. More...
 
void add_channel (const std::string &name1, const std::string &name2, const std::string &name3, const std::string &name4, iu::ImageCpu_32f_C4 &img)
 Convenience method to add a 4-channel image to the OpenEXR file. More...
 
void add_channel (const std::string &name, iu::ImageGpu_32f_C1 &img)
 GPU version of add_channel. More...
 
void add_channel (const std::string &name1, const std::string &name2, iu::ImageGpu_32f_C2 &img)
 GPU version of add_channel. More...
 
void add_channel (const std::string &name1, const std::string &name2, const std::string &name3, const std::string &name4, iu::ImageGpu_32f_C4 &img)
 GPU version of add_channel. More...
 
void add_attribute (const std::string &name, Eigen::Ref< Eigen::Matrix3f > mat)
 add a 3x3 matrix attribute to the OpenEXR file More...
 
void add_attribute (const std::string &name, Eigen::Ref< Eigen::Matrix4f > mat)
 add a 4x4 matrix attribute to the OpenEXR file More...
 
void write ()
 Write to disk. Call this function once all channels/attributes have been added.
 

Detailed Description

Interfaces the OpenEXR library with the Imageutilities.

Constructing an OpenEXROutputFile requires the filename and image size. Data is added through various add_channel and add_attribute methods. Note that write has to be called explicitly to write the data to disk.

Todo:
what happens if write is called multiple times?

Constructor & Destructor Documentation

iu::OpenEXROutputFile::OpenEXROutputFile ( const std::string &  filename,
iu::Size< 2 >  size 
)

OpenEXROutputFile constructor. Opens a file for writing.

Parameters
filenamename of the file.
sizesize of the image.

Member Function Documentation

void iu::OpenEXROutputFile::add_attribute ( const std::string &  name,
Eigen::Ref< Eigen::Matrix3f >  mat 
)

add a 3x3 matrix attribute to the OpenEXR file

Parameters
nameattribute name
matA 3x3 matrix
void iu::OpenEXROutputFile::add_attribute ( const std::string &  name,
Eigen::Ref< Eigen::Matrix4f >  mat 
)

add a 4x4 matrix attribute to the OpenEXR file

Parameters
nameattribute name
matA 4x4 matrix
void iu::OpenEXROutputFile::add_channel ( const std::string &  name,
iu::ImageCpu_8u_C1 img 
)

add the channel name with image data img to the OpenEXR file. unsigned char data will be converted to uint32.

Parameters
namename of the channel (must not exist already)
imgImage
void iu::OpenEXROutputFile::add_channel ( const std::string &  name,
iu::ImageCpu_32u_C1 img 
)

add the channel name with image data img to the OpenEXR file.

Parameters
namename of the channel (must not exist already)
imgImage
void iu::OpenEXROutputFile::add_channel ( const std::string &  name,
iu::ImageCpu_32f_C1 img 
)

add the channel name with image data img to the OpenEXR file.

Parameters
namename of the channel (must not exist already)
imgImage
void iu::OpenEXROutputFile::add_channel ( const std::string &  name1,
const std::string &  name2,
iu::ImageCpu_32f_C2 img 
)

Convenience method to add a 2-channel image to the OpenEXR file.

Parameters
name1name of first channel
name2name of second channel
imgImage
void iu::OpenEXROutputFile::add_channel ( const std::string &  name1,
const std::string &  name2,
const std::string &  name3,
const std::string &  name4,
iu::ImageCpu_32f_C4 img 
)

Convenience method to add a 4-channel image to the OpenEXR file.

Parameters
name1channel name
name2channel name
name3channel name
name4channel name
imgImage
void iu::OpenEXROutputFile::add_channel ( const std::string &  name,
iu::ImageGpu_32f_C1 img 
)

GPU version of add_channel.

Parameters
namechannel name
imgImage
void iu::OpenEXROutputFile::add_channel ( const std::string &  name1,
const std::string &  name2,
iu::ImageGpu_32f_C2 img 
)

GPU version of add_channel.

Parameters
name1channel name
name2channel name
imgImage
void iu::OpenEXROutputFile::add_channel ( const std::string &  name1,
const std::string &  name2,
const std::string &  name3,
const std::string &  name4,
iu::ImageGpu_32f_C4 img 
)

GPU version of add_channel.

Parameters
name1channel name
name2channel name
name3channel name
name4channel name
imgImage

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