<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Melissa, <div><br></div><div>I am glad to hear from you and hope that the successful changes are of use to your purpose. </div><div>I have identified my current sets slightly different to the examples provided before that's why I will upload one more. <br><div><br></div><div>Regarding your latest changes in ScanrReader.java: </div><div><br></div></div><div><blockquote type="cite"><div><br><blockquote type="cite">1) Setting nPos = realPosCount and after you core = new CoreMetadata[nWells * nPos];<br></blockquote><blockquote type="cite">you're getting too many positions in the core array.<br></blockquote><br>This is certainly the case if realPosCount is greater than the<br>original value of nPos. The approach taken in r6313 is to set nPos to<br>the lesser of nPos and realPosCount; does that work for your test<br>cases?<font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#144FAE"><br></font></font></div></blockquote><div><br></div><div>Only recently I started getting multiple positions in a well, and I have just tried with old and new datasets. Your guess is correct and now this works again.</div><div><br></div><br><blockquote type="cite"><div><blockquote type="cite">3) In newer acquisitions "timeloop real" was replaced by "timeloop count" and it is 0 for only<br></blockquote><blockquote type="cite">1 timepoint acquisitions, so I had to add one (+ 1) to the parsed value.<br></blockquote><br>My concern is that the value of "timeloop count" appears to be<br>unreliable. I have a few datasets that are as you describe -<br>"timeloop count" is equal to the number of timepoints minus 1.<br></div></blockquote><div><br></div><div>Mmm. I think that some users configure the microscope to 99 loops and then interrupt the acquisition, must be a bad practice from their side. In those cases probably the Olympus software "alert us" setting "timeloop real". This is only a guess but again the code works as it was. You are right to leave this modification out but the lower value of "timeloop real" and "timeloop count +1 " should work also.</div><div><br></div><div>As I said, recently I received new datasets... What a surprise when some didn't have labels "A1", "A2", ... Well those are not importing. Please permit me again to show my small corrections that did the trick:</div><div><br></div><div>My best regards,</div><div><br></div><div><div>--- ScanrReader.java<span class="Apple-tab-span" style="white-space:pre">        </span>(revision 6315)</div><div>+++ ScanrReader.java<span class="Apple-tab-span" style="white-space:pre">        </span>(working copy)</div><div>@@ -70,6 +70,7 @@</div><div> private Vector<String> metadataFiles = new Vector<String>();</div><div> private int wellRows, wellColumns;</div><div> private int fieldRows, fieldColumns;</div><div>+ private int wellCount = 0;</div><div> private Vector<String> channelNames = new Vector<String>();</div><div> private Hashtable<String, Integer> wellLabels =</div><div> new Hashtable<String, Integer>();</div><div>@@ -260,13 +261,13 @@</div><div> wellColumns = uniqueColumns.size();</div><div> </div><div> if (wellRows * wellColumns == 0) {</div><div>- if (wellLabels.size() <= 96) {</div><div>+ if (wellCount <= 96) {</div><div> wellColumns = 12;</div><div> }</div><div>- else if (wellLabels.size() <= 384) {</div><div>+ else if (wellCount <= 384) {</div><div> wellColumns = 24;</div><div> }</div><div>- wellRows = wellLabels.size() / wellColumns;</div><div>+ wellRows = wellCount / wellColumns;</div><div> if (wellRows * wellColumns < wellLabels.size()) wellRows++;</div><div> }</div><div> </div><div>@@ -298,7 +299,8 @@</div><div> String[] keys = wellLabels.keySet().toArray(new String[wellLabels.size()]);</div><div> int realPosCount = 0;</div><div> for (int well=0; well<nWells; well++) {</div><div>- Integer w = wellLabels.get(keys[well]);</div><div>+ Integer w = keys.length > 0 ? wellLabels.get(keys[well]) : null;</div><div>+ </div><div> int wellIndex = w == null ? well + 1 : w.intValue();</div><div> </div><div> String wellPos = getBlock(wellIndex, "W");</div><div>@@ -334,7 +336,7 @@</div><div> }</div><div> }</div><div> </div><div>- if (wellLabels.size() != nWells) {</div><div>+ if (wellLabels.size() > 0 && wellLabels.size() != nWells) {</div><div> uniqueRows.clear();</div><div> uniqueColumns.clear();</div><div> for (String well : wellLabels.keySet()) {</div><div>@@ -501,6 +503,7 @@</div><div> else if (key.equals("well selection table + cDNA")) {</div><div> if (Character.isDigit(value.charAt(0))) {</div><div> wellIndex = value;</div><div>+<span class="Apple-tab-span" style="white-space:pre">        </span> wellCount++;</div><div> }</div><div> else {</div><div> wellLabels.put(value, new Integer(wellIndex));</div><div><br></div></div><div><br></div><br><blockquote type="cite"><div>Regards,<br>-Melissa<br><br>On Wed, May 5, 2010 at 9:59 AM, Rubén Muńoz <<a href="mailto:ruben.munoz@embl.de">ruben.munoz@embl.de</a>> wrote:<br><blockquote type="cite">Dear Melissa,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">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.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">The reason of my e-mail are some code improvements in ScanrReader.java,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">1) Setting nPos = realPosCount and after you core = new CoreMetadata[nWells * nPos]; you're getting too many positions in the core array.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">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.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">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.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Please let me know any comment regarding the previous changes, they all might be of help.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Thanks and regards,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Rubén<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Index: ScanrReader.java<br></blockquote><blockquote type="cite">===================================================================<br></blockquote><blockquote type="cite">--- ScanrReader.java (revision 6224)<br></blockquote><blockquote type="cite">+++ ScanrReader.java (working copy)<br></blockquote><blockquote type="cite">@@ -347,7 +347,7 @@<br></blockquote><blockquote type="cite"> wellColumns = uniqueColumns.size();<br></blockquote><blockquote type="cite"> nWells = wellRows * wellColumns;<br></blockquote><blockquote type="cite"> }<br></blockquote><blockquote type="cite">- nPos = realPosCount;<br></blockquote><blockquote type="cite">+ //nPos = realPosCount;<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> reader = new MinimalTiffReader();<br></blockquote><blockquote type="cite"> reader.setId(tiffs[0]);<br></blockquote><blockquote type="cite">@@ -420,11 +420,14 @@<br></blockquote><blockquote type="cite"> store.setWellSampleImageRef(imageID, 0, well, field);<br></blockquote><blockquote type="cite"> store.setImageID(imageID, i);<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">- String row =<br></blockquote><blockquote type="cite">- String.valueOf(wellRows > 26 ? wellRow + 1 : (char) ('A' + wellRow));<br></blockquote><blockquote type="cite">- String col =<br></blockquote><blockquote type="cite">- String.valueOf(wellRows > 26 ? (char) ('A' + wellCol) : wellCol + 1);<br></blockquote><blockquote type="cite">- String name = "Well " + row + col + ", Field " + (field + 1) +<br></blockquote><blockquote type="cite">+ //String row =<br></blockquote><blockquote type="cite">+ // String.valueOf(wellRows > 26 ? wellRow + 1 : (char) ('A' + wellRow));<br></blockquote><blockquote type="cite">+ //String col =<br></blockquote><blockquote type="cite">+ // String.valueOf(wellRows > 26 ? (char) ('A' + wellCol) : wellCol + 1);<br></blockquote><blockquote type="cite">+<br></blockquote><blockquote type="cite">+ int wellIndex = wellRow*wellColumns + wellCol + 1;<br></blockquote><blockquote type="cite">+<br></blockquote><blockquote type="cite">+ String name = "Well " + wellIndex + ", Field " + (field + 1) +<br></blockquote><blockquote type="cite"> " (Spot " + (i + 1) + ")";<br></blockquote><blockquote type="cite"> store.setImageName(name, i);<br></blockquote><blockquote type="cite"> }<br></blockquote><blockquote type="cite">@@ -479,8 +482,8 @@<br></blockquote><blockquote type="cite"> else if (key.equals("# slices")) {<br></blockquote><blockquote type="cite"> core[0].sizeZ = Integer.parseInt(value);<br></blockquote><blockquote type="cite"> }<br></blockquote><blockquote type="cite">- else if (key.equals("timeloop real")) {<br></blockquote><blockquote type="cite">- core[0].sizeT = Integer.parseInt(value);<br></blockquote><blockquote type="cite">+ else if (key.equals("timeloop count") || key.equals("timeloop real")) {<br></blockquote><blockquote type="cite">+ core[0].sizeT = Integer.parseInt(value) + 1;<br></blockquote><blockquote type="cite"> }<br></blockquote><blockquote type="cite"> else if (key.equals("name")) {<br></blockquote><blockquote type="cite"> channelNames.add(value);<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote></div></blockquote></div><br></body></html>