[ome-users] Tiff comment missing from metadata?

Roger Leigh rleigh at dundee.ac.uk
Tue Feb 10 11:49:09 GMT 2015


On 09/02/15 12:13, Mario Emmenlauer wrote:
>
> thanks for the very quick response! I can see how your proposed
> change fixes my issue no. 2. But there remains issue no. 1. :-)
> Attached you can find a small patch that I tried that for me
> returns additional meta data on the test image. But beware: it
> was not clear to me what the correct behavior should be, so this
> patch is possibly not a perfect solution (though it improves the
> behavior for me). Below more:

Just to double-check, the only lines I can see which aren't being parsed
properly are "Plate Screen" and "Acquired from Photometrics".  Are these
the lines you are referring to?  I'm likewise not entirely sure what the
correct behaviour should be for these.

Thanks for the patch.  I've made the change below which I think should
do the same thing but without moving the comment appending out of the
else block.  Does this do the right thing for you?


Thanks,
Roger


diff --git
a/components/formats-gpl/src/loci/formats/in/MetamorphReader.java
b/components/formats-gpl/src/loci/formats/in/MetamorphReader.java
index 654543b..f393aab 100644
--- a/components/formats-gpl/src/loci/formats/in/MetamorphReader.java
+++ b/components/formats-gpl/src/loci/formats/in/MetamorphReader.java
@@ -1157,16 +1157,16 @@ public class MetamorphReader extends
BaseTiffReader {

          int colon = line.indexOf(":");

-        String descrValue = null;
-
          if (colon < 0) {
            // normal line (not a key/value pair)
            if (line.length() > 0) {
              // not a blank line
-            descrValue = line;
+            sb.append(line);
+            sb.append("  ");
            }
          }
          else {
+          String descrValue = null;
            if (i == 0) {
              // first line could be mangled; make a reasonable guess
              int dot = line.lastIndexOf(".", colon);


--
Dr Roger Leigh -- Open Microscopy Environment
Wellcome Trust Centre for Gene Regulation and Expression,
College of Life Sciences, University of Dundee, Dow Street,
Dundee DD1 5EH Scotland UK   Tel: (01382) 386364

The University of Dundee is a registered Scottish Charity, No: SC015096



More information about the ome-users mailing list