We're Hiring!

getting the image IDs and dataset ID from Script

General and open developer discussion about using OMERO APIs from C++, Java, Python, Matlab and more! Please new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

If you are having trouble with custom code, please provide a link to a public repository, ideally GitHub.

Re: getting the image IDs and dataset ID from Script

Postby jennBakal » Mon Jan 17, 2011 5:35 am

then i guess i don't understand the previous replies.

if i highlight an image and then pick Figure Scripts/Movie Figure, the name of the highlighted image is automatically filled into the Name field in the script box that pops up. how is that done?
jennBakal
 
Posts: 18
Joined: Fri Dec 10, 2010 4:45 am

Re: getting the image IDs and dataset ID from Script

Postby wmoore » Mon Jan 17, 2011 7:45 am

Hi All,

Apologies for the confusion. The short answer is that currently there is no way for you to automatically populate fields in Python scripts when launching from Insight. However, we have previously discussed the functionality you are looking for: Using a conventionally-named Python script parameter that Insight recognizes and populates like you've described. E.g. Image_IDs.

The current status is that Insight allows you to browse all the Python scripts uploaded to the server, launch them from Insight and generate a UI on the fly for filling out the various parameters.

In addition, we have added "Custom- hard-coded UIs" in Insight for some of our Python scripts that we thought would benefit from a nicer client UI. These can be distinguished in the drop-down scripts menu by the different icon (with the cogs on) and can also be accessed from the 'Figure Export' (grid icon) to the left of the script-launch button.

This is briefly mentioned towards the end of this demo movie: http://cvs.openmicroscopy.org.uk/snapsh ... Export.mov

I guess mixing these "Official" scripts in with those that have a 'UI on the fly' has just been confusing.

Will.
User avatar
wmoore
Team Member
 
Posts: 674
Joined: Mon May 18, 2009 12:46 pm

Re: getting the image IDs and dataset ID from Script

Postby wmoore » Wed Jan 19, 2011 3:41 pm

Hi,

I have created a ticket for this:
http://trac.openmicroscopy.org.uk/omero/ticket/3922

We propose to use the convention currently in use in the Thumbnail_Figure.py script.
http://trac.openmicroscopy.org.uk/omero ... _Figure.py

where we use parameters named "Data_Type" and "IDs" to input the current Images/Datasets.
In this example, you can select Datasets or Images, although we could also add 'Projects'. The 'grouping' attribute ensures these are the first 2 fields of a UI generated on the fly.

Code: Select all
dataTypes = [rstring('Dataset'),rstring('Image')]

......   

        scripts.String("Data_Type", optional=False, grouping="1",
            description="The data you want to work with.", values=dataTypes, default="Dataset"),

        scripts.List("IDs", optional=False, grouping="2",
            description="List of Dataset IDs or Image IDs").ofType(rlong(0)),



Does this proposal meet your needs?

Cheers,

Will.
User avatar
wmoore
Team Member
 
Posts: 674
Joined: Mon May 18, 2009 12:46 pm

Re: getting the image IDs and dataset ID from Script

Postby bhcho » Thu Jan 20, 2011 6:45 pm

Hi Will,
Thanks for your support. The ticket for the functionality is exactly what we wanted.

BK
bhcho
 
Posts: 236
Joined: Mon Apr 05, 2010 2:15 pm

Previous

Return to Developer Discussion

Who is online

Users browsing this forum: No registered users and 1 guest