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

Octave compatibility with ImageJ-Matlab #8

Open
ericbarnhill opened this issue Dec 13, 2016 · 7 comments
Open

Octave compatibility with ImageJ-Matlab #8

ericbarnhill opened this issue Dec 13, 2016 · 7 comments

Comments

@ericbarnhill
Copy link

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!

@ericbarnhill ericbarnhill changed the title Octave compatibility with Octave compatibility with ImageJ-Matlab Dec 13, 2016
@ctrueden
Copy link
Member

@hinerm Any guesses? I noticed that @ericbarnhill has now filed fiji-BIG/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
Copy link
Author

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
Copy link
Member

hinerm commented Feb 24, 2017

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
Copy link
Member

ctrueden commented Feb 24, 2017

@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-BIG/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
Copy link
Member

hinerm commented Feb 24, 2017

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?

  • Both matlab-scripting and imagej-scripting would need to isolate their MatlabControl dependencies.
  • We would need Octave/Dataset converters in both directions1,2
  • Need an Octave preprocessor
  • The MatlabControlUtils needs to be generalized to a plugin type that is consumed by a generalized Bindings and Script engine, and then implemented for Octave
  • Add an Options flag for selecting MATLAB or Octave. It would be set manually in the ImageJ UI to determine which application was launched when running a script from ImageJ (and could have auto-detect logic), and set automatically from the appropriate Launch scripts

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

@ctrueden
Copy link
Member

@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
Copy link
Member

ctrueden commented May 9, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants