Bsoft 2.1.4
Bernard's software package
rwGRD.h File Reference

Header file for reading and writing Basel GRD files. More...

#include "rwimg.h"

Classes

struct  GRDhead
 

Macros

#define GRDSIZE   512
 

Functions

int readGRD (Bimage *p, int readdata, int img_select)
 Reading a Basel GRD map image file format. More...
 
int writeGRD (Bimage *p, int flags)
 Writing a Basel GRD map image file format. More...
 

Detailed Description

Header file for reading and writing Basel GRD files.

Author
Bernard Heymann
Date
Created: 19990410
Modified: 20210304
Format: 3D crystallographic image file format (Basel)

Macro Definition Documentation

◆ GRDSIZE

#define GRDSIZE   512

Function Documentation

◆ readGRD()

int readGRD ( Bimage p,
int  readdata,
int  img_select 
)

Reading a Basel GRD map image file format.

Parameters
*pthe image structure.
readdataflag to activate reading of image data.
img_selectimage selection in multi-image file (-1 = all images).
Returns
int error code (<0 means failure). A 3D image format used in electron microscopy. Header size: 512 bytes (fixed). File format extensions: .grd The identifier is a 4-byte magic number (not used). Machine identifier: 1 = little endian, 2 = big endian. Byte order determination: Data type and third dimension values must be less than 256*256. Old data types: 1 = byte, 2 = float, 3 = complex float 4 = 3-value vector (float), 5 = view (float) 6 = RGB byte, 7 = RGB float 8 = RGBA byte, 9 = RGBA float 10 = multi The Bsoft data type and compound type are combined to give the mode: mode = 100*compound_type + data_type

◆ writeGRD()

int writeGRD ( Bimage p,
int  flags 
)

Writing a Basel GRD map image file format.

Parameters
*pthe image structure.
flagsflags to set output properties.
Returns
int error code (<0 means failure). A 3D image format used in electron microscopy. flags: 0 no compression 1 rul-length compression (only byte data types)