Page 2 of 2

Re: getting the image IDs and dataset ID from Script

PostPosted: Mon Jan 17, 2011 5:35 am
by jennBakal
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?

Re: getting the image IDs and dataset ID from Script

PostPosted: Mon Jan 17, 2011 7:45 am
by wmoore
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.

Re: getting the image IDs and dataset ID from Script

PostPosted: Wed Jan 19, 2011 3:41 pm
by wmoore
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.

Re: getting the image IDs and dataset ID from Script

PostPosted: Thu Jan 20, 2011 6:45 pm
by bhcho
Hi Will,
Thanks for your support. The ticket for the functionality is exactly what we wanted.

BK