Open b-grimaud opened 3 years ago
The idiomatic way to do this is to use a try ... except
block to try opening the file, and then skip it in case of an IOError
(or whatever PIMS raises when it can't read a file; that's easy to check). PIMS does not have separate code to inspect a file for compatibility before it's opened.
Hi,
I would like my script to be able to check wether video files are compatible with its reader, and skip files that aren't. For now, I'm only dealing with TIFF files with imageio, but I'm planning on working with several different proprietary formats, and so I would like to switch to Pims while still retaining that checking capability.
I know it is possible to get a list of Bioformats-supported file types, as described here. However, I feel like it would be much more efficient and convenient to directly call that command from Pims since, as I understand it, there's already a JPype VM running.
Could it be possible to implement such a function ?