imagej / imagej-legacy

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

Improve handling of no-legacy commands #280

Open ctrueden opened 2 years ago

ctrueden commented 2 years ago

Right now, the vast majority of commands in imagej-plugins-commands have the no-legacy flag, and the imagej-legacy logic disables such commands. So all these "ImageJ2 command rewrites" are discarded in favor of original ImageJ commands, and thus not available in napari-imagej. But napari-imagej does not support running original ImageJ commands. We need to change this.

There are five distinct classes of commands worth articulating individually:

  1. Original ImageJ commands. These only work with GUI. We need to make them a separate section in search results. These will never be accessible from napari-imagej (if you want that, the plan is to provide a button to open the main ImageJ window; see imagej/napari-imagej#43).
  2. SciJava script wrappers for original ImageJ commands. We started working on creating these, but they don't exist yet. See #264. Once these exist, they can be shown in the search results, at least while headless, since they will enable the majority of original ImageJ commands to work headless.
  3. ImageJ2 no-legacy commands. These are the commands relevant to this issue: those declaring the no-legacy property. These ought to be accessible in both the ImageJ legacy UI and napari-imagej, but we need to clearly delineate them in the search results; see below.
  4. SciJava modules with new functionality. These are any module without the no-legacy property (e.g. "System Information"). They appear now in search results, but there are surprisingly few. Probably no changes are needed here.
  5. ImageJ Ops. These are SciJava modules, but handled specially, returned in a separate search category. Unfortunately, napari-imagej doesn't handle them well as of this writing. But they are outside the scope of imagej-legacy-related work described by this issue.

The work to improve this situation on the imagej-legacy side is as follows: