[ome-devel] ScanR Reader

Melissa Linkert melissa at glencoesoftware.com
Thu May 13 21:44:41 BST 2010


Hi Rubén,

Thanks for the feedback, and my apologies for not responding sooner.

I have committed a slightly modified version of your patch (SVN r6313)
which addresses points (1) and (2); however, I have a few questions:

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

This is certainly the case if realPosCount is greater than the
original value of nPos.  The approach taken in r6313 is to set nPos to
the lesser of nPos and realPosCount; does that work for your test
cases?

> 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.

My concern is that the value of "timeloop count" appears to be
unreliable.  I have a few datasets that are as you describe -
"timeloop count" is equal to the number of timepoints minus 1.
However, I also have a couple of datasets for which "timeloop count"
is 99 when the actual number of timepoints is 30.  For this reason,
the current approach is to ignore "timeloop count" altogether, and
simply calculate the number of timepoints from the number of TIFF
files and size of the other dimensions (see ScanrReader:290-293).  Do
you think that this approach is reasonable?  If not, how would you
recommend reconciling differences between ("timeloop count" + 1) and
the actual number of timepoints?

Regards,
-Melissa

On Wed, May 5, 2010 at 9:59 AM, Rubén Muñoz <ruben.munoz at embl.de> wrote:
> 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