<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
I’m afraid I haven’t been following the whole discussion but, in case it helps…
<div class="">We’ve found that scaling the displayed intensity  to something like the 99th percentile of actual maximum intensity</div>
<div class=""> does a reasonable job of producing an “acceptable” image without user intevention.</div>
<div class=""><br class="">
</div>
<div class="">Best Wishes</div>
<div class=""><br class="">
</div>
<div class="">Ian</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">
<div>
<blockquote type="cite" class="">
<div class="">On 16 Aug 2017, at 07:47, Damir Sudar <<a href="mailto:dsudar@lbl.gov" class="">dsudar@lbl.gov</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" style="font-family: Helvetica; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
Hi Josh,
<div class=""><br class="">
</div>
<div class="">> <span style="font-size: 12.800000190734863px;" class="">Something like </span><a href="https://github.com/ome/scripts/pull/103" rel="noreferrer" target="_blank" style="font-size: 12.800000190734863px;" class="">https://github.com/ome/<wbr class="">scripts/pull/103</a><span style="font-size: 12.800000190734863px;" class=""> (also
 unmerged)</span></div>
<br style="font-size: 12.800000190734863px;" class="">
<div class="">Yes, that's a great starting point, thanks!. That's actually an interesting discussion in there.</div>
<div class=""><br class="">
</div>
<div class="">Cheers,</div>
<div class="">- Damir</div>
</div>
<div class="gmail_extra" style="font-family: Helvetica; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">
<br class="">
<div class="gmail_quote">On Tue, Aug 15, 2017 at 8:16 AM, Josh Moore<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:josh@glencoesoftware.com" target="_blank" class="">josh@glencoesoftware.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br class="">
<blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;">
Hi Damir,<br class="">
<br class="">
On Fri, Aug 11, 2017 at 6:15 PM, Damir Sudar <<a href="mailto:dsudar@lbl.gov" class="">dsudar@lbl.gov</a>> wrote:<br class="">
> Hi Josh,<br class="">
><br class="">
> On 8/11/2017 8:32, Josh Moore wrote:<br class="">
...<br class="">
>>> Now the philosophical question: as in IDR, we have a very large image<br class="">
>>> dataset that we are quantitatively analyzing and also want to show<br class="">
>>> visually.<br class="">
>>> This is part of a large project to asses the effects of a set of<br class="">
>>> perturbing<br class="">
>>> agents (perturbagens) on a panel cell lines, where in our case a large<br class="">
>>> panel<br class="">
>>> of different microenvironment components and drugs are used as the<br class="">
>>> perturbagens. During import into OMERO each image gets its rendering<br class="">
>>> settings from the min/max values in the image itself so all images have<br class="">
>>> different settings and the unsuspecting viewer may see all kinds of<br class="">
>>> interesting intensity effects that are mostly fake while real effects may<br class="">
>>> be<br class="">
>>> masked. So I'm looking for a general way to set the rendering settings<br class="">
>>> across the entire experiment to something that allows comparing images<br class="">
>>> but<br class="">
>>> doesn't generate loads of black and over-exposed-looking images. I was<br class="">
>>> thinking that you guys encountered this same issue with many of the IDR<br class="">
>>> datasets so was hoping for some wise thoughts.<br class="">
>><br class="">
>> We definitely do but per study, and typically we can only define that<br class="">
>> after visual inspection since they are external datasets. You're<br class="">
>> looking to set something *before import*?<br class="">
><br class="">
><br class="">
> No, after import makes more sense since one doesn't really know what the<br class="">
> expected min and max values and desired range setting are going to be, just<br class="">
> as you said. We have been playing with ideas such as:<br class="">
> - we could look at the min and max values per channel across a "set" of<br class="">
> wells/plates (tbd what a "set" means) and set the rendering settings to be<br class="">
> at 2% - 98% (or something) of those values. I'd need to write a script to<br class="">
> extract such min/max values for a "set" of plates and then we could test<br class="">
> what those percent values should be for a pleasing result.<br class="">
<br class="">
Something like<span class="Apple-converted-space"> </span><a href="https://github.com/ome/scripts/pull/103" rel="noreferrer" target="_blank" class="">https://github.com/ome/<wbr class="">scripts/pull/103</a><span class="Apple-converted-space"> </span>(also
 unmerged)<br class="">
<br class="">
<br class="">
> - question to answer then is: what is a "set" and we're back to different<br class="">
> rendering settings when you do want to compare images across "sets".<br class="">
> - one option is to let an external query/visualization tool set the<br class="">
> rendering settings. The OMERO webgateway allows you to query the min/max<br class="">
> (via a JSON query) and set the rendering settings via the UR. So that would<br class="">
> rely on an external visualization software do the "right" thing.<br class="">
> Just to give you an idea of the data we're dealing with, check out our<br class="">
> AWS-hosted public server at:<br class="">
><span class="Apple-converted-space"> </span><a href="https://omero.lincsclarion.org/webclient/userdata/?experimenter=52" rel="noreferrer" target="_blank" class="">https://omero.lincsclarion.<wbr class="">org/webclient/userdata/?<wbr class="">experimenter=52</a><br class="">
> The front-end portal with query/visualization tools is still being built.<br class="">
<br class="">
Looking forward to it!<br class="">
<br class="">
<br class="">
>>> Anyway, this is why I'm so interested in the render.py utility and thus<br class="">
>>> my hope it will make it to production-level soon.<br class="">
>><br class="">
>> I don't have a timeline for you on the production status of render.py,<br class="">
>> but what we *would* like to do for 5.4 is make it separately<br class="">
>> installable, so that you can upgrade just render.py as we releases<br class="">
>> fixes without needing to update all of OMERO.<br class="">
><br class="">
><br class="">
> That sounds like a great approach.<br class="">
<br class="">
We'll keep you posted.<br class="">
<br class="">
<br class="">
>> P.S. from your Jul 12th email while I was on vacation:<br class="">
>><br class="">
>>> Meanwhile, I had kludged together a regular OMERO script<br class="">
>>> (HCS_Render_Settings.py) that does a number of the things that the render.py<br class="">
>>> plugin does but much much less elegantly and very slowly. I'll use that for<br class="">
>>> now. That script is on:<span class="Apple-converted-space"> </span><a href="https://github.com/dsudar/OMEROscripts" rel="noreferrer" target="_blank" class="">https://github.com/dsudar/<wbr class="">OMEROscripts</a><br class="">
>><br class="">
>> There's no inherent reason a script should be slower that the CLI. Do<br class="">
>> you have specifics?<br class="">
><br class="">
><br class="">
> I think it's mostly that my script is not at all efficiently implemented<br class="">
> where it does repeated calls to objects to first get metadata (such as value<br class="">
> ranges) and then again to set values and probably causes multiple thumbnail<br class="">
> creation calls.<br class="">
<br class="">
Understood. ~J<br class="">
<br class="">
<br class="">
<br class="">
> Cheers,<br class="">
> - Damir<br class="">
><br class="">
>>> On 7/10/2017 6:45, Josh Moore wrote:<br class="">
>>>><br class="">
>>>><br class="">
>>>>> Next I tried a few of the basic commands of the render plugin:<br class="">
>>>>> 1 ---<br class="">
>>>><br class="">
>>>> ...<br class="">
>>>>><br class="">
>>>>>     File<br class="">
>>>>> "/home/omero_user/OMERO.<wbr class="">server/lib/python/omero/<wbr class="">plugins/render.py",<br class="">
>>>>> line 117, in init_from_channel<br class="">
>>>>>       self.min = channel.getWindowMin()<br class="">
>>>><br class="">
>>>> ...<br class="">
>>>>><br class="">
>>>>> omero.UnloadedEntityException: Object unloaded:object #0<br class="">
>>>><br class="">
>>>> Vanilla 5.2 is not loading the necessary metadata for the plugin to<br class="">
>>>> work. Unfortunately, solving this isn't as simple as copying a new<br class="">
>>>> file into your installation. In fact, I haven't yet found a smoking<br class="">
>>>> gun between the versions.<br class="">
>>>><br class="">
>>>><br class="">
>>>>> 2---<br class="">
>>>>> AttributeError: 'ImageI' object has no attribute '_closeRE'<br class="">
>>>>> ---<br class="">
>>>><br class="">
>>>> Here again, changes from 5.3 are not available in your version, though<br class="">
>>>> at least these I know where they come from.<br class="">
>>>><br class="">
>>>><br class="">
>>>>> Rather than trying more of this, I thought to check with you first<br class="">
>>>>> whether<br class="">
>>>>> I'm missing something fundamental.<br class="">
>>>><br class="">
>>>> 5.3 :) (or the upcoming 5.4)<br class="">
>>>><br class="">
>>>> Fundamentally, the plugin is not production quality and has only been<br class="">
>>>> used in isolated situations. We certainly intend to get it into the<br class="">
>>>> testing pipeline for 5.4 but that's not likely to uncover what's going<br class="">
>>>> on with 5.2. If you or anyone on your side wants to continue digging,<br class="">
>>>> we're happy to evaluate your changes, but there's a question of how<br class="">
>>>> far you want to go in modifying your local installation.<br class="">
>>>><br class="">
>>>> Cheers,<br class="">
>>>> ~Josh.<br class="">
>>>><br class="">
>>>><br class="">
>>>><br class="">
>>>>> Thanks,<br class="">
>>>>> - Damir<br class="">
>>>>><br class="">
>>>>> On 6/2/2017 2:35, Simon Li wrote:<br class="">
>>>>><br class="">
>>>>> The render plugin (not tested on 5.3):<br class="">
>>>>><br class="">
>>>>><br class="">
>>>>><span class="Apple-converted-space"> </span><a href="https://github.com/openmicroscopy/openmicroscopy/blob/metadata53/components/tools/OmeroPy/src/omero/plugins/render.py" rel="noreferrer" target="_blank" class="">https://github.com/<wbr class="">openmicroscopy/openmicroscopy/<wbr class="">blob/metadata53/components/<wbr class="">tools/OmeroPy/src/omero/<wbr class="">plugins/render.py</a><br class="">
>>>>> Try dropping this into OMERO.server/lib/python/omero/<wbr class="">plugins/<br class="">
>>>>><br class="">
>>>>> Example YAML render settings file:<br class="">
>>>>><br class="">
>>>>><br class="">
>>>>><span class="Apple-converted-space"> </span><a href="https://github.com/IDR/idr-metadata/blob/master/idr0015-UNKNOWN-taraoceans/screenA/idr0015-screenA-renderdef.yml" rel="noreferrer" target="_blank" class="">https://github.com/IDR/idr-<wbr class="">metadata/blob/master/idr0015-<wbr class="">UNKNOWN-taraoceans/screenA/<wbr class="">idr0015-screenA-renderdef.yml</a><br class="">
>>>>><br class="">
>>>>> omero render edit --help<br class="">
>>>>> omero render edit --copy Plate:1 renderdef.yml<br class="">
>>>>> omero render copy Image:SrcID Plate:TargetID<br class="">
><br class="">
<span class="HOEnZb"><font color="#888888" class="">><br class="">
> --<br class="">
> Damir Sudar - Affiliate Scientist<br class="">
> Lawrence Berkeley Natl Laboratory / MBIB<br class="">
> One Cyclotron Road, MS 977, Berkeley, CA 94720, USA<br class="">
> T:<span class="Apple-converted-space"> </span><a href="tel:510%2F486-5346" value="+15104865346" class="">510/486-5346</a><span class="Apple-converted-space"> </span>- F:<span class="Apple-converted-space"> </span><a href="tel:510%2F486-5586" value="+15104865586" class="">510/486-5586</a><span class="Apple-converted-space"> </span>-
 E:<span class="Apple-converted-space"> </span><a href="mailto:DSudar@lbl.gov" class="">DSudar@lbl.gov</a><br class="">
><span class="Apple-converted-space"> </span><a href="http://biosciences.lbl.gov/profiles/damir-sudar-2/" rel="noreferrer" target="_blank" class="">http://biosciences.lbl.gov/<wbr class="">profiles/damir-sudar-2/</a><br class="">
><br class="">
> Visiting Scientist, Oregon Health & Science University<br class="">
><br class="">
</font></span></blockquote>
</div>
<br class="">
<br clear="all" class="">
<div class=""><br class="">
</div>
--<span class="Apple-converted-space"> </span><br class="">
<div class="gmail_signature" data-smartmail="gmail_signature">
<div dir="ltr" class="">
<div class="">
<div dir="ltr" class="">
<div class="">
<div dir="ltr" class="">
<div class="">
<div dir="ltr" class="">
<div class="">
<div dir="ltr" class="">Damir Sudar - Affiliate Staff Scientist<br class="">
Lawrence Berkeley National Laboratory<br class="">
One Cyclotron Road, MS 977, Berkeley, CA 94720, USA<br class="">
T: 510/486-5346 - F: 510/486-5586 - E:<span class="Apple-converted-space"> </span><a href="mailto:DSudar@lbl.gov" target="_blank" class="">DSudar@lbl.gov</a><br class="">
<br class="">
</div>
</div>
<div class="">Visiting Scientist, Oregon Health and Science University</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<span style="font-family: Helvetica; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">_______________________________________________</span><br style="font-family: Helvetica; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span style="font-family: Helvetica; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">ome-devel
 mailing list</span><br style="font-family: Helvetica; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<a href="mailto:ome-devel@lists.openmicroscopy.org.uk" style="font-family: Helvetica; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">ome-devel@lists.openmicroscopy.org.uk</a><br style="font-family: Helvetica; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<a href="http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel" style="font-family: Helvetica; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel</a></div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>