Task #3250 (closed)
importing ome-tiff
Reported by: | jburel | Owned by: | |
---|---|---|---|
Priority: | critical | Milestone: | OMERO-Beta4.2.1 |
Component: | General | Version: | n.a. |
Keywords: | n.a. | Cc: | cxallan, mlinkert, jamoore, bwzloranger, ajpatterson |
Resources: | n.a. | Referenced By: | n.a. |
References: | n.a. | Remaining Time: | n.a. |
Sprint: | 2010-11-11 (19) |
Description (last modified by jburel)
- import ome-tiff from QA 2973. Import seems to work but after we have the following exception
Caused by: omero.InternalException serverStackTrace = "ome.conditions.InternalException: Wrapped Exception: (java.lang.IndexOutOfBoundsException): Index: 1, Size: 1 at java.util.ArrayList.RangeCheck(ArrayList.java:546) at java.util.ArrayList.get(ArrayList.java:321) at ome.logic.RenderingSettingsImpl.resetChannelBindings(RenderingSettingsImpl.java:702) at ome.logic.RenderingSettingsImpl.resetDefaults(RenderingSettingsImpl.java:535) at ome.logic.RenderingSettingsImpl.resetDefaults(RenderingSettingsImpl.java:454) at ome.logic.RenderingSettingsImpl.resetDefaults(RenderingSettingsImpl.java:1233) at ome.services.RenderingBean$13.doWork(RenderingBean.java:1542)
- import Ome-tiff from QA 2965. Import ok, black images
Change History (18)
comment:1 Changed 14 years ago by jburel
- Description modified (diff)
comment:2 Changed 14 years ago by jburel
- Cc bwzloranger added
comment:3 Changed 14 years ago by bwzloranger
- Description modified (diff)
comment:4 Changed 14 years ago by bwzloranger
comment:5 Changed 14 years ago by jburel
- Owner set to jburel
- Status changed from new to assigned
comment:6 Changed 14 years ago by jburel
commit r8549 fixes the first problem
The second one is working, needs to figure out why the channels are black. If I turned then to red and white, I can see what's there.
Closing ticket
comment:7 Changed 14 years ago by jburel
- Owner jburel deleted
- Status changed from assigned to new
re-opening. Second one (i.e. QA 2965) is importing
but the metadata are not. If I open the file I can see the following
<?xml version="1.0"?><OME xmlns="http://www.openmicroscopy.org/Schemas/OME/2008-02" xmlns:CA="http://www.openmicroscopy.org/Schemas/CA/2008-02" xmlns:STD="http://www.openmicroscopy.org/Schemas/STD/2008-02" xmlns:Bin="http://www.openmicroscopy.org/Schemas/BinaryFile/2008-02" xmlns:SPW="http://www.openmicroscopy.org/Schemas/SPW/2008-02" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openmicroscopy.org/Schemas/OME/2008-02 http://www.openmicroscopy.org/Schemas/OME/2008-02/ome.xsd" UUID="urn:uuid:583e4cdd-e828-41d1-a75e-b53caa8876ee"><Experiment ID="urn:lsid:loci.wisc.edu:Experiment:OWS348" Type="PGIDocumentation"><Description>4 Cell Embryo</Description><ExperimenterRef ID="urn:lsid:loci.wisc.edu:Experimenter:116"/></Experiment><Experimenter ID="urn:lsid:loci.wisc.edu:Experimenter:116"><FirstName>Maimoon</FirstName><LastName>Nasim</LastName><Email>mnasim@wisc.edu</Email><Institution></Institution><GroupRef ID="urn:lsid:loci.wisc.edu:Group:3"/></Experimenter><Instrument ID="urn:lsid:loci.wisc.edu:Instrument:OWS1"><Microscope Manufacturer="Nikon" Model="Eclipse TE300" SerialNumber="U629762" Type="Inverted"/><LightSource ID="urn:lsid:loci.wisc.edu:LightSource:OWS1" Manufacturer="Spectral Physics" Model="Tsunami 5W" SerialNumber="2123"><Laser Type="SolidState" LaserMedium="TiSapphire"/></LightSource><Detector ID="urn:lsid:loci.wisc.edu:Detector:OWS1" Type="PMT" Manufacturer="Hamamatzu" Model="H7422"/><Detector ID="urn:lsid:loci.wisc.edu:Detector:OWS2" Type="Photodiode" Manufacturer="Bio-Rad" Model="1024TLD"/><Objective ID="urn:lsid:loci.wisc.edu:Objective:OWS2" Manufacturer="Nikon" Model="S Fluor" SerialNumber="044989"><Correction>PlanApo</Correction><Immersion>Oil</Immersion><LensNA>1.40</LensNA><NominalMagnification>100</NominalMagnification><CalibratedMagnification>100.0</CalibratedMagnification><WorkingDistance>0.13</WorkingDistance></Objective></Instrument><Image Name="tubhiswt" ID="urn:lsid:loci.wisc.edu:Image:OWS348" DefaultPixels="urn:lsid:loci.wisc.edu:Pixels:OWS348"><CreationDate>2005-12-09T17:16:09</CreationDate><ExperimenterRef ID="urn:lsid:loci.wisc.edu:Experimenter:116"/><LogicalChannel ID="urn:lsid:loci.wisc.edu:LogicalChannel:OWS348-1"><LightSourceRef ID="urn:lsid:loci.wisc.edu:LightSource:OWS1"/><DetectorRef ID="urn:lsid:loci.wisc.edu:Detector:OWS1"/><ChannelComponent Pixels="urn:lsid:loci.wisc.edu:Pixels:OWS348" Index="1"/></LogicalChannel><LogicalChannel ID="urn:lsid:loci.wisc.edu:LogicalChannel:OWS348-2"><LightSourceRef ID="urn:lsid:loci.wisc.edu:LightSource:OWS1"/><DetectorRef ID="urn:lsid:loci.wisc.edu:Detector:OWS2"/><ChannelComponent Pixels="urn:lsid:loci.wisc.edu:Pixels:OWS348" Index="0"/></LogicalChannel><Pixels PixelType="uint8" SizeX="512" SizeY="512" SizeZ="1" DimensionOrder="XYZTC" ID="urn:lsid:loci.wisc.edu:Pixels:OWS348" BigEndian="false" SizeC="2" SizeT="1"><TiffData FirstC="0"><UUID FileName="tubhiswt_C1.ome.tif">urn:uuid:1fdb0a1a-5374-46da-bd24-d04e8cbf3175</UUID></TiffData><TiffData FirstC="1"><UUID FileName="tubhiswt_C2.ome.tif">urn:uuid:583e4cdd-e828-41d1-a75e-b53caa8876ee</UUID></TiffData></Pixels></Image></OME>
comment:8 Changed 14 years ago by jburel
- Description modified (diff)
Sorry for the cut and paste. Just open the content of the file and you will see that the metadata are not imported
comment:9 Changed 14 years ago by jburel
Opening the image in !ImageJ using the loci-plugin, I select metadata only, microscope etc not displayed
comment:10 Changed 14 years ago by jburel
Clarification:
- metadata are read
- metadata linked to channel i.e. detector, light source are imported and correctly linked
- Objective, instrument are read and inserted in the DB but not linked to the image. i.e. image.instrument = null b/c no instrument ref. Question: should we, in that case, insert instrument, objective etc?
- Nothing in Original metadata file.
comment:11 follow-up: ↓ 12 Changed 14 years ago by jburel
Why do the channels are black?
Nothing in the file indicate to set the channel to black but when the image is imported
we have in the channel table, red = green = blue = 0
comment:12 in reply to: ↑ 11 Changed 14 years ago by mlinkert
Replying to jburel:
Why do the channels are black?
Nothing in the file indicate to set the channel to black but when the image is imported
we have in the channel table, red = green = blue = 0
When the OME-XML in the file goes through the 2008-09 -> 2009-09 stylesheet, a default value of "4294967295" is inserted for the values of Channel.Color. When the XML then goes through the 2010-04 -> 2010-06 stylesheet, this value is converted to "-2147483648" (0x80000000). According to the schema documentation, this should correspond to 0xffffffff.
However, in OMEROMetadataStoreClient.setChannelColor, we have:
Channel o = getChannel(imageIndex, channelIndex); Color c = new Color(color); o.setRed(toRType(c.getRed())); o.setGreen(toRType(c.getGreen())); o.setBlue(toRType(c.getBlue())); o.setAlpha(toRType(c.getAlpha()));
Because 'color' is 0x80000000, c.getRed(), c.getGreen(), etc. return 0. One option would be to convert the Integer color to a java.awt.Color like this:
int unsignedColor = color; if (unsignedColor < 0) { unsignedColor += 2147483647; // unsignedColor should now be '0xffffffff' (but you'll want to double-check) } Color c = new Color(unsignedColor, true);
comment:13 Changed 14 years ago by jburel
Thanks for the clarification, I forgot about the XML conversion discussion.
comment:14 Changed 14 years ago by jburel
- Cc ajpatterson added
Black images due to a bug in the stylesheet. Adding Andrew to the ticket
comment:15 Changed 14 years ago by ajpatterson
Changed the calculation used in the transform. I thought it had to work in a different way. The up-shot of this was the direction of the negative part of the range was backwards.
http://www.ome-xml.org/changeset/691
comment:16 Changed 14 years ago by ajpatterson
- Old, the version from the 2010-04 file
- New-Fix, the version now
- Bug, the version before this fix
R G B A Decimal-Old Hex-Old Decimal-New-Fix Decimal-Bug 0 0 0 0 0 00000000 0 0 0 0 0 255 255 000000FF 255 255 0 0 255 0 65280 0000FF00 65280 65280 0 0 255 255 65535 0000FFFF 65535 65535 0 255 0 0 16711680 00FF0000 16711680 16711680 0 255 0 255 16711935 00FF00FF 16711935 16711935 0 255 255 0 16776960 00FFFF00 16776960 16776960 0 255 255 255 16777215 00FFFFFF 16777215 16777215 127 255 255 254 2147483646 7FFFFFFE 2147483646 2147483646 127 255 255 255 2147483647 7FFFFFFF 2147483647 2147483647 128 0 0 0 2147483648 80000000 -2147483648 2147483648 128 0 0 1 2147483649 80000001 -2147483647 -1 128 0 0 2 2147483650 80000002 -2147483646 -2 128 255 255 254 2164260862 80FFFFFE -2130706434 -16777214 128 255 255 255 2164260863 80FFFFFF -2130706433 -16777215 129 0 0 0 2164260864 81000000 -2130706432 -16777216 129 0 0 1 2164260865 81000001 -2130706431 -16777217 129 255 255 255 2181038079 81FFFFFF -2113929217 -33554431 255 0 0 0 4278190080 FF000000 -16777216 -2130706432 255 0 0 255 4278190335 FF0000FF -16776961 -2130706687 255 0 255 0 4278255360 FF00FF00 -16711936 -2130771712 255 0 255 255 4278255615 FF00FFFF -16711681 -2130771967 255 255 0 0 4294901760 FFFF0000 -65536 -2147418112 255 255 0 255 4294902015 FFFF00FF -65281 -2147418367 255 255 255 0 4294967040 FFFFFF00 -256 -2147483392 255 255 255 254 4294967294 FFFFFFFE -2 -2147483646 255 255 255 255 4294967295 FFFFFFFF -1 -2147483647
comment:17 Changed 14 years ago by jburel
- Resolution set to fixed
- Status changed from new to closed
latest version of B-F with new stylesheet fixes the problem of black channel.
Updated BF to 7157 in commit r8549 (which should fix this problem)