Page 1 of 2

Color channel default assignment during import

PostPosted: Thu Feb 27, 2014 10:05 pm
by dsudar
Hi all,
When importing multi-color channel image data (in my case Olympus ScanR screen-type data) which does not encode the "appropriate" display color of each of the channels, OMERO's rendering engine defaults to the order Red, Green, Blue. Unfortunately my data was acquired in the order DAPI, A488, A568 so the order Blue, Green, Red would be more appropriate as a default. Is there a way during import to set a different default color channel order?
Thanks,
- Damir

Re: Color channel default assignment during import

PostPosted: Fri Feb 28, 2014 10:34 am
by mtbc
I am afraid that there isn't, but it is certainly an idea worth considering so I have added your note to a relevant Trac ticket at http://trac.openmicroscopy.org.uk/ome/ticket/7709.

If you (or any other readers) would like to be cc'd by e-mail on changes to that ticket, I'll be happy to add you.

Re: Color channel default assignment during import

PostPosted: Fri Feb 28, 2014 11:06 am
by wmoore
In the meantime, you might be able to adapt a script called "Restore colors" listed on the scripts page: http://www.openmicroscopy.org/site/community/scripts. This was originally developed for LSM and LIF formats and it uses attributes in the 'Original Metadata' for each image to set the channel colours after import. If you can find equivalent metadata in the 'Original Metadata' (middle panel on the right) then you could adapt this script to work with your Scan-R data.
However, I just checked some Scan-R data I just imported and I don't see any useful info in the Original Metadata, so, you could just hard-code the colours in the script.

But probably your best bet is to manually set the rendering settings on one image in the Preview tab on the right and "apply to all" of the other images after import.

On another topic - I noticed that my ScanR import doesn't create a Plate of Wells, I just get a load of images. Do you get a Plate on import? Do you expect to get a Plate, or just a list of images/wells?

Re: Color channel default assignment during import

PostPosted: Thu Mar 13, 2014 7:57 pm
by dsudar
Hi Will and MTBC,

Thanks for the responses. Yes, please add me to Trac ticket 7709.

Adapting the "Restore Colors" script is a good idea and a reasonable kludge for now. I'll look at that.

I've indeed been doing the manual set rendering settings and apply-all approach but unless I'm mistaken, that only changes it for me, the owner, and not for the other members of the Group accessing the data, right?

Yes, for my ScanR experiments the importer (both from within Insight client and using the import cli) does automatically executes a plate import and knows quite a bit about the plate layout etc. Would you like me to upload a dataset so you can see the difference between your example data and what I have? Warning that they're kinda big since a full experiment is 384 wells with 4 fields per well in 3 or 4 colors. Just let me know where to upload.

Thanks,
- Damir

Re: Color channel default assignment during import

PostPosted: Fri Mar 14, 2014 10:16 am
by wmoore
Hi,

You're right - the manual approach of applying rendering settings only changes it for the owner. We have a ticket to address that issue (to use the owner's settings by default http://trac.openmicroscopy.org.uk/ome/ticket/11065).

However, it is possible when viewing someone else's images in OMERO.insight to right click on the Dataset in the tree hierarchy on the left and choose "Rendering Settings > Set Owner's Settings" for a whole dataset at a time.

You can upload files here http://qa.openmicroscopy.org.uk/qa/upload/ up to a 2GB limit I think. If you have a large number of separate files, or your format is not supported, you might find it easier to zip everything up first.

Regards,
Will.

Re: Color channel default assignment during import

PostPosted: Sat Mar 15, 2014 2:34 am
by dsudar
Hi Will,

Thanks for the quick followup. Great that you're opening a ticket for making the owner rendering settings the default and yes, in Insight folks can easily apply my rendering settings but that's not an option for my group members using the web client.

I wanted to upload a dataset of ScanR data but the smallest one came to 2.7GB after zipping. So I uploaded it to UbuntuOne and shared it with you. You should have gotten an invitation (on your Dundee email account) from UbuntuOne to look at my shared data folder and please let me know once you got it. The data is from a partially filled 384-well plate (and BioFormats/OMERO understands that when importing) with 4 colors and 4 fields per well. My 4.4.10 importer has no trouble with it (except that it barfs on and then ignores the .sca file) but it does demonstrate some issues with the ScanR importing: the associated datafiles in the HCC1143 directory are automatically imported (great!!!!) and they show up in the web client as "Companion Files" (under Acquisition) but in Insight, they are nowhere to be found. All this is under 4.4.10 (still hoping to find a few hours of time to install and test 5.0 ....).

This dataset also demonstrates my issue that the default channel color order RGB is not great for this type of data which was acquired in the order DAPI,Alexa488,A568,A647. I looked at your suggestion to adapt Restore_colors.py and while I can clearly see that it should be relatively easy to do so, my negligible Python programming skills are not exactly up to the task. Any chance you have a few minutes to whip up a script that simply sets the colors to the order blue, green, red, cyan?

Thanks again and have a great weekend,
- Damir

Re: Color channel default assignment during import

PostPosted: Tue Mar 18, 2014 9:59 am
by wmoore
Hi
Sorry, yes - I did receive the link to your data on UbuntuOne and I've just started downloading now (going to take a while!).

I'll have a go at adapting the script but I'll add parameters for the user to input the colours they want, since this will make it generally useful for other users & data.

Cheers,

Will.

Re: Color channel default assignment during import

PostPosted: Tue Mar 18, 2014 6:23 pm
by dsudar
Thanks Will. Yes, being able to select the color for each channel in the script's UI would be very flexible and useful. I really appreciate you taking the time to look at this.
And I hope the ScanR dataset will be useful for testing.
Cheers,
- Damir

Re: Color channel default assignment during import

PostPosted: Tue Mar 18, 2014 11:19 pm
by wmoore
Hi Damir,

I made a couple of changes to the Restore_colors script and you can see the changes in my PR at https://github.com/ppouchin/omero-user-scripts/pull/3

You can grab the script at https://raw.github.com/will-moore/omero ... _colors.py

You can select the Plate in the tree, then run the Restore_colors script and choose the colours you want (see screenshot).

This script takes some time to run on the ScanR data you sent (resetting the default rendering settings is slow) but it does eventually complete. Hopefully it will also work on your larger Plates, but if not we could look for a more efficient way of resetting the default settings.

Hope this does the job!

Will.

Re: Color channel default assignment during import

PostPosted: Sat Mar 22, 2014 12:47 am
by dsudar
Thanks Will, it looks like this will indeed do what I need. As you predicted, it is a bit slow but does complete even for full 384-well plates with 4 fields and 4 channels. Really appreciated!!!

So I first tested it on my 4.4.10 installation and I'm now in the process of upgrading to 5.0.0 and will test it there as well.

Cheers,
- Damir