bigdataviewer / bigdataviewer_fiji

Fiji plugins for starting BigDataViewer and exporting data.
GNU General Public License v3.0
21 stars 9 forks source link

Rewriting commands producing BigDataViewer instances in an IJ2 style #11

Closed NicoKiaru closed 5 years ago

NicoKiaru commented 5 years ago

-> Affects Xml/Hdf5, Imaris, BigDataBrowser -> Adds BigDataServerPlugin command (opens a dataset from bigdataserver without browsing it) -> Adds BigDataViewerClosePlugin command (close the frame associated with BigDataViewer) BigDataViewer instance are now annotated as ItemIO.OUTPUT parameters. Thanks to the postprocessor plugin BigDataViewerPostProcessorPlugin, any BigDataViewer instance which is created is caught and put into an ObjectService. This allows BigDataViewer instance to be used in Commands that would need it later on (like the BigDataViewerClosePlugin command).

A warning message is nonetheless always appearing with this method: [WARNING] Ignoring unsupported output: bdv [bdv.BigDataViewer]

NicoKiaru commented 5 years ago

A not so nice thing is that now the bdv objects are displayed using the standard toString() method, which is currently the default one. Maybe overriding this method in the BigDataViewer object would be nice.

NicoKiaru commented 5 years ago

Allowing to open multiple ImagePlus (https://github.com/bigdataviewer/bigdataviewer_fiji/commit/c9d471d42749e775940b8b3a4416c5c10bce4454) breaks my attempt to use scijava commands. Arrays of ImagePlus are not supported to my knowledge with scijava parameters. A scijava-friendly alternative to this could have been to write the OpenImagePlusPlugIn such as it adds another ImagePlus source to a preexisting BDV instance, if the user selects an already existing BDV frame.

NicoKiaru commented 5 years ago

I believe the changes are too drastic to be included in this repository, and they will break previously existing scripts (which use GenericDialog instead of Parameter). Moreover, in this PR, I used BigDataViewer object as a scijava Parameter while it would have been better to use BdvHandle as a Parameter. So I made a new repository, called bigdataviewer-scijava which copies the functionalities of this one. Also I used BdvHandles this time. That's probably a better way to try these changes. The repo can be forked or I can move it to another location if you find it potentially useful and want an easier writing access on it.