<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Jerome,<div><br></div><div>Seems like this is a popular request, since it has recently been requested in the forums:</div><div><a href="https://www.openmicroscopy.org.uk/community/viewtopic.php?f=6&amp;t=549&amp;sid=9c8d00275f1909280ead33b1e60b52c5">https://www.openmicroscopy.org.uk/community/viewtopic.php?f=6&amp;t=549&amp;sid=9c8d00275f1909280ead33b1e60b52c5</a></div><div><br></div><div>Insight has a hard-coded recognition of "Thumbnail_Figure.py" and some other scripts and uses a custom UI (not a UI generated from the script itself).</div><div>As you saw, Insight doesn't display the "Data_Type" or "IDs" fields from the script, but instead it populates them 'behind the scenes' using the currently selected Images / Datasets.</div><div><br></div><div>What we have discussed doing is using a conventionally-named parameters in the Python scripts to indicate to Insight that you want these auto-filled based on the current selection.&nbsp;</div><div><br></div><div>E.g. Use "Data_Type" and "IDs" exactly like in the Thumbnail Figure script.&nbsp;</div><div><br></div><div>I've created a ticket for this:</div><div><a href="http://trac.openmicroscopy.org.uk/omero/ticket/3922">http://trac.openmicroscopy.org.uk/omero/ticket/3922</a></div><div><br></div><div>&nbsp;Cheers,</div><div><br></div><div>&nbsp;&nbsp; Will.&nbsp;</div><div><br></div><div><br></div><div><br><div><div>On 19 Jan 2011, at 15:07, Jerome Avondo wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div class="hmmessage" style="font-size: 10pt; font-family: Tahoma; ">Hi,<br><br>I am trying to replicate/understand the imageID selection behaviour of the Thumbnail_Figure.py script.<br><br>Basically I want a script that is able to get the ImageIds either by:<br><br>1) A user selects multiple images in a dataset then runs the script,<br>2) A user selects multiple datasets then runs the script,<br><br>From this I want for 1) all the imageIDs of the selected images, and for 2) all the ImageIDs belonging to the datasets selected.<br>From what I have seen the Thumbnail_Figure.py does exactly what I want.<br><br>And it does this by having call paths for either Images or Datasets using the "Data_Type" variable.<br>However I don't understand a few things,<br><br>How does the script actually distinguish the Data_Type, as it always seems to be the default value when I run it from the command line, ie with debug output etc, so I can trace whats happening. Even when I give it the ID of an Image it still has Data_Type as a dataset. I'm guessing the command line execution is missing a step that's happening in the GUI/insight execution.<br><br>Secondly how come you set the<span class="Apple-converted-space">&nbsp;</span><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; scripts.String("Data_Type", optional=False, grouping="1",<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; description="The data you want to work with.", values=dataTypes, default="Dataset"),<br><br>But this is never shown in the GUI, how does it know to "hide" it, where is this being specified?<br>Thanks,<br><br>Jerome.<br>_______________________________________________<br>ome-devel mailing list<br><a href="mailto:ome-devel@lists.openmicroscopy.org.uk">ome-devel@lists.openmicroscopy.org.uk</a><br><a href="http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel">http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel</a><br></div></blockquote></div><br><div apple-content-edited="true"> <div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>William Moore</div><div><div>Wellcome Trust Centre for Gene Regulation &amp; Expression</div><div>College of Life Sciences</div><div>MSI/WTB/JBC Complex</div><div>University of Dundee</div><div>Dow Street</div><div>Dundee&nbsp; DD1 5EH</div><div>United Kingdom</div><div><br></div><div>Phone 01382 386364</div></div><div><a href="http://openmicroscopy.org">http://openmicroscopy.org</a></div></div></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></div><br class="Apple-interchange-newline"> </div><br></div></body></html>