[ome-devel] ScanR Reader

Rubén Muñoz ruben.munoz at embl.de
Wed May 5 15:59:55 BST 2010


Dear Melissa, 

Bioformats has incorporated many changes lately, it works for me when I compile loci_tools.jar directly from the SVN. As of yesterday the pre-compiled .jar from your page didn't open the ScanR datasets, please let me know if I can give more details on this. 

The reason of my e-mail are some code improvements in ScanrReader.java,

1)   Setting nPos = realPosCount and after you core = new CoreMetadata[nWells * nPos]; you're getting too many positions in the core array.

2) row + col gives a concatenation of strings but for small layouts (some people uses small 8-well plates) this results 651?. I introduced here the Well number (different to the Spot number), you may want  to change this but just the Well number is of help here.

3) In newer acquisitions "timeloop real" was replaced by "timeloop count" and it is 0 for only 1 timepoint acquisitions, so I had to add one (+ 1) to the parsed value.

Please let me know any comment regarding the previous changes, they all might be of help.

Thanks and regards,

Rubén



Index: ScanrReader.java
===================================================================
--- ScanrReader.java	(revision 6224)
+++ ScanrReader.java	(working copy)
@@ -347,7 +347,7 @@
       wellColumns = uniqueColumns.size();
       nWells = wellRows * wellColumns;
     }
-    nPos = realPosCount;
+    //nPos = realPosCount;
 
     reader = new MinimalTiffReader();
     reader.setId(tiffs[0]);
@@ -420,11 +420,14 @@
       store.setWellSampleImageRef(imageID, 0, well, field);
       store.setImageID(imageID, i);
 
-      String row =
-        String.valueOf(wellRows > 26 ? wellRow + 1 : (char) ('A' + wellRow));
-      String col =
-        String.valueOf(wellRows > 26 ? (char) ('A' + wellCol) : wellCol + 1);
-      String name = "Well " + row + col + ", Field " + (field + 1) +
+      //String row =
+      //  String.valueOf(wellRows > 26 ? wellRow + 1 : (char) ('A' + wellRow));
+      //String col =
+      //  String.valueOf(wellRows > 26 ? (char) ('A' + wellCol) : wellCol + 1);
+      
+      int wellIndex = wellRow*wellColumns + wellCol + 1;
+
+      String name = "Well " + wellIndex + ", Field " + (field + 1) +
         " (Spot " + (i + 1) + ")";
       store.setImageName(name, i);
     }
@@ -479,8 +482,8 @@
         else if (key.equals("# slices")) {
           core[0].sizeZ = Integer.parseInt(value);
         }
-        else if (key.equals("timeloop real")) {
-          core[0].sizeT = Integer.parseInt(value);
+        else if (key.equals("timeloop count") || key.equals("timeloop real")) {
+          core[0].sizeT = Integer.parseInt(value) + 1;
         }
         else if (key.equals("name")) {
           channelNames.add(value);







More information about the ome-devel mailing list