#include "ccp4_utils.h"
Go to the source code of this file.
Compounds | |
struct | _CMMFile |
struct | _CMMFile_Data |
struct | _CMMFile_Labels |
struct | _CMMFile_Skew |
struct | _CMMFile_Stats |
struct | _CMMFile_Symop |
Typedefs | |
typedef _CMMFile_Skew | CMMFile_Skew |
typedef _CMMFile_Labels | CMMFile_Labels |
typedef _CMMFile_Symop | CMMFile_Symop |
typedef _CMMFile_Data | CMMFile_Data |
typedef _CMMFile_Stats | CMMFile_Stats |
typedef _CMMFile | CMMFile |
Functions | |
void * | ccp4_cmap_open (const char *filename, int mode) |
void | ccp4_cmap_close (CMMFile *mfile) |
void | ccp4_cmap_closemode (CMMFile *mfile, unsigned int closemode) |
int | ccp4_cmap_seek_section (CMMFile *mfile, int offset, unsigned int seek_mode) |
int | ccp4_cmap_seek_row (CMMFile *, int offset, unsigned int seek_mode) |
int | ccp4_cmap_seek_data (CMMFile *, int offset, unsigned int seek_mode) |
int | ccp4_cmap_read_section (CMMFile *mfile, void *section) |
int | ccp4_cmap_read_row (CMMFile *mfile, void *row) |
int | ccp4_cmap_read_data (const CMMFile *mfile, void *items, int n_items) |
int | ccp4_cmap_write_section (CMMFile *mfile, const void *section) |
int | ccp4_cmap_write_row (CMMFile *mfile, const void *row) |
int | ccp4_cmap_write_data (CMMFile *mfile, const void *items, int n_items) |
int | ccp4_cmap_read_section_header (const CMMFile *mfile, char *header) |
int | ccp4_cmap_write_section_header (CMMFile *mfile, const char *header) |
void | ccp4_cmap_get_cell (const CMMFile *mfile, float *cell) |
void | ccp4_cmap_get_grid (const CMMFile *mfile, int *grid) |
void | ccp4_cmap_get_origin (const CMMFile *mfile, int *origin) |
void | ccp4_cmap_get_order (const CMMFile *mfile, int *axes_order) |
void | ccp4_cmap_get_dim (const CMMFile *mfile, int *map_dim) |
int | ccp4_cmap_get_spacegroup (const CMMFile *mfile) |
void | ccp4_cmap_get_mapstats (const CMMFile *mfile, float *min, float *max, double *mean, double *rms) |
void | ccp4_cmap_set_cell (CMMFile *mfile, const float *cell) |
void | ccp4_cmap_set_grid (CMMFile *mfile, const int *grid) |
void | ccp4_cmap_set_origin (CMMFile *mfile, const int *origin) |
void | ccp4_cmap_set_order (CMMFile *mfile, const int *axes_order) |
void | ccp4_cmap_set_dim (CMMFile *mfile, const int *map_dim) |
void | ccp4_cmap_set_spacegroup (CMMFile *mfile, int spacegroup) |
void | ccp4_cmap_set_mapstats (CMMFile *mfile, const float min, const float max, const double mean, const double rms) |
unsigned int | ccp4_cmap_get_datamode (const CMMFile *mfile) |
void | ccp4_cmap_set_datamode (CMMFile *mfile, unsigned int datamode) |
size_t | ccp4_cmap_get_local_header (CMMFile *mfile) |
void | ccp4_cmap_set_local_header (CMMFile *mfile, size_t size) |
int | ccp4_cmap_num_symop (const CMMFile *mfile) |
int | ccp4_cmap_seek_symop (CMMFile *mfile, int isymop, unsigned int whence) |
int | ccp4_cmap_get_symop (CMMFile *mfile, char *buffer) |
int | ccp4_cmap_set_symop (CMMFile *mfile, const char *buffer) |
int | ccp4_cmap_get_mask (const CMMFile *mfile, float *skew_mat, float *skew_trans) |
int | ccp4_cmap_set_mask (CMMFile *mfile, const float *skew_mat, const float *skew_trans) |
int | ccp4_cmap_number_label (const CMMFile *mfile) |
int | ccp4_cmap_set_label (CMMFile *mfile, const char *label, int posn) |
char * | ccp4_cmap_get_label (const CMMFile *mfile, int posn) |
int | ccp4_cmap_set_title (CMMFile *mfile, const char *label) |
char * | ccp4_cmap_get_title (const CMMFile *mfile) |
Functions defining the C-level API for accessing CCP4 map files.
|
Close the file. In write mode the header is output, along with the machine stamp. In read mode the file is just closed. Write mode supports ways of updating the map statistics ( only active for FLOAT32). /param mfile (CMMFile *) /return void |
|
Set the close mode: 0: calculate based on stored values (default) 1: just dump the current values /param mfile (CMMFile *) /param mask (unsigned int) close mode /return void |
|
Get the cell parameters
|
|
Return the datamode
|
|
Get the stored map dimension (rows,sections,columns)
|
|
Get the grid for the complete cell (X,Y,Z) ordering
|
|
Get the label corresponding to position posn
|
|
Return the local header size
|
|
Get the map statistics, including maximum, minimum, mean and standard deviation. This is only meaningful for datamode FLOAT32.
|
|
Get the values of the translation and rotation elements of the skew matrix. Note: the stored file is in FORTRAN order mat[fastest][slowest], the returned values are in C mat[slowest][fastest] ordering
|
|
Get the stored map axes order (rows,sections,columns) where 1=X, 2=Y, 3=Z
|
|
Get the stored map origin (rows,sections,columns)
|
|
Return the spacegroup listed in the map header. This is overriden by the symops.
|
|
get a symop string of 80 characters
|
|
Get the label corresponding to the title wrapping ccp4_cmap_get_label.
|
|
Return the number of symops (estimated as the size/80)
|
|
Return the number of labels.
|
|
The file is opened.
|
|
raw read of nelements items from file according to the datamode at current location
|
|
read current map section from file to section. Some checking is performed to ensure we are at the start of a legitimate map row.
|
|
read current map section from file to section. Some checking is performed to ensure we are at the start of a legitimate map section.
|
|
read current section header (character array) After reading we are at the end of the local header
|
|
raw seek in items
|
|
seek a row within a map section
|
|
seek among the map sections. The units are of size block_size.
|
|
navigate around the symops, seeking in 80 byte units The result must lie within the symop strings in the file.
|
|
Set the cell parameters. Only allowed when file is opened in write mode.
|
|
Set the datamode. This is only allowed if the file is opened in write mode, and no data has been written.
|
|
Set the stored map dimension (rows,sections,columns) Only allowed when file is opened in write mode before any data is written. Note: the row dimension will be overridden during writing
|
|
Set the cell grid dimension. Only allowed when file is opened in write mode.
|
|
Set the label in the map header. Headers are 80 characters long. The labels are written to the file when it is closed. Therefore, the file must be in write mode. If label == NULL the element corresponding to posn is removed. The number of labels is recalculated on each call.
|
|
Set the local header size (in bytes)
|
|
Set the map statistics, including maximum, minimum, mean and standard deviation. This is only meaningful for datamode FLOAT32 and the file open in write mode.
|
|
Set the values of the translation and rotation elements of the skew matrix. Note: the stored file is in FORTRAN order mat[fastest][slowest]
|
|
Set the stored map axes order (rows,sections,columns) where 1=X, 2=Y, 3=Z. Only allowed when file is opened in write mode.
|
|
Set the stored map origin (rows,sections,columns) Only allowed when file is opened in write mode.
|
|
Set the spacegroup listed in the map header. Only allowed when file is opened in write mode.
|
|
write symops to file. This wraps a raw write. It is up to the calling program to ensure the positioning (effectively assume appends). Writing is blocked if data has alread been written to the file. 80 bytes of continuous memory is written to the file.
|
|
Set the label corresponding to the title, wrapping ccp4_cmap_set_label
|
|
raw write of nelements items to file, according to the datamode, at current location
|
|
write map row to file. Note: this wraps a raw write, with no location checking. It is therefore the responsibility of the calling program to ensure that everything is correct. Effectively assume appending to file.
|
|
write map section to file. Note: this wraps a raw write, with no location checking. It is therefore the responsibility of the calling program to ensure that everything is correct. Effectively assume appending to file.
|
|
write the local section header to the file. This must be of size mfile->data.header.size. Note: no checking is done so it is up to the calling program to ensure that the file is in the correct location. As seeking is turned off, this assumes we are appending to the file.
|