Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

ccp4plugin.C File Reference

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include "molfile_plugin.h"
#include "endianswap.h"

Go to the source code of this file.

Compounds

struct  ccp4_t
struct  uchar3

Defines

#define M_PI   3.14159265358979323846
#define CCP4HDSIZE   1024
#define MRC_TYPE_BYTE   0
#define MRC_TYPE_SHORT   1
#define MRC_TYPE_FLOAT   2
#define MRC_TYPE_SHORT2   3
#define MRC_TYPE_FLOAT2   4
#define MRC_TYPE_USHORT   6
#define MRC_TYPE_UCHAR3   16
#define DATA_FLAG_SIGNED   0x1
#define DATA_FLAG_IMOD_FORMAT   0x2
#define IMOD_FILE_ID   0x494d4f44
#define IMOD_MAGIC_STAMP   1146047817
#define IMOD_FLAG_SIGNED   0x1
#define IMOD_FLAG_HEADER_SPACING   0x2
#define IMOD_FLAG_ORIGIN_INVERTED_SIGN   0x4

Functions

void * open_ccp4_read (const char *filepath, const char *filetype, int *natoms)
int read_ccp4_metadata (void *v, int *nsets, molfile_volumetric_t **metadata)
int read_ccp4_data (void *v, int set, float *datablock, float *colorblock)
void close_ccp4_read (void *v)
VMDPLUGIN_API int VMDPLUGIN_init (void)
VMDPLUGIN_API int VMDPLUGIN_register (void *v, vmdplugin_register_cb cb)
VMDPLUGIN_API int VMDPLUGIN_fini (void)

Variables

molfile_plugin_t plugin


Define Documentation

#define CCP4HDSIZE   1024
 

Definition at line 47 of file ccp4plugin.C.

Referenced by open_ccp4_read.

#define DATA_FLAG_IMOD_FORMAT   0x2
 

Definition at line 62 of file ccp4plugin.C.

Referenced by open_ccp4_read.

#define DATA_FLAG_SIGNED   0x1
 

Definition at line 61 of file ccp4plugin.C.

Referenced by open_ccp4_read, and read_ccp4_data.

#define IMOD_FILE_ID   0x494d4f44
 

Definition at line 65 of file ccp4plugin.C.

#define IMOD_FLAG_HEADER_SPACING   0x2
 

Definition at line 68 of file ccp4plugin.C.

Referenced by open_ccp4_read.

#define IMOD_FLAG_ORIGIN_INVERTED_SIGN   0x4
 

Definition at line 69 of file ccp4plugin.C.

Referenced by open_ccp4_read.

#define IMOD_FLAG_SIGNED   0x1
 

Definition at line 67 of file ccp4plugin.C.

Referenced by open_ccp4_read.

#define IMOD_MAGIC_STAMP   1146047817
 

Definition at line 66 of file ccp4plugin.C.

Referenced by open_ccp4_read.

#define M_PI   3.14159265358979323846
 

Definition at line 41 of file ccp4plugin.C.

Referenced by open_ccp4_read.

#define MRC_TYPE_BYTE   0
 

Definition at line 52 of file ccp4plugin.C.

Referenced by open_ccp4_read, and read_ccp4_data.

#define MRC_TYPE_FLOAT   2
 

Definition at line 54 of file ccp4plugin.C.

Referenced by open_ccp4_read, and read_ccp4_data.

#define MRC_TYPE_FLOAT2   4
 

Definition at line 56 of file ccp4plugin.C.

Referenced by open_ccp4_read.

#define MRC_TYPE_SHORT   1
 

Definition at line 53 of file ccp4plugin.C.

Referenced by open_ccp4_read, and read_ccp4_data.

#define MRC_TYPE_SHORT2   3
 

Definition at line 55 of file ccp4plugin.C.

Referenced by open_ccp4_read, and read_ccp4_data.

#define MRC_TYPE_UCHAR3   16
 

Definition at line 58 of file ccp4plugin.C.

Referenced by open_ccp4_read, and read_ccp4_data.

#define MRC_TYPE_USHORT   6
 

Definition at line 57 of file ccp4plugin.C.

Referenced by open_ccp4_read, and read_ccp4_data.


Function Documentation

void close_ccp4_read void *    v [static]
 

Definition at line 779 of file ccp4plugin.C.

References ccp4_t::fd, and ccp4_t::vol.

Referenced by VMDPLUGIN_init.

void* open_ccp4_read const char *    filepath,
const char *    filetype,
int *    natoms
[static]
 

Definition at line 96 of file ccp4plugin.C.

References ccp4_t::amax, ccp4_t::amean, ccp4_t::amin, CCP4HDSIZE, DATA_FLAG_IMOD_FORMAT, DATA_FLAG_SIGNED, ccp4_t::dataflags, molfile_volumetric_t::dataname, ccp4_t::dataOffset, ccp4_t::exttype, ccp4_t::fd, molfile_volumetric_t::has_color, IMOD_FLAG_HEADER_SPACING, IMOD_FLAG_ORIGIN_INVERTED_SIGN, IMOD_FLAG_SIGNED, IMOD_MAGIC_STAMP, ccp4_t::imodflags, ccp4_t::imodstamp, M_PI, MOLFILE_NUMATOMS_NONE, MRC_TYPE_BYTE, MRC_TYPE_FLOAT, MRC_TYPE_FLOAT2, MRC_TYPE_SHORT, MRC_TYPE_SHORT2, MRC_TYPE_UCHAR3, MRC_TYPE_USHORT, ccp4_t::nsets, ccp4_t::nversion, molfile_volumetric_t::origin, ccp4_t::swap, swap4_aligned, ccp4_t::vol, ccp4_t::voxcount, ccp4_t::voxtype, molfile_volumetric_t::xaxis, molfile_volumetric_t::xsize, ccp4_t::xyz2crs, molfile_volumetric_t::yaxis, molfile_volumetric_t::ysize, molfile_volumetric_t::zaxis, and molfile_volumetric_t::zsize.

Referenced by VMDPLUGIN_init.

int read_ccp4_data void *    v,
int    set,
float *    datablock,
float *    colorblock
[static]
 

Definition at line 563 of file ccp4plugin.C.

References uchar3::blue, DATA_FLAG_SIGNED, ccp4_t::dataflags, ccp4_t::dataOffset, ccp4_t::fd, uchar3::green, MOLFILE_ERROR, MRC_TYPE_BYTE, MRC_TYPE_FLOAT, MRC_TYPE_SHORT, MRC_TYPE_SHORT2, MRC_TYPE_UCHAR3, MRC_TYPE_USHORT, uchar3::red, ccp4_t::swap, swap2_aligned, swap4_aligned, ccp4_t::vol, ccp4_t::voxtype, molfile_volumetric_t::xsize, ccp4_t::xyz2crs, molfile_volumetric_t::ysize, and molfile_volumetric_t::zsize.

Referenced by VMDPLUGIN_init.

int read_ccp4_metadata void *    v,
int *    nsets,
molfile_volumetric_t **    metadata
[static]
 

Definition at line 554 of file ccp4plugin.C.

References ccp4_t::nsets, and ccp4_t::vol.

Referenced by VMDPLUGIN_init.

VMDPLUGIN_API int VMDPLUGIN_fini void   
 

Definition at line 816 of file ccp4plugin.C.

References VMDPLUGIN_API, and VMDPLUGIN_SUCCESS.

VMDPLUGIN_API int VMDPLUGIN_init void   
 

Definition at line 792 of file ccp4plugin.C.

References close_ccp4_read, molfile_plugin_t::close_file_read, molfile_plugin_t::filename_extension, MOLFILE_PLUGIN_TYPE, open_ccp4_read, molfile_plugin_t::open_file_read, read_ccp4_data, read_ccp4_metadata, molfile_plugin_t::read_volumetric_data, molfile_plugin_t::read_volumetric_metadata, vmdplugin_ABIVERSION, VMDPLUGIN_API, VMDPLUGIN_SUCCESS, and VMDPLUGIN_THREADSAFE.

VMDPLUGIN_API int VMDPLUGIN_register void *    v,
vmdplugin_register_cb    cb
 

Definition at line 811 of file ccp4plugin.C.

References VMDPLUGIN_API, vmdplugin_register_cb, and VMDPLUGIN_SUCCESS.


Variable Documentation

molfile_plugin_t plugin [static]
 

Definition at line 790 of file ccp4plugin.C.


Generated on Sat Aug 15 03:07:07 2020 for VMD Plugins (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002