Task #3922 (closed)
Opened 13 years ago
Closed 13 years ago
Auto-fill Script Params
Reported by: | wmoore | Owned by: | jburel |
---|---|---|---|
Priority: | major | Milestone: | OMERO-Beta4.3 |
Component: | Insight | Version: | n.a. |
Keywords: | n.a. | Cc: | |
Resources: | n.a. | Referenced By: | n.a. |
References: | n.a. | Remaining Time: | 0.0d |
Sprint: | 2011-05-19 (12) |
Description (last modified by wmoore)
Users want Image-IDs / Dataset-IDs parameters in Python scripts to be filled in with the current selected objects when launching in Insight.
From e-mail:
Basically I want a script that is able to get the ImageIds? either by:
- A user selects multiple images in a dataset then runs the script,
- A user selects multiple datasets then runs the script,
From this I want for 1) all the imageIDs of the selected images, and for 2) all the ImageIDs belonging to the datasets selected.
From what I have seen the Thumbnail_Figure.py does exactly what I want.
Script code example that we should support
dataTypes = [rstring('Dataset'),rstring('Image')] ... scripts.String("Data_Type", optional=False, description="The data type.", values=dataTypes, default="Image"), scripts.List("IDs", optional=False, description="List of Dataset IDs or Image IDs").ofType(rlong(0)), ... scriptParams = {} for key in client.getInputKeys(): if client.getInput(key): scriptParams[key] = unwrap(client.getInput(key)) dataType = scriptParams["Data_Type"] ids = scriptParams["IDs"] images = containerService.getImages(dataType, ids, None)
Change History (21)
comment:1 Changed 13 years ago by wmoore
- Description modified (diff)
- Priority changed from minor to major
- Sprint set to 2011-04-07 (9)
comment:2 Changed 13 years ago by jburel
- Remaining Time set to 0.4
comment:3 Changed 13 years ago by jburel
- Remaining Time changed from 0.4 to 0.5
comment:4 Changed 13 years ago by cxallan
- Sprint changed from 2011-04-07 (9) to 2011-04-21 (10)
comment:5 Changed 13 years ago by jburel
- Status changed from new to accepted
comment:6 Changed 13 years ago by jburel <j.burel@…>
- Remaining Time changed from 0.5 to 0
- Resolution set to fixed
- Status changed from accepted to closed
(In [bc5b813305ed828caee698f20341d7bca7998b40/ome.git] on branch develop) Auto-fill the ids box if data type is set (close #3922)
comment:7 Changed 13 years ago by jburel
- Resolution fixed deleted
- Status changed from closed to reopened
comment:8 Changed 13 years ago by jburel
- Remaining Time changed from 0 to 0.1
forgot to add control when selecting new data type
comment:9 Changed 13 years ago by jburel <j.burel@…>
- Remaining Time changed from 0.1 to 0
- Resolution set to fixed
- Status changed from reopened to closed
(In [ebb0a950ce881e1a58f52d57433e2ba825417b16/ome.git] on branch develop) Improve auto-fill for script (close #3922)
comment:10 Changed 13 years ago by wmoore
- Resolution fixed deleted
- Status changed from closed to reopened
BUG in handling IDs:
Caused by: omero.ValidationException serverStackTrace = "" serverExceptionClass = "" message = "Invalid parameters: WRONG TYPE for "IDs": <class 'omero.rtypes.RBoolI'> != <class 'omero.rtypes.RListI'>
comment:11 Changed 13 years ago by jburel
- Remaining Time changed from 0 to 0.15
- Status changed from reopened to accepted
comment:12 Changed 13 years ago by jburel <j.burel@…>
- Remaining Time changed from 0.15 to 0
- Resolution set to fixed
- Status changed from accepted to closed
(In [99b65db572fabd85f008e19e615f1fdd0e4c276b/ome.git] on branch develop) Fix Bug when passing parameters (close #3922).
comment:13 Changed 13 years ago by wmoore
- Cc jeromeavondo@… wmoore removed
- Resolution fixed deleted
- Sprint changed from 2011-04-21 (10) to 2011-05-19 (12)
- Status changed from closed to reopened
Since ALL scripts will generate their own UI when launched from scripts menu, we should convert the remaining ones over to using the convention for auto-filling currently selected Images etc. The Insight Figure dialog UIs will need to be updated to use these parameters. All these will limit Data_Type to be "Image" (not support "Dataset").
- Movie_Figure.py
- ROI_Split_Figure.py
- Split_View_Figure.py
comment:14 Changed 13 years ago by jburel
- Remaining Time changed from 0 to 0.15
comment:15 Changed 13 years ago by jburel
- Owner jburel deleted
- Status changed from reopened to new
comment:16 Changed 13 years ago by jburel
- Remaining Time changed from 0.15 to 0.25
comment:17 Changed 13 years ago by Will Moore <will@…>
(In [8e3f47c3f2d877ff009d2604d8112fe2db815335/ome.git] on branch develop) Updating figure Script parameters and descriptions for UI on the fly. See #5131, #3922
comment:18 Changed 13 years ago by wmoore
- Owner set to jburel
HI JM - Passing this one back to you to update the Insight code for
- Movie_Figure.py
- ROI_Split_Figure.py
- Split_View_Figure.py
You simply need to change the Parameter name "Image_IDs" to "IDs" since 'Data_Type' is set to 'Image' by default.
comment:19 Changed 13 years ago by wmoore
Hi JM - Just noticed a bug with filling selected objects. If I select more than 1 item (E.g. 3 images) and launch script (E.g. Thumbnail_Figure) then all 3 are populated OK - Close dialog. Now if I select 1 item (E.g. a single image or dataset) then launch a script again, only the first ID is updated, leaving the other 2 IDs from before. This can be repeated. Only when I select MORE than 1 item is the list of IDs fully refreshed.
Maybe this should be a new BUG? - it's different from the work required above - Up to you?
comment:20 Changed 13 years ago by jburel
- Status changed from new to accepted
comment:21 Changed 13 years ago by jburel <j.burel@…>
- Remaining Time changed from 0.25 to 0
- Resolution set to fixed
- Status changed from accepted to closed
(In [b1eb4f21b56ce1ccf286960e2daf345514690311/ome.git] on branch develop) Fix invocation of scripts with UI (close #3922)
Moved from sprint 2011-04-07 (9)