Save-style file parameters pop open-style file choosers
Commands using a save-style file widget still pop an open-style file chooser, which means there is no way to type in a new filename. Here is what the File → Export → Image... command looks like in napari-imagej:
And here is how the same command's file chooser dialog looks in Fiji:
Here is how that parameter looks in the source code:
@Parameter(label = "File to save", style = FileWidget.SAVE_STYLE,
initializer = "initOutputFile", persist = false)
private File outputFile;
I think this is mostly done at this point @ctrueden, thanks to #120. The only thing more that we could do is improve the initializer/guess a filename. Do you think this is possible in napari, or can we close this issue?
Do you think this is possible in napari
So, napari-imagej doesn't run the InitializePreprocessor? Is that why there is no initial name? If not, why not? We ought to run all preprocessors up to but excluding the InputHarvester, no?
Do you think this is possible in napari
So, napari-imagej doesn't run the
InitializePreprocessor? Is that why there is no initial name? If not, why not? We ought to run all preprocessors up to but excluding theInputHarvester, no?
@ctrueden so org.scijava.module.process.InitPreprocessor is running. There is no initial name, because the name is derived from imageDisplayService.getActiveDataset(), which returns null. Unfortunately, calling that plugin with an image open in the ImageJ2 UI (which would make no sense, since saving that image would not be possible from the widget) results in really strange behavior.