Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DIPimage, MATLAB R2018a, and complex arrays #24

Open
crisluengo opened this issue Feb 14, 2019 · 0 comments
Open

DIPimage, MATLAB R2018a, and complex arrays #24

crisluengo opened this issue Feb 14, 2019 · 0 comments
Labels
component:DIPimage About the DIPimage toolbox for MATLAB

Comments

@crisluengo
Copy link
Member

For R2018a and newer, complex data are no longer stored in two separate data segments. This is good overall, but requires changes to the DIPlib-MATLAB interface. It is possible to compile DIPimage for R2018a or newer, but passing complex matrices in and out of the MEX-files causes two copies of the data, instead of none. However, because dip_image objects never contain complex data (complex images are stored as real arrays to prevent copies), the problems with this are limited.

If we want to use the new complex-interleaved API that comes with R2018a, then we'd be able to take any complex matrix from MATLAB without copy. However, mxGetPropertyShared is no longer supported. This means that all image data will get copied when used as input to DIPimage MEX-files. This is very bad! The only way around this is to use the new C++ interface. This means we would need to rewrite all MEX-files, and maintain separate source code for R2017b and earlier, and for R2018a and newer.

@crisluengo crisluengo added the component:DIPimage About the DIPimage toolbox for MATLAB label Feb 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:DIPimage About the DIPimage toolbox for MATLAB
Projects
None yet
Development

No branches or pull requests

1 participant