Currently, Matlab interfaces with the OpenEXR library via the in-memory mex function interface. This is an efficient interface.
However, it has become difficult to build, maintain, and distribute mex functions that use shared libraries like OpenEXR. Two main reasons are:
On OS X, Matlab's mex build configuration often goes out of date with respect to the OS X/XCode build tools.
On Linux, Matlab distributes and loads its own version of system libraries like libstdc++, which may be incompatible with the library versions that are required for shared libraries like OpenEXR (see #20 ).
To alleviate these problems, we should decouple ReadMultichannelEXR from the Matlab mex function interface. We should make ReadMultichannelEXR into a stand-alone utility for reading and writing OpenEXR files to and from a simple structured representation, like ubjson.
We could continue to use ReadMultichannelEXR from Matlab by reading and writing ubjson files or streams, for example with jsonlab. We could choose the format of the ubjson representation to match the current ReadMultichannelEXR data format. We could include an m-function wrapper with the same behaviors as the current ReadMultichannelEXR mex-function, and minimize the impact on existing ReadMultichannelEXR code.
As a stand-alone tool, the ubjson version of ReadMultichannelEXR would have several advantages:
Currently, Matlab interfaces with the OpenEXR library via the in-memory mex function interface. This is an efficient interface.
However, it has become difficult to build, maintain, and distribute mex functions that use shared libraries like OpenEXR. Two main reasons are:
libstdc++
, which may be incompatible with the library versions that are required for shared libraries like OpenEXR (see #20 ).To alleviate these problems, we should decouple ReadMultichannelEXR from the Matlab mex function interface. We should make ReadMultichannelEXR into a stand-alone utility for reading and writing OpenEXR files to and from a simple structured representation, like ubjson.
We could continue to use ReadMultichannelEXR from Matlab by reading and writing ubjson files or streams, for example with jsonlab. We could choose the format of the ubjson representation to match the current ReadMultichannelEXR data format. We could include an m-function wrapper with the same behaviors as the current ReadMultichannelEXR mex-function, and minimize the impact on existing ReadMultichannelEXR code.
As a stand-alone tool, the ubjson version of ReadMultichannelEXR would have several advantages: