Added Preview function for on-the-fly update ROIs#12
Added Preview function for on-the-fly update ROIs#12hkmoon wants to merge 6 commits intostardist:masterfrom
Conversation
As well as the cancel button is also added.
|
Hi @hkmoon, thanks for the PR. I guess you intended this feature to be used with small images where the computation finishes quickly? PS: When changing the parameters, I sometimes got an exception related to AWT/Swing. Maybe because the GUI is updating too frequently? |
Frequent preview() call might the system unstable. And, it is only useful for small images.
|
Hi @uschmidt83 You are right. I used blobs.gif for demonstration of StarDist in the summer school and the preview would be a good way to find the optimal parameters for the users. But, I did not think of big images. If you think the preview function is called too frequently, supposedly, "update" button might be better. I got the error message as well. It happened because the module added additional ROIs without reset(). Hopefully, it will be useful for other users too. |
|
Thanks, I'll be on vacation next week and take a look when I'm back. Please ping me if I forget! |
|
@uschmidt83 |
| private void refresh() { | ||
| final HashMap<String, Object> params = new HashMap<>(); | ||
|
|
||
| params.put("input", input); |
There was a problem hiding this comment.
For timelapse input data: should the preview only be for the current frame (how to even get that?) or the entire sequence (potentially slow)?
There was a problem hiding this comment.
It depends on the actual processing logic of StarDist. Does it probably take into account of whole timeseries of the input image? Then, it will be slow as you expected. How do you handle ROIs over time in this case?

The preview function would be useful for checking the optimal parameters while opening the dialog.
It updates ROIs when the slide bar values are changed as well as the cancel button is also added when the user does not want the output.