fiji / Trainable_Segmentation

Fiji library to perform image segmentation based on the Weka learning schemes
https://imagej.net/Trainable_Weka_Segmentation
GNU General Public License v3.0
110 stars 61 forks source link

Eliminate dependency on ImageScience library #4

Closed ctrueden closed 9 years ago

ctrueden commented 9 years ago

Unfortunately, the ImageScience library's license does not allow it to be consumed as a dependency from GPL code.

iarganda commented 9 years ago

I don't understand. Fiji can use it but the Fiji plugins cannot?

ctrueden commented 9 years ago

Right. We are allowed to distribute the ImageScience plugins with Fiji. However, the GNU General Public License requires that all parts of the software be freely distributable, which ImageScience is not.

The relevant portion of the ImageScience plugin license is:

Permission to use this software and corresponding documentation for educational, research, and not-for-profit purposes, without a fee and without a signed licensing agreement, is granted, subject to the following terms and conditions.

IT IS NOT ALLOWED TO REDISTRIBUTE, SELL, OR LEASE THIS SOFTWARE, OR DERIVATIVE WORKS THEREOF, WITHOUT PERMISSION IN WRITING FROM THE COPYRIGHT HOLDER.

So, at minimum, you would need written permission from @emeijering, since Trainable Segmentation is currently a "derivative work" due to the dependency. But even if you got such permission, any projects downstream of Trainable Segmentation would then suffer from the same issue, etc.

It might be possible to add an "exception clause" to the license of Trainable Segmentation, but is it really worth it?

A related issue is that the imagescience library itself does not (that I could find) have its license posted anywhere. Each of the four ImageJ plugins that use it have licenses posted, and the license text is always the same, so the implication is that imagescience itself has the same license. But in legal terms, "implicit" isn't good enough. So we are already on shaky ground. [Edit: Actually, it does. See below.]

Best would be if @emeijering could relicense all five ImageScience components (or at minimum, the imagescience core library) as OSS. But that may not be feasible. (See the thread on fiji-devel.) So the safest course of action for now is to eliminate the imagescience dependency.

Of course, no one is going to sue anyone else here. So leaving things as they are probably would not be a catastrophe. But it does muddy the waters for certain efforts, such as getting Fiji into Debian some day (understandably, they have very strict licensing policies).

See also:

emeijering commented 9 years ago

For what it's worth at this moment:

So, at minimum, you would need written permission from @emeijering https://github.com/emeijering, since Trainable Segmentation is currently a "derivative work" due to the dependency.

I'm not sure. The imagescience library may be freely distributed with Fiji. So with the current license no permission is needed as long as the Trainable_Segmentation project is distributed as part of Fiji. If people distribute their work with Fiji, they don't distribute the imagescience library — the Fiji owners do, for which they have written permission. There can only be a problem if people make their own distribution (outside of Fiji) and include the imagescience library as part of it. Or at least that's how I interpret the license.

A related issue is that the |imagescience| library itself does not (that I could find) have its license posted anywhere. Each of the four ImageJ plugins that use it have licenses posted, and the license text is always the same, so the implication is that |imagescience| itself has the same license. But in legal terms, "implicit" isn't good enough. So we are already on shaky ground.

The copyright/license notice is on GitHub:

https://github.com/fiji/imagescience/tree/master/src/main/resources

Or does that still qualify as "implicit"?

Of course, no one is going to sue anyone else here. So leaving things as they are probably would not be a catastrophe.

You can rest assured. Many people have made plugins (not necessarily distributed with Fiji) that use imagescience.jar and normally they would just post their own jar-files and ask people to also install the imagescience.jar file (freely downloadable from my website) to make things work. This is perfectly legal even with the current license.

Best regards,

Erik

emeijering commented 9 years ago

Or to summarize it more simply: the license is about (re)distribution, not about dependency.

Cheers,

Erik

On 2014-11-21 09:04, Erik Meijering wrote:

For what it's worth at this moment:

So, at minimum, you would need written permission from @emeijering https://github.com/emeijering, since Trainable Segmentation is currently a "derivative work" due to the dependency.

I'm not sure. The imagescience library may be freely distributed with Fiji. So with the current license no permission is needed as long as the Trainable_Segmentation project is distributed as part of Fiji. If people distribute their work with Fiji, they don't distribute the imagescience library — the Fiji owners do, for which they have written permission. There can only be a problem if people make their own distribution (outside of Fiji) and include the imagescience library as part of it. Or at least that's how I interpret the license.

A related issue is that the |imagescience| library itself does not (that I could find) have its license posted anywhere. Each of the four ImageJ plugins that use it have licenses posted, and the license text is always the same, so the implication is that |imagescience| itself has the same license. But in legal terms, "implicit" isn't good enough. So we are already on shaky ground.

The copyright/license notice is on GitHub:

https://github.com/fiji/imagescience/tree/master/src/main/resources

Or does that still qualify as "implicit"?

Of course, no one is going to sue anyone else here. So leaving things as they are probably would not be a catastrophe.

You can rest assured. Many people have made plugins (not necessarily distributed with Fiji) that use imagescience.jar and normally they would just post their own jar-files and ask people to also install the imagescience.jar file (freely downloadable from my website) to make things work. This is perfectly legal even with the current license.

Best regards,

Erik

ctrueden commented 9 years ago

@emeijering Thanks for your comments!

The copyright/license notice is on GitHub: https://github.com/fiji/imagescience/tree/master/src/main/resources

Thank you, I missed that! I fixed the link on the wiki page.

the license is about (re)distribution, not about dependency.

True. But it gets sticky if someone wants to redistribute Trainable Segmentation "outside Fiji" unless they exclude the imagescience library from the distribution as you describe. Three points about it:

ctrueden commented 9 years ago

@emeijering One thing you may want to do is change the ImageScience project POMs' <licensing> section from <distribution>repo</distribution> to <distribution>manual</distribution> since I think this is more in line with what you describe above. See the docs for details.

iarganda commented 9 years ago

I see, I had the same thoughts as @emeijering because I only distribute Trainable Segmentation as part of Fiji, but I see how the maven distribution can be a problem...

emeijering commented 9 years ago

@ctrueden I understand it's tricky to have different licenses for different components within one project. For the moment we'll just have to live with it.

@iarganda So basically it's up to you. There's no legal issue with the current situation.

emeijering commented 9 years ago

@ctrueden I changed the ImageScience POM as you suggested. Let me know if it's OK like this or whether anything else is needed at this moment.

ctrueden commented 9 years ago

Thanks @emeijering, looks good. I suggest changing the POMs of the four plugin projects similarly, since the same situation applies.

emeijering commented 9 years ago

@ctrueden as suggested I have changed the POMs of all my plugins now.

ctrueden commented 9 years ago

Thank you @emeijering!

iarganda commented 9 years ago

@ctrueden can I close this issue? Is this solution satisfactory for you?

ctrueden commented 9 years ago

TL;DR: I will submit a PR later today that addresses this issue to my satisfaction.

@iarganda Legally, ImageScience has its ducks in a row now, as a result of the above discussion. But the situation with TWS is trickier, and not solved as things stand.

In case you haven't read them yet, these FAQ entries discuss the relevant issue:

The FAQ is a little self-referential and obtuse, but the gist is that from a legal standpoint, the TWS project would need to have a modified GPLv3 license with an extra clause:

Additional permission under GNU GPL version 3 section 7

If you modify this Program, or any covered work, by linking or combining it with ImageScience (http://fiji.sc/ImageScience), containing parts covered by the terms of the ImageScience license (http://fiji.sc/ImageScience_License), the licensors of this Program grant you additional permission to convey the resulting work.

Unfortunately, such a blurb would be highly misleading, because it implies that it would be legal to modify TWS, then redistribute the modified version of TWS + dependencies outside Fiji, when in fact such redistribution would be illegal under the terms of the ImageScience license (and its limited exception allowing redistribution within Fiji only).

I am sorry to make trouble here. But as things stand, this issue is not resolved from a legal standpoint, and it makes alarm bells go off in my head. We could choose to ignore the issue, and in practice no one would care with respect to the current distribution mechanisms. But it would be a legal problem if:

And I am fairly certain there are other scenarios which could crop up in the future, but haven't explicitly occurred to me. The upshot is that it makes it much more difficult for people to legally modify and redistribute the TWS plugin, which goes against our open source science principles.

From a technical standpoint, TWS uses ImageScience only for computation of certain features. Hence, we can make the ImageScience dependency optional, by making the ImageScience-driven feature computations optional. I am working on a patch now, and will file a PR later today.

In the longer term, it would be awesome to add ops computing these features to the ImageJ OPS library, and fully remove the ImageScience dependency. But that is a project for another day.

iarganda commented 9 years ago

OK, thanks for the clear explanation! I agree that using ImageJ OPS features substituting the ImageScience ones is the right way to go. Hopefully soon!