bigdataviewer / bigdataviewer_fiji

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

Modern import (from BDV) plugin #9

Open xulman opened 6 years ago

xulman commented 6 years ago

Hi,

I wanted to extract "raw"/orig data from XML/HDF5 BDV dataset and I found File->Import->BigDataViewer... plugin/menu item that can do it. This one, however, was doing GUI dialog by its own, and I couldn't use it in --headless mode.

So, I rewrote it into IJ2 environment. This changed the GUI-pieces of the code completely but otherwise (figuring out how many timepoints, setups, mipmaps as well as creating ImagePlus as a result) I haven't changed the functionality.

I also gave it a bit of love to the way GUI dialog behaves now.

As a side effect, the new plugin can run --headless: ~/Apps/Fiji.app/Contents/MacOS/ImageJ-macosx --headless --run "BigDataViewer..." 'xmlFile="/path_to/dataset.xml",timepointVal=15,setupVal=0,mipmapVal=0,openAsVirtualStack=false' and/or one can batch/headless extract a sequence of timepoints... (because it is not attempting to build a GUI dialog and img.show() as it was in the original code).

The GUI:

screen shot 2018-02-20 at 14 51 54

Vlado

tpietzsch commented 5 years ago

@xulman sorry for taking so long to look at it.

What happened if you tried to run the old plugin in headless mode. In principle the GenericDialogPlus should be able to handle that? Maybe all that is required it to add headless=true to the @Plugin annotation.

What you did is still quite nice. It would be cool to have the plugin IJ2-style (regardless of headless issue). A few things I still don't like:

ctrueden commented 5 years ago

setting min/max ranges in existing dialog. But I don't know how to do that / whether it is possible

Not currently possible, sorry.

There is no issue precisely about that, but here are the closest ones:

Perhaps could be tackled as part of the SJC3 dialog generator redesign. I am working on some necessary underpinnings for that over the next couple of months, but I don't know how far along the dialog stuff specifically will get in that time-frame.