IMP  2.1.0
The Integrative Modeling Platform
em2d/em_images_conversion.py

Conversion of Electron Microscopy Images.

1 ## \example em2d/em_images_conversion.py
2 # Conversion of Electron Microscopy Images.
3 #
4 
5 import IMP
6 import IMP.em2d as em2d
7 import os
8 """
9  Conversion of Electron Microscopy Images.
10 
11 """
12 
13 # Read images
14 fn_selection = em2d.get_example_path("all-1z5s-projections.sel")
15 
16 srw = em2d.SpiderImageReaderWriter()
17 trw = em2d.TIFFImageReaderWriter()
18 fn_images = em2d.read_selection_file(fn_selection)
19 fn_images = [em2d.get_example_path(x) for x in fn_images]
20 images = em2d.read_images(fn_images, srw)
21 # write
22 fn_saved = em2d.create_filenames(3, "1z5s-projection", "tif")
23 em2d.save_images(images, fn_saved, trw)