[ome-users] Passing a file pattern to the high-level Bio-Formats API

Curtis Rueden ctrueden at wisc.edu
Sun Dec 10 15:21:49 GMT 2017


Hi everyone,

We are hacking away in Dresden. A question from Christian Tischer arose:
how can we use the loci.plugins.BF class to pass a file pattern directly?

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.

It is possible to record a macro that approximates passing a custom file
pattern. This ends up being something like:

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");

However, then you cannot receive the resultant ImagePlus as an output;
rather, it gets automatically shown.

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?

Thanks,
Curtis

[1]
https://github.com/openmicroscopy/bioformats/blob/v5.7.2/components/bio-formats-plugins/src/loci/plugins/in/ImportProcess.java#L511-L515

--
Curtis Rueden
LOCI software architect - https://loci.wisc.edu/software
ImageJ2 lead, Fiji maintainer - https://imagej.net/User:Rueden
Did you know ImageJ has a forum? http://forum.imagej.net/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-users/attachments/20171210/c4a5783a/attachment.html>


More information about the ome-users mailing list