ImageIO.writeMRC#

ImageIO.writeMRC(file=None, header=None, byteOrder=None, shape=None, dataType=None, arrayOrder=None, length=None, pixel=None, data=None, extended=None, casting='unsafe')#

Write data to an MRC file.

This function writes both the header and data to an MRC file. If certain parameters are not provided, they are inferred from either other arguments, existing attributes, or default values.

Parameters:
filestr or file object, optional

Path to the file or file object.

headerarray_like or None, optional

MRC header to be written.

byteOrderstr or None, optional

Byte order of the MRC file.

shapetuple or None, optional

Shape of the data.

dataTypestr or None, optional

Type of data in the MRC file.

arrayOrderstr or None, optional

Order of the axes in the MRC file.

lengthlist or None, optional

Length in all dimensions in nm.

pixelfloat or None, optional

Pixel size in nm.

datandarray or None, optional

Data to be written to the MRC file.

extendedstr or None, optional

Extended header for the MRC file.

castingstr, optional, default ‘unsafe’

Casting rule. Specifies how data should be casted if needed.