-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better support for community use cases (UI dialogs, parameters, etc.) #402
Comments
Dear @imagejan, our main concern was usability. First we wanted to get away from this "two step" approach, where you select a file in one dialog and then open a second dialog to adjust your settings we had previously. We wanted to auto-populate fields with datasets, such that users wouldn't have to know about internal paths, if they import a file exported from ilastik that usually only has a single internal path but also be flexible enough for the case of multiple datasets. Also axistags are read and updated accordingly. All with the goal of staying macro backwards-compatible. So in short, more dynamic "parameters" that are updated on other parameter changes were the main reason. CC: @m-novikov |
Dear @imagejan, I wrote a whole novel this morning as an answer and now I see it did not save it 😦 Well, I try to reproduce: First of all I ❤️ SciJava commands. They are very useful! Also the IJ1 dialogs don't do the job for me so I am using a combination of Swing and SciJava Commands. Main aim essentially is to both have a concise and interactive UI and macro recording! Towards this aim currently I think there are the following limitations in SciJava Commands:
And there is one more specific request: Sometimes I only want to record the Thanks for opening this thread and I am looking forward to future developments! |
To expand a bit on @k-dominik answer. In Scijava case initial implementation of the dialog is convenient and simple, it becomes increasingly more complex once you want to do any kind of non-trivial interaction between widgets. On the other hand swing documentation and examples are readily available and it generalizes better for our use cases allowing more fine-grained control over UX. Some examples of what we want to do in the future:
Some problems that we hit:
One approach to solving some of our problems would be to provide more customization for dialog fields and more hooks in command, but then it would be trying to do the job of the proper UI framework which I don't think is a good route. I think scijava does a really good job to autogenerate dialogs, but at some point, if it's deemed important enough by the project it would be nice to be able to generate form yourself while preserving command structure with paramters annotations. |
Another question I have is whether programmatic access to Command parameters could be improved. To make this typo safe what I am now almost always doing is: @Parameter
private String yourName = "Tischi";
public static String YOUR_NAME_PARAMETER = "yourName"; Like this I can access the |
...I don't know if that would work in terms of the whole SciJava architecture, but technically I could at least imagine something like:
and then
So the |
@tischi just a note here, I use the
|
ok, but still this is neither typo nor type safe and quite verbose.
|
What would happen in this code? CommandInfo commandInfo = commandService.getCommand(MyCommand.class);
Module module = commandService.moduleService().createModule(commandInfo);
module.setInput("myName", "Deborah");
// module.resolveInput("myName");
commandService.moduleService().run(module, true); Would that do anything to the |
@tischi actually, this works too (EDIT: true for DynamicCommands, not all Commands):
The |
OK, so maybe some things are actually possible... |
Happy to meet (virtually)! I have not seen you all for too long :) Anything we come up with should become part of the howto's. In case you have a minute, maybe you can make a PR with this snippet :) Otherwise I will do it later. |
I think that's partly my point: this is much more efficient during a small hackathon.
Do you feel like organising this? I could help with providing e-mail addresses of people that may want to join. |
@imagejan @frauzufall My use-case is that I had to implement custom recordings of jython code using the actual Java API of my code, which works, but now it records both (i) my jython code and (ii) the |
This issue has been mentioned on Image.sc Forum. There might be relevant details there: https://forum.image.sc/t/access-to-imagej2-input-harvester-generated-elements/49338/3 |
Relevant discussion also in imagej/imagej-legacy#239 |
I just wanted to (very belatedly) mention that the work I did in September 2017 for SciJava 3's improved parameter dialogs can be seen here. SciJava 3 is still not released today, but it will finally see some component releases within the next 3 months. The initially released components will not include the more flexible parameters, but will include the initial foundational scijava-struct work that will ultimately enable it. |
This issue has been mentioned on Image.sc Forum. There might be relevant details there: https://forum.image.sc/t/dynamiccommand-not-displaying-without-error/60767/7 |
This issue has been mentioned on Image.sc Forum. There might be relevant details there: |
Several projects, after using SciJava parameters and UI at first, switched back to custom, IJ1-backed implementations because SciJava couldn't offer all they needed.
I suggest to try to collect here some use case examples illustrating the "community demand":
ilastik4ij
-IlastikImportDialog
(see e.g. the discussion in Drag and drop support for the hdf5 import ilastik/ilastik4ij#71)bigDataProcessor2
-HDF5DatasetDialog
and the classes implementingAbstractProcessingDialog
@k-dominik @tischi if you find the time to summarize the reasons why you had to develop your own UI, what was missing in SciJava etc. (maybe with a screenshot of your current dialog), that would be great!
The text was updated successfully, but these errors were encountered: