/Users/bernard/b20/bsoft/src/rwimg/rwPIF.cpp(3)

NAME
/Users/bernard/b20/bsoft/src/rwimg/rwPIF.cpp - Functions for reading and writing PIF files.

SYNOPSIS

#include 'rwPIF.h'
#include 'file_util.h'
#include 'utilities.h'

  Macros
#define PIF_SCALE 1e-5

  Functions
char * read_sf (ifstream *fimg, Bimage *p, int mode, int sb)
int readPIF (Bimage *p, int readdata, int img_select)
Reading a PIF image and structure factor file format. A 2D and 3D image format used in electron microscopy. There are two types of files:
int writePIF (Bimage *p)
Writing a PIF image file format. A 2D and 3D image format used in electron microscopy.

  Variables
int verbose
char * month []
double PIFscale = PIF_SCALE

Detailed Description

Functions for reading and writing PIF files.

Author:
    Bernard Heymann

Date:
    Created: 19991112

    Modified: 20120706

Definition in file rwPIF.cpp.

Macro Definition Documentation

  #define PIF_SCALE 1e-5

Definition at line 19 of file rwPIF.cpp.

Function Documentation

  char * read_sf (ifstream * fimg, Bimage * p, int mode, int sb)

Definition at line 357 of file rwPIF.cpp.

  int readPIF (Bimage * p, int readdata, int img_select)

Reading a PIF image and structure factor file format. A 2D and 3D image format used in electron microscopy. There are two types of files:

1.  A typical binary image format with a file header and a header for each sub-image.

2.  A binary structure factor format with the same file header as for the image format File header size: 512 bytes followed by optional 768 byte colour table Image header size: 512 bytes for each image File format extensions: .pif Identifier: supposed to be the first 8 bytes Byte order determination: Data type and third dimension values must be less than 256*256. Data types: 0 = byte, 1 = short, 2 = float, 3 = complex short, 4 = complex float. Transform type: List of structure factors. Note: To avoid endianness problems associated with different floating point formats (particularly those under VMS), this format was intended to store only integers. A 16 byte string following the 8th byte encodes a floating point conversion scale to convert an integer map and some of the fields in the header back to floating point. However, this format was designed in the CCP4/MRC style format, and the floating point data type was retained, as well as complex types used for transforms.

Parameters:
    *p the image structure.
    readdata flag to activate reading of image data.
    img_select image selection in multi-image file (-1 = all images).

Returns:
    int error code (<0 means failure).

Definition at line 60 of file rwPIF.cpp.

  int writePIF (Bimage * p)

Writing a PIF image file format. A 2D and 3D image format used in electron microscopy.

Parameters:
    *p the image structure.

Returns:
    int error code (<0 means failure).

Definition at line 370 of file rwPIF.cpp.

Variable Documentation

  char* month[]

Definition at line 55 of file rwimg.cpp.

  double PIFscale = PIF_SCALE

Definition at line 20 of file rwPIF.cpp.

  int verbose

Author

Generated automatically by Doxygen for Bsoft from the source code.