imagej / imagej-legacy

ImageJ+ImageJ2 compatibility layer
https://imagej.net/libs/imagej-legacy
BSD 2-Clause "Simplified" License
16 stars 25 forks source link

revisited the DefaultLegacyOpener, added support for SelfShowableContent #302

Open xulman opened 10 months ago

xulman commented 10 months ago

This PR solves two things:

Based on @ctrueden 's commit, it reorganizes the order of actions in the main ImageJ1&2 opening routine such that the routine first makes sure it has a valid argument (which is a "path" to a resource, be it a file on a drive, or URL to somewhere) and only then it continues resolving how that argument path is going to be opened. The constraints considered during the opening were preserved, that said, it still honors wether newStyleIO is to be used first or not, falls back to IJ openers, etc.

The second change is that it detects when an opener returns SelfShowableContent as a result of opening the input path, and if so, it activates its show() method...

xulman commented 10 months ago

this PR works in conjuction with https://github.com/scijava/scijava-common/pull/473