7 #include <ImfOutputFile.h>
8 #include <ImfInputFile.h>
9 #include <ImfChannelList.h>
10 #include <ImfMatrixAttribute.h>
12 #include "../iucore.h"
15 #include <eigen3/Eigen/Dense>
49 Channel(
const std::string& name,
const std::string& type) {
128 void read_attribute(
const std::string& name, Eigen::Ref<Eigen::Matrix3f> mat);
135 void read_attribute(
const std::string& name, Eigen::Ref<Eigen::Matrix4f> mat);
140 std::string filename_;
141 std::vector<Channel> channels_;
142 std::map<Imf::PixelType, std::string> pixeltype_to_string_;
203 void add_channel(
const std::string& name1,
const std::string& name2,
229 void add_channel(
const std::string& name1,
const std::string& name2,
238 void add_attribute(
const std::string& name, Eigen::Ref<Eigen::Matrix3f> mat);
245 void add_attribute(
const std::string& name, Eigen::Ref<Eigen::Matrix4f> mat);
254 bool check_channel_name(
const std::string& name);
255 bool check_attachement_name(
const std::string& name);
258 std::string filename_;
261 Imf::FrameBuffer fb_;
267 std::vector<iu::ImageCpu_32f_C1*> pool_32f_C1_;
268 std::vector<iu::ImageCpu_32f_C2*> pool_32f_C2_;
269 std::vector<iu::ImageCpu_32f_C4*> pool_32f_C4_;
void write()
Write to disk. Call this function once all channels/attributes have been added.
Interfaces the OpenEXR library with the Imageutilities.
Definition: openexrio.h:153
OpenEXROutputFile(const std::string &filename, iu::Size< 2 > size)
OpenEXROutputFile constructor. Opens a file for writing.
void add_attribute(const std::string &name, Eigen::Ref< Eigen::Matrix3f > mat)
add a 3x3 matrix attribute to the OpenEXR file
Template specialization for 2-d unsigned int vectors (size vectors).
Definition: vector.h:525
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...
Device 2D image class (pitched memory).
Definition: image_gpu.h:34
Host 2D image class (pitched memory).
Definition: image_cpu.h:27