Skip to content

Refactor ReadMultichannelEXR as a stand-alone utility. #22

Description

@benjamin-heasly

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 Error with 'rtbTestInstallation()' #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:

  • easier to build
  • available to use for Matlab-based projects
  • available to use for non-Matlab-based projects
  • able to be distributed as a Docker image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions