Imagic, MRC, DM and STAR file i/o

版本 2.0.0.0 (20.7 KB) 作者: Fred Sigworth
Functions for reading and writing image files and STAR files for electron microscopy
3.8K 次下载
更新时间 2019/1/6

查看许可证

This directory contains m-functions for reading and writing files used in electron microscopy and 3D reconstruction. The file formats those used by the IMAGIC software package (Image Science GmbH; EMAN and Frealign are public-domain programs that also use this format), the MRC program library, and the Digital Micrograph (Gatan, Inc.) file format. These functions were written on what published information we could find, and work for our limited purposes.

The functions generally assume that little-endian files are being read by a little-endian machine. However, some functions might still work with big-endian machines such as PowerPC, as they were originally written on a Mac computer.

Fred Sigworth, Liguo Wang
Yale University

ReadImagic
Loads part or all of the data in an Imagic file pair into a matlab 3-d array. This function also returns a data structure with part of the information from the header.

WriteImagic
Writes an entire matlab 3-d array as an Imagic file with float32 data type.

ReadImagicHeader
MakeImagicHeader
WriteImagicHeader
Create, read or write a datastructure that contains all the information in an Imagic header. The structure (a struct of arrays) allows manipulation of header information. For writing very large datafiles, the header file can be constructed and written out separately by these functions.

ReadDMFile (replaces ReadDM3)
Read a file generated by Digital Micrograph, version 3 or 4. These files have a large tree structure, and the code inside this function can be modified to return any field or fields of this structure. At present just the pixel size and number of pixels is returned along with the raw image.

ReadMRC
Read part or all of an MRC-format file (2d or 3d) into a Matlab array; also retrieves information about the image size.

WriteMRC
Write an entire 3d Matlab array into an MRC-format file

WriteMRCHeader
Write the header of an MRC-format file, allowing the user to write the rest of the file directly with the fwrite function.

ReadStarFile
Reads a STAR file, for example generated by Relion, into a cell array of block names, and a cell array of structures containing the block data.

WriteStarFile
Writes a MATLAB struct to a STAR file.

引用格式

Fred Sigworth (2024). Imagic, MRC, DM and STAR file i/o (https://www.mathworks.com/matlabcentral/fileexchange/27021-imagic-mrc-dm-and-star-file-i-o), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R2010a
兼容 R2010a 到 R2018b 的版本
平台兼容性
Windows macOS Linux
致谢

启发作品: Read .dm3 and .dm4 image files

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
2.0.0.0

ReadDMFile replaces ReadDM3, allowing DM4 files to be read as well. New functions for reading and writing STAR files. Some bugs fixed.

1.0.0.0