Python DM3 Reader

This is an adaptation of the DM3_Reader plug-in as a Python module. It may by used to extract thumbnail, image data and metadata from GATAN DigitalMicrograph 3 files.

This python module is a transposition and adaptation of the DM3_Reader ImageJ plug-in by Greg Jefferis. It was initially meant to be called by a script indexing electron microscope images into a database.

This module now allows to extract various metadata (specimen, operator, HV, MAG, etc.) from GATAN DigitalMicrograph DM3 files. It may also extract and dump all metadata (“Tags”) and pass thumbnail and image data as PIL Images or Numpy arrays, as well as save the thumbnail view in a PNG file.

Use in your own script would typically require lines such as:

import DM3lib as dm3
import matplotlib.pyplot as plt
# parse DM3 file
dm3f = dm3.DM3("sample.dm3")
# print some useful image information
print dm3f.info
print "pixel size = %s %s"%dm3f.pxsize
# display image
plt.matshow(dm3f.imagedata, vmin=dm3f.cuts[0], vmax=dm3f.cuts[1])
plt.colorbar(shrink=.8)

Please note: It has only been tested on single-image files (i.e. not stacks) and not all data types are implemented.

FilenameFilesizeLast modified
dm3lib_v099.py193342011/10/18 15:44
dm3reader_v072.py150042010/01/26 11:20
pydm3reader-1.0.zip95182013/07/25 17:40

NEW: version 1.0, a significant code overhaul, and a more complete distribution; support added for more image data types.

NOTES:

Project homepage : microscopies.med.univ-tours.fr/pydm3reader

plugin/utilities/python_dm3_reader/start.txt · Last modified: 2014/11/06 15:11 by piraynal
Back to top
CC Attribution-Noncommercial-Share Alike 3.0 Unported
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0