imagej / imagej-matlab

MATLAB integration with ImageJ data structures and runtime.
https://imagej.net/scripting/matlab
BSD 2-Clause "Simplified" License
14 stars 6 forks source link

Octave compatibility with ImageJ-Matlab #8

Open ericbarnhill opened 7 years ago

ericbarnhill commented 7 years ago

Hi, I made some progress getting ImageJ-Matlab to run in Octave, and my version now opens in Octave...

The one problem is, when ImageJ is launched in Octave, it then launches its own instance of Matlab! (I have both programs). Can anyone advise where this launch of Matlab might be coming from, and if so I can take a look and see if this can be made compatible with being called from an Octave instance? Thanks!

ctrueden commented 7 years ago

@hinerm Any guesses? I noticed that @ericbarnhill has now filed fiji/mij#1 to make MIJ Octave-compatible. But I would much rather fix the issue here in ImageJ-MATLAB. I am very uncomfortable with the legal status of MIJ and would like to retire and/or move it out of Fiji.

ericbarnhill commented 7 years ago

I have had some additional problems in Octave 4.3 too, that I was going to try to patch myself.

If legal status is a problem why not just fork the project and call it Octave-ImageJ since it works there now. Then in the next couple of months I could test and see what is working and what is not, add functionality to get images back into Octave, etc.

hinerm commented 7 years ago

I'm guessing too much of the MATLAB framework is being reused and the service is opening a proxy connection to MATLAB.

Here is where the MATLAB instance is created.

So you can see in the MatlabBindings it communicates with the proxy to exchange data with the MATLAB instance. You'll need to add your own bindings so that it's communicating with Octave instead.

ctrueden commented 7 years ago

@ericbarnhill wrote:

If legal status is a problem why not just fork the project and call it Octave-ImageJ since it works there now.

The license of MIJ does not allow us to do that. Actually, the repository https://github.com/fiji/mij is already a legally murky fork of the code from http://bigwww.epfl.ch/sage/soft/mij/. The BIG license states:

Conditions of use You'll be free to use this software for research purposes, but you must not transmit and distribute it without our consent. In addition, you undertake to include a citation whenever you present or publish results that are based on it. EPFL makes no warranties of any kind on this software and shall in no event be liable for damages of any kind in connection with the use and exploitation of this technology.

Fiji has legal permission to redistribute BIG components. But this does not cover modifications, and the components are still not redistributable by anyone else.

Sorry to belabor the legal point in this issue, when it is only tangentially related. But I just want to explain why we created the imagej/imagej-matlab project, and why I am so reluctant and unresponsive with respect to the fiji/mij repository. We really need a clean break from that code, so that the OSS project can move forward safely and effectively. I am happy you got MIJ working with Octave (fiji/mij#1)—really, I am—but it is no substitute for making ImageJ-MATLAB also work in Octave.

@hinerm wrote:

So you can see in the MatlabBindings it communicates with the proxy to exchange data with the MATLAB instance. You'll need to add your own bindings so that it's communicating with Octave instead.

Mark, do you see a nice way we could generalize this component to allow for either MATLAB or Octave? Or failing that, at least a key place where we could add hardcoded case logic?

hinerm commented 7 years ago

Mark, do you see a nice way we could generalize this component to allow for either MATLAB or Octave? Or failing that, at least a key place where we could add hardcoded case logic?

I think that would do it. I'm probably forgetting a few things though!

ctrueden commented 7 years ago

@hinerm Thanks for thinking it through. Somehow I doubt anyone in the community is going to pursue this work, given how involved it is, but one can always hope...

ctrueden commented 7 years ago

For what it's worth, I did finally merge fiji-BIG/mij#1 (though see the caveats written there).

I also added a link to this issue from the Wish list page of the ImageJ wiki.