SPIDER-PIL Spider 2D image¶
This is a copy from the Pillow docs.
PIL reads and writes SPIDER image files of 32-bit floating point data (“F;32F”).
PIL also reads SPIDER stack files containing sequences of SPIDER images. The
tell() methods are supported, and
random access is allowed.
write() method sets the following attributes:
- Set to
- Set to 1 if the file is an image stack, else 0.
- Set to the number of images in the stack.
A convenience method,
convert2byte(), is provided for
converting floating point data to byte data (mode
im = Image.open('image001.spi').convert2byte()
Writing files in SPIDER format¶
The extension of SPIDER files may be any 3 alphanumeric characters. Therefore the output format must be specified explicitly: