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

Voltool.h File Reference

General volumetric data processing routines, particularly supporting MDFF. The methods included in this class are are only expected to function correctly for orthorhombic volumes with uniform grid spacing on all three axes. More fully-generalized volume operators and subroutines are in the VolumetricData class. More...

#include <stdio.h>
#include "VolumetricData.h"
#include "VMDApp.h"
#include <stdint.h>

Go to the source code of this file.

Defines

#define MIN(X, Y)   (((X)<(Y))? (X) : (Y))
#define MAX(X, Y)   (((X)>(Y))? (X) : (Y))

Functions

int myisnan (float f)
float cubic_interp (float y0, float y1, float y2, float y3, float mu)
 Cubic interpolation used by supersample. More...

void voxel_coord (int x, int y, int z, float &gx, float &gy, float &gz, VolumetricData *vol)
 get the cartesian coordinate of a voxel given its x,y,z indices. More...

void voxel_coord (int i, float &x, float &y, float &z, VolumetricData *vol)
 get the cartesian coordinate of a voxel given its 1D index. More...

void add (VolumetricData *mapA, VolumetricData *mapB, VolumetricData *newvol, bool interp, bool USE_UNION)
 add voxel values from mapA and mapB together elementwise. More...

void subtract (VolumetricData *mapA, VolumetricData *mapB, VolumetricData *newvol, bool interp, bool USE_UNION)
 subtract voxel values of mapB from mapA. More...

void multiply (VolumetricData *mapA, VolumetricData *mapB, VolumetricData *newvol, bool interp, bool USE_UNION)
 multiplies voxel values of two mapA and mapB together. More...

void average (VolumetricData *mapA, VolumetricData *mapB, VolumetricData *newvol, bool interp, bool USE_UNION)
 create a new VolumetricData object whose values are the average mapA and mapB at each location. More...

void vol_com (VolumetricData *vol, float *com)
 calculate the centor of mass of a VolumetricData object. More...

void vol_moveto (VolumetricData *vol, float *com, float *pos)
 translate the center of mass of a given VolumetricData object to a specific cartesian coordinate. More...

void vol_move (VolumetricData *vol, float *mat)
 apply a matrix transformation to a volumetricdata. More...

void init_from_union (VolumetricData *mapA, const VolumetricData *mapB, VolumetricData *newvol)
 create a new VolumetricData object from the union of two datasets. More...

void init_from_intersection (VolumetricData *mapA, const VolumetricData *mapB, VolumetricData *newvol)
 create a new VolumetricData object from the intersection of two datasets. More...

VolumetricDatainit_new_volume ()
 create a new empty volume. More...

int init_new_volume_molecule (VMDApp *app, VolumetricData *newvol, const char *name)
 create a new VMD molecule with VolumetricData. More...

void histogram (VolumetricData *vol, int nbins, long *bins, float *midpts)
 Calculate histogram of map. bins and midpts are return arrays for the counts and midpoints of the bins, respectively and must be the size of nbins. More...

int write_file (VMDApp *app, Molecule *volmol, int volid, const char *filename)
 write volumetric data to a file using MoleFilePlugin. More...


Detailed Description

General volumetric data processing routines, particularly supporting MDFF. The methods included in this class are are only expected to function correctly for orthorhombic volumes with uniform grid spacing on all three axes. More fully-generalized volume operators and subroutines are in the VolumetricData class.

Definition in file Voltool.h.


Define Documentation

#define MAX X,
     (((X)>(Y))? (X) : (Y))
 

Definition at line 35 of file Voltool.h.

#define MIN X,
     (((X)<(Y))? (X) : (Y))
 

Definition at line 34 of file Voltool.h.


Function Documentation

void add VolumetricData   mapA,
VolumetricData   mapB,
VolumetricData   newvol,
bool    interp,
bool    USE_UNION
 

add voxel values from mapA and mapB together elementwise.

Definition at line 249 of file Voltool.C.

Referenced by density_add, ColorscaleLumaChart::draw, and MolBrowser::update.

void average VolumetricData   mapA,
VolumetricData   mapB,
VolumetricData   newvol,
bool    interp,
bool    USE_UNION
 

create a new VolumetricData object whose values are the average mapA and mapB at each location.

Definition at line 352 of file Voltool.C.

Referenced by density_average.

float cubic_interp float    y0,
float    y1,
float    y2,
float    y3,
float    mu
[inline]
 

Cubic interpolation used by supersample.

Definition at line 43 of file Voltool.h.

Referenced by VolumetricData::supersample.

void histogram VolumetricData   vol,
int    nbins,
long *    bins,
float *    midpts
 

Calculate histogram of map. bins and midpts are return arrays for the counts and midpoints of the bins, respectively and must be the size of nbins.

Definition at line 443 of file Voltool.C.

Referenced by density_histogram.

void init_from_intersection VolumetricData   mapA,
const VolumetricData   mapB,
VolumetricData   newvol
 

create a new VolumetricData object from the intersection of two datasets.

Referenced by add, average, cc_threaded, multiply, and subtract.

void init_from_union VolumetricData   mapA,
const VolumetricData   mapB,
VolumetricData   newvol
 

create a new VolumetricData object from the union of two datasets.

Referenced by add, average, multiply, and subtract.

VolumetricData* init_new_volume  
 

create a new empty volume.

Definition at line 202 of file Voltool.C.

int init_new_volume_molecule VMDApp   app,
VolumetricData   newvol,
const char *    name
 

create a new VMD molecule with VolumetricData.

Definition at line 216 of file Voltool.C.

Referenced by density_add, density_average, density_multiply, density_subtract, mask, and mdff_sim.

void multiply VolumetricData   mapA,
VolumetricData   mapB,
VolumetricData   newvol,
bool    interp,
bool    USE_UNION
 

multiplies voxel values of two mapA and mapB together.

Definition at line 303 of file Voltool.C.

Referenced by density_multiply, and mask.

int myisnan float    f [inline, static]
 

Definition at line 37 of file Voltool.h.

Referenced by correlationthread, and multiply.

void subtract VolumetricData   mapA,
VolumetricData   mapB,
VolumetricData   newvol,
bool    interp,
bool    USE_UNION
 

subtract voxel values of mapB from mapA.

Definition at line 276 of file Voltool.C.

Referenced by density_subtract.

void vol_com VolumetricData   vol,
float *    com
 

calculate the centor of mass of a VolumetricData object.

Definition at line 229 of file Voltool.C.

Referenced by density_com, density_moveto, density_rotate, fit, and reset_density.

void vol_move VolumetricData   vol,
float *    mat
 

apply a matrix transformation to a volumetricdata.

Definition at line 399 of file Voltool.C.

Referenced by density_move, and do_density_rotate.

void vol_moveto VolumetricData   vol,
float *    com,
float *    pos
 

translate the center of mass of a given VolumetricData object to a specific cartesian coordinate.

Definition at line 379 of file Voltool.C.

Referenced by density_moveto, density_rotate, and reset_density.

void voxel_coord int    i,
float &    x,
float &    y,
float &    z,
VolumetricData   vol
[inline]
 

get the cartesian coordinate of a voxel given its 1D index.

Definition at line 68 of file Voltool.h.

References VolumetricData::cell_axes, VolumetricData::origin, VolumetricData::xsize, VolumetricData::ysize, and z.

Referenced by correlationthread.

void voxel_coord int    x,
int    y,
int    z,
float &    gx,
float &    gy,
float &    gz,
VolumetricData   vol
[inline]
 

get the cartesian coordinate of a voxel given its x,y,z indices.

Definition at line 55 of file Voltool.h.

References VolumetricData::cell_axes, VolumetricData::origin, and z.

int write_file VMDApp   app,
Molecule   volmol,
int    volid,
const char *    filename
 

write volumetric data to a file using MoleFilePlugin.

Definition at line 464 of file Voltool.C.

Referenced by density_add, density_average, density_binmask, density_clamp, density_crop, density_downsample, density_mdff_potential, density_move, density_moveto, density_multiply, density_range, density_sadd, density_save, density_sigma, density_smooth, density_smult, density_subtract, density_supersample, density_trim, mask, and mdff_sim.


Generated on Sat Apr 20 02:44:25 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002