Closed NargesMahdavian closed 2 years ago
Hi @NargesMahdavian
Great first issue.
As we are using script parameters to get the file path, we can't leave the text field empty. There has to be some text in it. If you're selecting image_already_open
, it doesn't need to be a file path . You could use random text in it or even just enter NA.. Could you try this and see if it works?
Perhaps, I'll leave a default value in it and then clarify this in the documentation.. I can see this becoming a problem.. These are the limitations of using macro language as well..
So, I've made it bold to emphasise it. You can enter NA if the field is empty.
To be safe, I've also updated the code so it has a default value. If you are starting up for the first time, the fiji directory will appear in the field for now.
var fiji_dir=getDirectory("imagej");
#@ File (style="open", label="<html>Choose the image to segment.<br><b>Enter NA if image is open.</b><html>", value=fiji_dir) path
Now, it should look like this:
Hopefully, this should help.
When I tick "image_already_open" in the test segmentation dialog, and I concurrently have a sample image open, the code terminates with a dialog popping up saying "'path' is required but unset." When unticked and I set the path to the image, this error does not happen. Perhaps the code is still pointing to a path, even when the image is opened already, and that checkbox is ticked? Thank you !