New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
7856 flim ann #820
7856 flim ann #820
Conversation
This is largely a cleanup of the three copies of modulo creation for Z, T, and C. Notable is the call to Image.linkAnnotation which was not previously being called. Without this, OMERO is not aware of the annotation.
This is a suboptimal solution since it will require other interface implementors to also implement the new methods, but this was the simplest way to provide the necessary XML parsing for individual elements.
setValue() on the Modulo object was causing bfconvert to fail due to XML parsing. This has now been disabled. At the same time the NS elements from asXMLElement() have been removed creating the desired block of XML: ``` <XMLAnnotation ID="Annotation:90" Namespace="openmicroscopy.org/omero/dimension/modulo"> <Value> <ModuloAlongT End="12304.687643793777" Start="0.0" Step="195.3125022824409" Type="lifetime" TypeDescription="TCSPC" Unit="ps"/> </Value> </XMLAnnotation> ```
XMLTools now permits disabling the `<? xml` block on writeXML and dumpXML which allows us to move a step further, though bfconvert is still failing with: ``` Exception in thread "main" java.lang.RuntimeException: loci.common.services.ServiceException: java.lang.RuntimeException: Value node list size 2 != 1 ```
Note: the private 'value' field hides the proper xmlannotation 'value' field which is a bit confusing.
With the committed changes, the bottom of the tiffcomment (xmllinted) looks like this:
|
@@ -36,6 +36,9 @@ | |||
|
|||
package loci.formats.ome; | |||
|
|||
import org.w3c.dom.Document; | |||
import org.w3c.dom.Element; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary imports?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix pushed.
+1 otherwise. Importing an .sdt file into OMERO does show that the modulo annotation is being stored/retrieved correctly, as the slider shows "t" and the corresponding value in ps. I will need to fix some parsing problems in |
This does cause some jobs to fail, e.g. http://hudson.openmicroscopy.org.uk/view/Bio-Formats/job/BIOFORMATS-test_images_good/659 with errors similar to:
|
For /ome/data_repo/test_images_good/metamorph/jae/RGB_s34.tif `getImage(imageIdx)` throws an IndexOutOfBounds exception since there are no images detected. In this case, modulo handling is exiting prematurely since there's no image to link to.
Removing |
In order to be properly tested, these classes need to be made public. This is also the beginning of the definition of their public API which will also be further defined via ticket 4536
problem reported by @imunro. The image has only one XML annotation One is generated and one is read from the file itself. 2 annotations with different ids end up being linked to the image. |
jburel's comment above refers to importing one-tiffs via insight. |
The plan is to replace |
"rotation" was also requested in @rleigh-dundee's http://trac.openmicroscopy.org.uk/ome/ticket/11720 See also http://trac.openmicroscopy.org.uk/ome/ticket/11721 We'll need to discuss specific next steps today. |
@joshmoore: The ticket is for the same reason, I did not have access to trac to find the number |
Following exception was thrown for start=0.0 when converting an ome.tiff with modulo annotation back to ome.tiff: ``` Populating metadata Exception in thread "main" java.lang.NumberFormatException: For input string: "0.0" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) at java.lang.Integer.parseInt(Integer.java:492) at java.lang.Integer.parseInt(Integer.java:527) at loci.formats.services.OMEXMLServiceImpl.getModuloAlong(OMEXMLServiceImpl.java:564) at loci.formats.services.OMEXMLServiceImpl.getModuloAlongT(OMEXMLServiceImpl.java:528) at loci.formats.in.OMETiffReader.initFile(OMETiffReader.java:834) at loci.formats.FormatReader.setId(FormatReader.java:1360) at loci.formats.ImageReader.setId(ImageReader.java:781) at loci.formats.tools.ImageConverter.testConvert(ImageConverter.java:337) at loci.formats.tools.ImageConverter.main(ImageConverter.java:672) ```
Previously, when trying: ``` ./bfconvert -no-upgrade -overwrite FLIM-modulo-sample.ome.tiff /tmp/flim.ome.tiff ``` Two modulo annotation blocks appear in the output TIFF comment. With this commit, later calls to addModulo() are silently ignored.
Tested with the CZI from QA 7555:
|
This all seems fine - happy to merge. @jburel/@imunro, any objections? |
No objections from me. |
good to go |
--no-rebase |
This branch propagates the XMLAnnotation created by Bio-Formats on reading the FLIM settings of .sdt file. The block should be equivalent to the xml found by running:
The OMERO annotation can typically be found with:
Current issues with this PR:
It seems to have broken the bfconvert usage which quite critical ("Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 13; The processing instruction target matching "[xX][mM][lL]" is not allowed.")Namespace handling in the Annotation blocks is not correct. ("warning : xmlns: URI openmicroscopy.org/.../modulo is not absolute" is printed by xmllint).The value generated should match https://www.openmicroscopy.org/site/support/ome-model/developers/6d-7d-and-8d-storage.htmlThe API changes to(rolled back)OMEXMLMetadata
are likely not appropriate./cc @melissalinkert @jburel