Omero scripts interactive parameter loading

Hi OME team,
@will-moore,

I am trying to write a in-place import script for omero-5.6 since the omero-insight-5.6 is not ready yet.

I am wondering if it is possible for me to get the value of the chosen options in the “client.scripts” so that I can list the files in the folder according.

image

ps: For example, in this picture, I need to get the chosen folder name in the script so that I can list all the files in the folder.

Many thanks!

Best regards,
John

Hi @John_Xu

If I understand correctly, you’d like to see:

  1. define a script with options
  2. the user chooses the script
  3. the options are shown
  4. an option is chosen
  5. the script evaluates that option and updates the GUI
  6. the user chooses an updated option and runs the script

Does that sound like what you are looking for? If so, no, unfortunately it’s not that interactive. The steps are restricted to:

  1. define a script with options
  2. show those options to the user
  3. user chooses from them and runs the script

i.e. one back-and-forth.
~Josh.

Yeah, that’s what I want.

Got you! In this case, I will give up trying.

Many thanks!

Best regards,
John

Given that an interactive UI is not possible, is there a possible work-around where you load all the contents of the available folders and send a long list of

["folderA/file1", "folderA/file2", "folderB/file3"]

to the UI, which could then be filtered?

This exact scenario is discussed at File browser in omero script gui (and there’s a PR to handle the filtering of large lists in the UI).

Obviously the feasibility of this depends on getting hold of the folder listings and contents on the server (and permissions issues etc as discussed) as well as the potential size of the list.

Regards,
Will.

That’s my current solution :slight_smile: (The long list). Just wondering if you have better ones.

Yeah, the file browser will solve my problem as well, it seems that I need to wait for that one.