We're Hiring!

Color of each Channel

General and open developer discussion about using OMERO APIs from C++, Java, Python, Matlab and more! Please new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

If you are having trouble with custom code, please provide a link to a public repository, ideally GitHub.

Color of each Channel

Postby bhcho » Tue Nov 23, 2010 8:08 pm

Hi All,

I generated a ome.tif image with 3 different channel. But I wrote the ome-xml part directly by myself and overwrote. However, when I see the image from OMERO.insight after I import it to my server (4.2.1), the color of each channel is blue, green, blue for channel 0, 1, 2, respectively.
I thought it is usually ordered as red, green, and blue for ch 0, 1, 2.

the ome-xml part of theimage is something like this. could anyone tell me about this?

Code: Select all
<OME xmlns="http://www.openmicroscopy.org/Schemas/OME/2010-06" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openmicroscopy.org/Schemas/OME/2010-06  http://www.openmicroscopy.org/Schemas/OME/2010-06/ome.xsd">
   <Instrument ID="Instrument:In001">
   <Microscope Manufacturer="Beckman-Coulter" SerialNumber="S4SID479780"/><Detector ID="Detector:D004" Manufacturer="Orca" Model="C4742-80-12AG" SerialNumber="620280" Type="CCD"/><Objective ID="Objective:O005" LensNA="0.9" Manufacturer="Nikon" Model="S Fluor" NominalMagnification="40" SerialNumber="062364"/><Filter ID="Filter:0" Type="BandPass">
        <TransmittanceRange CutIn="477" CutOut="491"/>
     </Filter><Filter ID="Filter:1" Type="BandPass">
        <TransmittanceRange CutIn="502" CutOut="532"/>
     </Filter><Filter ID="Filter:2" Type="BandPass">
        <TransmittanceRange CutIn="437" CutOut="451"/>
     </Filter><Filter ID="Filter:3" Type="BandPass">
        <TransmittanceRange CutIn="351" CutOut="373"/>
     </Filter><Filter ID="Filter:4" Type="BandPass">
        <TransmittanceRange CutIn="321" CutOut="350"/>
     </Filter><Filter ID="Filter:5" Type="BandPass">
        <TransmittanceRange CutIn="200" CutOut="211"/>
     </Filter></Instrument>
   <Image ID="Image:I001">
      <InstrumentRef ID="Instrument:In001">
      </InstrumentRef>
      <Pixels DimensionOrder="XYCZT" ID="Pixels:P001" SizeC="3" SizeT="1" SizeX="1344" SizeY="1024" SizeZ="1" Type="uint8">
      <Channel ID="Channel:0:0" Name="dna" SamplesPerPixel="1">
         <LightPath>
            <ExcitationFilterRef ID="Filter:2"/>
           <EmissionFilterRef ID="Filter:3"/>
        </LightPath>
      </Channel><Channel ID="Channel:0:1" Name="ATP_synthase" SamplesPerPixel="1">
         <LightPath>
            <ExcitationFilterRef ID="Filter:0"/>
           <EmissionFilterRef ID="Filter:1"/>
        </LightPath>
      </Channel><Channel ID="Channel:0:2" Name="autofluorescence" SamplesPerPixel="1">
         <LightPath>
            <ExcitationFilterRef ID="Filter:4"/>
           <EmissionFilterRef ID="Filter:5"/>
        </LightPath>
      </Channel><TiffData FirstC="0" FirstT="0" FirstZ="0" IFD="0" PlaneCount="1"/><TiffData FirstC="1" FirstT="0" FirstZ="0" IFD="1" PlaneCount="1"/><TiffData FirstC="2" FirstT="0" FirstZ="0" IFD="2" PlaneCount="1"/><Plane ExposureTime="4" TheC="0" TheT="0" TheZ="0"/><Plane ExposureTime="5" TheC="1" TheT="0" TheZ="0"/><Plane ExposureTime="6" TheC="2" TheT="0" TheZ="0"/></Pixels>
   </Image>
</OME>



And could you also tell me how to apply a manual color to each channel?
I know there is an attribute in the ome-xml where I can change the color for each channel.
which is /OME/Image/Pixels/Channel@Color.
the color value should be a signed 32 bit value.
then what is the 32bit signed number for Red, Green, and Blue color?
bhcho
 
Posts: 236
Joined: Mon Apr 05, 2010 2:15 pm

Re: Color of each Channel

Postby jburel » Thu Nov 25, 2010 4:21 pm

Hi

Unless there is a color assigned to a channel, we try to determine the color by looking at the metadata in the following order:
* emission wavelength
* emission filter.
* excitation wavelength
* excitation filter
If it was not possible to determine the color, we then go for RED, GREEN, BLUE.

In your example, we use the transmittance range to determine the color

jmarie
User avatar
jburel
Team Member
 
Posts: 348
Joined: Thu May 21, 2009 6:38 pm
Location: dundee

Re: Color of each Channel

Postby bhcho » Thu Nov 25, 2010 4:32 pm

Hi jmarie,

that's really cool.
I put the transmittance ranges in the example just temporarily.

Thanks,
BK
bhcho
 
Posts: 236
Joined: Mon Apr 05, 2010 2:15 pm


Return to Developer Discussion

Who is online

Users browsing this forum: Google [Bot] and 0 guests