<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Hi Curtis and everyone,
<div class=""><br class="">
</div>
<div class="">
<div class="">for anyone following this conversation, the changes described below have being turned</div>
<div class="">into an open Pull Request against Bio-Formats [1] where the conversation will likely</div>
<div class="">happen. Thanks for opening this Curtis, we can probably discuss it in person in Dresden</div>
<div class="">in the next few days. </div>
<div class=""><br class="">
</div>
<div class="">As as side comment, a workaround with the current version of Bio-Formats might be to </div>
<div class="">store the file pattern string into a pattern file [2] and point at this pattern file in the IJ import</div>
<div class="">process.</div>
<div class=""><br class="">
</div>
<div class="">Best,</div>
<div class="">Sebastien</div>
<div class=""><br class="">
</div>
<div class="">[1] <a href="https://github.com/openmicroscopy/bioformats/pull/3019" class="">https://github.com/openmicroscopy/bioformats/pull/3019</a></div>
<div class="">[2] <a href="http://docs.openmicroscopy.org/bio-formats/5.7.2/formats/pattern-file.html" class="">http://docs.openmicroscopy.org/bio-formats/5.7.2/formats/pattern-file.html</a> </div>
<div class=""><br class="">
</div>
<div class="">
<div>
<blockquote type="cite" class="">
<div class="">On 10 Dec 2017, at 15:21, Curtis Rueden <<a href="mailto:ctrueden@wisc.edu" class="">ctrueden@wisc.edu</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">
<div class="">
<div class="">Hi everyone,<br class="">
</div>
<div class=""><br class="">
</div>
<div class="">We are hacking away in Dresden. A question from Christian Tischer arose: how can we use the
<a href="http://loci.plugins.bf/" class="">loci.plugins.BF</a> class to pass a file pattern directly?</div>
<div class=""><br class="">
</div>
<div class="">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 class=""><br class="">
</div>
<div class="">It is possible to record a macro that approximates passing a custom file pattern. This ends up being something like:</div>
<div class=""><br class="">
</div>
<div class="">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 class="">
</div>
<div class=""><br class="">
</div>
<div class="">However, then you cannot receive the resultant ImagePlus as an output; rather, it gets automatically shown.</div>
<div class=""><br class="">
</div>
<div class="">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 class="">
</div>
<div class=""><br class="">
</div>
Thanks,</div>
<div class="">Curtis<br class="">
</div>
<div class="">
<div class="">
<div class=""><br class="">
</div>
<div class="">[1] <a href="https://github.com/openmicroscopy/bioformats/blob/v5.7.2/components/bio-formats-plugins/src/loci/plugins/in/ImportProcess.java#L511-L515" class="">
https://github.com/openmicroscopy/bioformats/blob/v5.7.2/components/bio-formats-plugins/src/loci/plugins/in/ImportProcess.java#L511-L515</a><br class="">
</div>
<div class=""><br clear="all" class="">
<div class="">
<div class="">
<div class="gmail_signature">
<div dir="ltr" class="">
<div class="">
<div dir="ltr" class="">
<div class="">
<div dir="ltr" class="">
<div class="">
<div dir="ltr" class="">
<div class=""><span style="font-size:12.8px" class="">--</span></div>
<div class=""><span style="font-size:12.8px" class="">Curtis Rueden</span><br class="">
</div>
<div class=""><span style="font-size:12.8px" class="">LOCI software architect - <a href="https://loci.wisc.edu/software" target="_blank" class="">
https://loci.wisc.edu/software</a></span></div>
<div class="">ImageJ2 lead, Fiji maintainer - <span style="font-size:12.8px" class=""><a href="https://imagej.net/User:Rueden" target="_blank" class="">https://imagej.net/User:Rueden</a></span></div>
<div class="">Did you know ImageJ has a forum? <a href="http://forum.imagej.net/" target="_blank" class="">
http://forum.imagej.net/</a></div>
<div class=""><br class="">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
_______________________________________________<br class="">
ome-users mailing list<br class="">
<a href="mailto:ome-users@lists.openmicroscopy.org.uk" class="">ome-users@lists.openmicroscopy.org.uk</a><br class="">
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users<br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
<br>
<span style="font-size:10pt;">The University of Dundee is a registered Scottish Charity, No: SC015096</span>
</body>
</html>