<div dir="ltr">Hi Jeremy,<div><br></div><div>> <span style="font-family:arial,sans-serif;font-size:13px">I'm having trouble scripting the bioformats importer pluggin. </span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br>

</span></div><div>There are two different bugs there:</div><div><br></div><div>1) Using "Group files with similar names" via a macro is currently broken. This is what causes the NullPointerException you are seeing. At a cursory glance: I am guessing there used to be another option "use regex" or some such, which was then removed from the code, but not completely.</div>

<div><br></div><div>2) Using "Swap dimensions" via a macro is also broken. It results in duplicate macro keys in the case where there are the same number of Z, C and/or T positions in the dataset.</div><div><br>

</div><div>I have CCed the ome-users list to inform the Bio-Formats developers of these problems.</div><div><br></div><div>Regards,<br></div><div>Curtis</div><div><br></div><div>P.S. Ideally we would add some unit tests to prevent these sorts of regressions in the future. With the .fake file format it might be doable pretty easily...</div>

<div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Apr 23, 2014 at 1:56 PM, Jeremy Bredfeldt <span dir="ltr"><<a href="mailto:jeremybredfeldt@gmail.com" target="_blank">jeremybredfeldt@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi,</div><div><br></div>I'm having trouble scripting the bioformats importer pluggin. <div><br>

</div><div>Here's what I did:</div><div><br></div><div>saved blobs.tif to the desktop.</div><div>started the recorder.</div><div>used bioformats importer to open blobs.tif.</div><div>hit create in the recorder.</div>
<div>
run the macro.</div><div><br></div><div>Here's the resulting exception:</div><div><div>(Fiji Is Just) ImageJ 1.48v; Java 1.7.0_51 [64-bit]; Windows 7 6.1; 183MB of 46043MB (<1%)</div><div> </div><div>java.lang.NullPointerException</div>

<div><span style="white-space:pre-wrap">  </span>at ij.Macro.trimKey(Macro.java:154)</div><div><span style="white-space:pre-wrap">      </span>at ij.gui.GenericDialog.getNextBoolean(GenericDialog.java:938)</div><div><span style="white-space:pre-wrap">   </span>at loci.plugins.in.FilePatternDialog.harvestResults(FilePatternDialog.java:193)</div>

<div><span style="white-space:pre-wrap">  </span>at loci.plugins.in.ImporterDialog.showDialog(ImporterDialog.java:83)</div><div><span style="white-space:pre-wrap">     </span>at loci.plugins.in.ImporterPrompter.promptFilePattern(ImporterPrompter.java:135)</div>

<div><span style="white-space:pre-wrap">  </span>at loci.plugins.in.ImporterPrompter.statusUpdated(ImporterPrompter.java:84)</div><div><span style="white-space:pre-wrap">      </span>at loci.plugins.in.ImportProcess.notifyListeners(ImportProcess.java:475)</div>

<div><span style="white-space:pre-wrap">  </span>at loci.plugins.in.ImportProcess.step(ImportProcess.java:763)</div><div><span style="white-space:pre-wrap">    </span>at loci.plugins.in.ImportProcess.execute(ImportProcess.java:146)</div>

<div><span style="white-space:pre-wrap">  </span>at loci.plugins.in.Importer.showDialogs(Importer.java:141)</div><div><span style="white-space:pre-wrap">       </span>at loci.plugins.in.Importer.run(Importer.java:79)</div><div>
<span style="white-space:pre-wrap">     </span>at loci.plugins.LociImporter.run(LociImporter.java:81)</div>
<div><span style="white-space:pre-wrap">  </span>at ij.IJ.runUserPlugIn(IJ.java:199)</div><div><span style="white-space:pre-wrap">      </span>at ij.IJ.runPlugIn(IJ.java:163)</div><div><span style="white-space:pre-wrap">  </span>at ij.Executer.runCommand(Executer.java:131)</div>

<div><span style="white-space:pre-wrap">  </span>at ij.Executer.run(Executer.java:61)</div><div><span style="white-space:pre-wrap">     </span>at ij.IJ.run(IJ.java:269)</div><div><span style="white-space:pre-wrap">        </span>at ij.macro.Functions.doRun(Functions.java:590)</div>

<div><span style="white-space:pre-wrap">  </span>at ij.macro.Functions.doFunction(Functions.java:89)</div><div><span style="white-space:pre-wrap">      </span>at ij.macro.Interpreter.doStatement(Interpreter.java:226)</div><div>

<span style="white-space:pre-wrap">     </span>at ij.macro.Interpreter.doStatements(Interpreter.java:214)</div><div><span style="white-space:pre-wrap">       </span>at ij.macro.Interpreter.run(Interpreter.java:111)</div><div><span style="white-space:pre-wrap">        </span>at ij.macro.Interpreter.run(Interpreter.java:81)</div>

<div><span style="white-space:pre-wrap">  </span>at CLI.Refresh_Macros.runScript(Refresh_Macros.java:56)</div><div><span style="white-space:pre-wrap">  </span>at common.RefreshScripts.runScript(RefreshScripts.java:328)</div>

<div><span style="white-space:pre-wrap">  </span>at fiji.scripting.TextEditor$Tab$6.execute(TextEditor.java:1225)</div><div><span style="white-space:pre-wrap"> </span>at fiji.scripting.TextEditor$Executer$1.run(TextEditor.java:1785)</div>

</div><div><br></div><div>Here's the macro that was generated with my specific selections:</div><div>run("Bio-Formats Importer", "open=C:\\Users\\bredfeldt\\Desktop\\blobs.tif color_mode=Default group_files split_timepoints split_channels view=Hyperstack stack_order=XYCZT swap_dimensions file=[] pattern=C:\\\\Users\\\\bredfeldt\\\\Desktop\\\\blobs.tif 1_planes=Z 1_planes=C 1_planes=T");</div>

<div><br></div><div>Let me know if anyone has any suggestions.</div><div><br></div><div>Thanks for your help,<br>Jeremy</div></div><span class="HOEnZb"><font color="#888888">

<p></p>

-- <br>
-- <br>
Please avoid top-posting, and please make sure to reply-to-all!<br>
 <br>
Mailing list web interface: <a href="http://groups.google.com/group/fiji-devel" target="_blank">http://groups.google.com/group/fiji-devel</a><br>
<br>
--- <br>
You received this message because you are subscribed to the Google Groups "Fiji-devel" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:fiji-devel+unsubscribe@googlegroups.com" target="_blank">fiji-devel+unsubscribe@googlegroups.com</a>.<br>
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank">https://groups.google.com/d/optout</a>.<br>
</font></span></blockquote></div><br></div>