<div dir="ltr"><div><div>Hi everyone,<br></div><div><br></div><div>We are hacking away in Dresden. A question from Christian Tischer arose: how can we use the <a href="http://loci.plugins.BF">loci.plugins.BF</a> class to pass a file pattern directly?</div><div><br></div><div>Debugging into the code, at the initializeStack step, the id _is_ treated as an immutable file pattern, which is great [1]. But there is options flag for something like FilePattern.setUsingPatternIds(true), so just passing options.setId(pattern) bombs when
initializing the file during an earlier phase of the ImportProcess.</div><div><br></div><div>It is possible to record a macro that approximates passing a custom file pattern. This ends up being something like:</div><div><br></div><div>IJ.run("Bio-Formats", "open=/Users/curtis/data/mri-stack/slice0005_mri-stack.tif autoscale color_mode=Default group_files rois_import=[ROI manager] view=Hyperstack stack_order=XYCZT axis_1_number_of_images=27 axis_1_axis_first_image=1 axis_1_axis_increment=1 contains=[] name=/Users/curtis/data/mri-stack/slice00<11-17>_mri-stack.tif");<br></div><div><br></div><div>However, then you cannot receive the resultant ImagePlus as an output; rather, it gets automatically shown.</div><div><br></div><div>What do you think is the best way forward to be able to pass file patterns directly to the high-level API here? Does the API need a tweak? Or did we miss something?<br></div><div><br></div>Thanks,</div><div>Curtis<br></div><div><div><div><br></div><div>[1] <a href="https://github.com/openmicroscopy/bioformats/blob/v5.7.2/components/bio-formats-plugins/src/loci/plugins/in/ImportProcess.java#L511-L515">https://github.com/openmicroscopy/bioformats/blob/v5.7.2/components/bio-formats-plugins/src/loci/plugins/in/ImportProcess.java#L511-L515</a><br></div><div><br clear="all"><div><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><span style="font-size:12.8px">--</span></div><div><span style="font-size:12.8px">Curtis Rueden</span><br></div><div><span style="font-size:12.8px">LOCI software architect - <a href="https://loci.wisc.edu/software" target="_blank">https://loci.wisc.edu/software</a></span></div><div>ImageJ2 lead, Fiji maintainer - <span style="font-size:12.8px"><a href="https://imagej.net/User:Rueden" target="_blank">https://imagej.net/User:Rueden</a></span></div><div>Did you know ImageJ has a forum? <a href="http://forum.imagej.net/" target="_blank">http://forum.imagej.net/</a></div><div><br></div></div></div></div></div></div></div></div></div></div>
</div></div></div></div></div>