Registering a format for FEI SEM images

7 views
Skip to first unread message

Juan Nunez-Iglesias

unread,
Nov 28, 2016, 10:14:21 PM11/28/16
to imageio
Hi all,

I'm interested in contributing a format to imageio, but, because it's a special kind of TIFF, I'm not sure what the best way to proceed is.

I have a bunch of scanning electron microscope (SEM) data, produced by an FEI [1]_ microscope. Standard TIFF readers grab the data fine, but the metadata is in a completely nonstandard format (from what I can tell): a bunch of ASCII text at the end of the file. I've provided an example file [2]_.

You can open the file in VIM (or any text editor) and scroll all the way to the end to see the metadata.

I wrote a parser for this metadata [3]_, but (a) it's kind of fragile, and (b) I don't have any way of detecting whether a file is an FEI file or not.


I'd appreciate any help contributing this metadata reader (and whatever else needs to come with it) to imageio.

Thanks!

Juan.

almar...@gmail.com

unread,
Nov 29, 2016, 6:51:09 AM11/29/16
to Juan Nunez-Iglesias, imageio

Hi Juan,

 

Great news!

 

I think you can add this as a plugin as “usual” (http://imageio.readthedocs.io/en/latest/plugins.html). Plugins have two ways to let imageio know whether they can read/write a file. The first is by specifying the extensions that they support, and the second is by looking at the first few bytes of data. If neither is an option for your data, then that’s ok; it means that people will have to explicitly use that plugin using `imageio.imread(fname, `TIFF-FEI’)` (or similar).

 

It seems your reader depends on tiffile, which makes things easier, because that’s already present in imageio.

 

The easiest way to move forward, I think, is to create a PR in which you fill in the plugin template. Have a look at some of the other plugins for inspiration. And don’t hesitate to ask for help.

 

Regards,

  Almar

--
You received this message because you are subscribed to the Google Groups "imageio" group.
To unsubscribe from this group and stop receiving emails from it, send an email to imageio+u...@googlegroups.com.
To post to this group, send email to ima...@googlegroups.com.
Visit this group at https://groups.google.com/group/imageio.
For more options, visit https://groups.google.com/d/optout.

 

Juan Nunez-Iglesias

unread,
Nov 29, 2016, 6:17:16 PM11/29/16
to ima...@googlegroups.com
Hey Almar,

Great! I’ve started. First question: where should I put my test image? It’s kinda big (~7MB).

Juan.
You received this message because you are subscribed to a topic in the Google Groups "imageio" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/imageio/40kUimOMMwY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to imageio+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages