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

VolumetricData Class Reference

Volumetric data class for potential maps, electron density maps, etc. More...

#include <VolumetricData.h>

List of all members.

Public Methods

 VolumetricData (const char *name, const float *origin, const float *xaxis, const float *yaxis, const float *zaxis, int xs, int ys, int zs, float *dataptr)
 constructor. More...

 ~VolumetricData ()
 destructor. More...

void cell_lengths (float *xl, float *yl, float *zl) const
 return cell side lengths. More...

void cell_axes (float *xax, float *yax, float *zax) const
 return cell axes. More...

void cell_dirs (float *xax, float *yax, float *zax) const
 return cell axes directions. More...

void voxel_coord_from_cartesian_coord (const float *carcoord, float *voxcoord, int shiftflag) const
 return volumetric coordinate from cartesian coordinate. More...

int voxel_index_from_coord (float xpos, float ypos, float zpos) const
 return index of the voxel nearest to a cartesian coordinate. More...

float voxel_value (int x, int y, int z) const
 return voxel at requested index, no safety checks. More...

float voxel_value_safe (int x, int y, int z) const
 return voxel, after safely clamping index to valid range. More...

float voxel_value_interpolate (float xv, float yv, float zv) const
 return interpolated value from 8 nearest neighbor voxels. More...

float voxel_value_from_coord (float xpos, float ypos, float zpos) const
 return voxel value based on cartesian coordinates. More...

float voxel_value_interpolate_from_coord (float xpos, float ypos, float zpos) const
 return interpolated value of voxel, based on cartesian coords. More...

void compute_volume_gradient (void)
 (re)compute the volume gradient. More...

void voxel_gradient_fast (int x, int y, int z, float *grad) const
 return gradient at requested index, no safety checks. More...

void voxel_gradient_safe (int x, int y, int z, float *grad) const
 return gradient, after safely clamping index to valid range. More...

void voxel_gradient_interpolate (const float *voxcoord, float *gradient) const
 interpolate the gradient between the eight neighboring voxels. More...

void voxel_gradient_from_coord (const float *coord, float *gradient) const
 return voxel gradient based on cartesian coordinates. More...

void voxel_gradient_interpolate_from_coord (const float *coord, float *gradient) const
 return interpolated voxel gradient for cartesian coordinate. More...


Public Attributes

char * name
 human-readable volume dataset identifier. More...

double origin [3]
 origin of volume (x=0, y=0, z=0 corner). More...

double xaxis [3]
 direction and length for X axis (non-unit). More...

double yaxis [3]
 direction and length for Y axis (non-unit). More...

double zaxis [3]
 direction and length for Z axis (non-unit). More...

int xsize
int ysize
int zsize
 number of samples along each axis. More...

float * data
 raw data, total of xsize*ysize*zsize voxels. More...

float * gradient
 negated normalized volume gradient map. More...

float datamin
float datamax
 min and max data values. More...


Detailed Description

Volumetric data class for potential maps, electron density maps, etc.

Definition at line 24 of file VolumetricData.h.


Constructor & Destructor Documentation

VolumetricData::VolumetricData const char *    name,
const float *    origin,
const float *    xaxis,
const float *    yaxis,
const float *    zaxis,
int    xs,
int    ys,
int    zs,
float *    dataptr
 

constructor.

Definition at line 35 of file VolumetricData.C.

References data, datamax, datamin, gradient, name, NULL, origin, stringdup, xaxis, xsize, yaxis, ysize, zaxis, and zsize.

VolumetricData::~VolumetricData  
 

destructor.

Definition at line 69 of file VolumetricData.C.

References data, gradient, and name.


Member Function Documentation

void VolumetricData::cell_axes float *    xax,
float *    yax,
float *    zax
const
 

return cell axes.

Definition at line 102 of file VolumetricData.C.

References xaxis, xsize, yaxis, ysize, zaxis, and zsize.

Referenced by cell_dirs, and IsoSurface::compute.

void VolumetricData::cell_dirs float *    xax,
float *    yax,
float *    zax
const
 

return cell axes directions.

Definition at line 136 of file VolumetricData.C.

References cell_axes, and cell_lengths.

Referenced by IsoSurface::compute.

void VolumetricData::cell_lengths float *    xl,
float *    yl,
float *    zl
const
 

return cell side lengths.

Definition at line 76 of file VolumetricData.C.

References dot_prod, xaxis, xsize, yaxis, ysize, zaxis, and zsize.

Referenced by cell_dirs, and compute_volume_gradient.

void VolumetricData::compute_volume_gradient void   
 

(re)compute the volume gradient.

Definition at line 290 of file VolumetricData.C.

References cell_lengths, clamp_int, gradient, voxel_value, xsize, ysize, and zsize.

Referenced by BaseMolecule::add_volume_data.

void VolumetricData::voxel_coord_from_cartesian_coord const float *    carcoord,
float *    voxcoord,
int    shiftflag
const
 

return volumetric coordinate from cartesian coordinate.

Definition at line 158 of file VolumetricData.C.

References Matrix4::inverse, Matrix4::multpoint3d, origin, xaxis, xsize, yaxis, ysize, zaxis, and zsize.

Referenced by voxel_gradient_from_coord, voxel_gradient_interpolate_from_coord, voxel_index_from_coord, and voxel_value_interpolate_from_coord.

void VolumetricData::voxel_gradient_fast int    x,
int    y,
int    z,
float *    grad
const [inline]
 

return gradient at requested index, no safety checks.

Definition at line 79 of file VolumetricData.h.

References gradient, xsize, and ysize.

void VolumetricData::voxel_gradient_from_coord const float *    coord,
float *    gradient
const
 

return voxel gradient based on cartesian coordinates.

Definition at line 400 of file VolumetricData.C.

References voxel_coord_from_cartesian_coord, and voxel_gradient_safe.

void VolumetricData::voxel_gradient_interpolate const float *    voxcoord,
float *    gradient
const
 

interpolate the gradient between the eight neighboring voxels.

Definition at line 361 of file VolumetricData.C.

References vec_lerp, and voxel_gradient_safe.

Referenced by voxel_gradient_interpolate_from_coord.

void VolumetricData::voxel_gradient_interpolate_from_coord const float *    coord,
float *    gradient
const
 

return interpolated voxel gradient for cartesian coordinate.

Definition at line 412 of file VolumetricData.C.

References NAN, voxel_coord_from_cartesian_coord, voxel_gradient_interpolate, xsize, ysize, and zsize.

void VolumetricData::voxel_gradient_safe int    x,
int    y,
int    z,
float *    grad
const
 

return gradient, after safely clamping index to valid range.

Definition at line 348 of file VolumetricData.C.

References gradient, xsize, ysize, and zsize.

Referenced by voxel_gradient_from_coord, and voxel_gradient_interpolate.

int VolumetricData::voxel_index_from_coord float    xpos,
float    ypos,
float    zpos
const
 

return index of the voxel nearest to a cartesian coordinate.

Definition at line 196 of file VolumetricData.C.

References voxel_coord_from_cartesian_coord, xsize, ysize, and zsize.

Referenced by atomsel_gridindex_array, and voxel_value_from_coord.

float VolumetricData::voxel_value int    x,
int    y,
int    z
const [inline]
 

return voxel at requested index, no safety checks.

Definition at line 60 of file VolumetricData.h.

References data, xsize, and ysize.

Referenced by compute_volume_gradient.

float VolumetricData::voxel_value_from_coord float    xpos,
float    ypos,
float    zpos
const
 

return voxel value based on cartesian coordinates.

Definition at line 259 of file VolumetricData.C.

References data, NAN, and voxel_index_from_coord.

Referenced by atomsel_volume_array.

float VolumetricData::voxel_value_interpolate float    xv,
float    yv,
float    zv
const
 

return interpolated value from 8 nearest neighbor voxels.

Definition at line 228 of file VolumetricData.C.

References voxel_value_safe.

Referenced by VolumeTexture::generateContourLineTexture, and voxel_value_interpolate_from_coord.

float VolumetricData::voxel_value_interpolate_from_coord float    xpos,
float    ypos,
float    zpos
const
 

return interpolated value of voxel, based on cartesian coords.

Definition at line 269 of file VolumetricData.C.

References NAN, voxel_coord_from_cartesian_coord, voxel_value_interpolate, xsize, ysize, and zsize.

Referenced by atomsel_interp_volume_array.

float VolumetricData::voxel_value_safe int    x,
int    y,
int    z
const
 

return voxel, after safely clamping index to valid range.

Definition at line 217 of file VolumetricData.C.

References data, xsize, ysize, and zsize.

Referenced by voxel_value_interpolate.


Member Data Documentation

float* VolumetricData::data
 

raw data, total of xsize*ysize*zsize voxels.

Definition at line 32 of file VolumetricData.h.

Referenced by IsoSurface::DoCell, IsoContour::DoCell, VolumeTexture::generateChargeTexture, VolumeTexture::generateColorScaleTexture, VolumeTexture::generateHSVTexture, VolMap::VolMap, VolumetricData, voxel_value, voxel_value_from_coord, voxel_value_safe, and ~VolumetricData.

float VolumetricData::datamax
 

min and max data values.

Definition at line 34 of file VolumetricData.h.

Referenced by BaseMolecule::add_volume_data, AtomColor::find, VolumeTexture::generateContourLineTexture, GraphicsFltkMenu::update_molchooser, and VolumetricData.

float VolumetricData::datamin
 

Definition at line 34 of file VolumetricData.h.

Referenced by BaseMolecule::add_volume_data, AtomColor::find, VolumeTexture::generateContourLineTexture, GraphicsFltkMenu::update_molchooser, and VolumetricData.

float* VolumetricData::gradient
 

negated normalized volume gradient map.

Definition at line 33 of file VolumetricData.h.

Referenced by compute_volume_gradient, VolumetricData, voxel_gradient_fast, voxel_gradient_safe, and ~VolumetricData.

char* VolumetricData::name
 

human-readable volume dataset identifier.

Definition at line 26 of file VolumetricData.h.

Referenced by BaseMolecule::add_volume_data, SaveTrajectoryFltkMenu::molchooser_activate_selection, GraphicsFltkMenu::update_molchooser, GraphicsFltkMenu::volindex_update, VolMap::VolMap, VolumetricData, and ~VolumetricData.

double VolumetricData::origin[3]
 

origin of volume (x=0, y=0, z=0 corner).

Definition at line 27 of file VolumetricData.h.

Referenced by DrawMolecule::cov, IsoSurface::DoCell, IsoContour::DoCell, prepare_texture_coordinates, VolMap::VolMap, VolumetricData, and voxel_coord_from_cartesian_coord.

double VolumetricData::xaxis[3]
 

direction and length for X axis (non-unit).

Definition at line 28 of file VolumetricData.h.

Referenced by cell_axes, cell_lengths, IsoContour::compute, DrawMolecule::cov, prepare_texture_coordinates, DrawMolecule::scale_factor, VolMap::VolMap, VolumetricData, and voxel_coord_from_cartesian_coord.

int VolumetricData::xsize
 

Definition at line 31 of file VolumetricData.h.

Referenced by cell_axes, cell_lengths, IsoSurface::compute, IsoContour::compute, compute_volume_gradient, IsoSurface::DoCell, IsoContour::DoCell, VolumeTexture::generateChargeTexture, VolumeTexture::generateColorScaleTexture, VolumeTexture::generateContourLineTexture, VolumeTexture::generateHSVTexture, VolMap::VolMap, VolumetricData, voxel_coord_from_cartesian_coord, voxel_gradient_fast, voxel_gradient_interpolate_from_coord, voxel_gradient_safe, voxel_index_from_coord, voxel_value, voxel_value_interpolate_from_coord, and voxel_value_safe.

double VolumetricData::yaxis[3]
 

direction and length for Y axis (non-unit).

Definition at line 29 of file VolumetricData.h.

Referenced by cell_axes, cell_lengths, IsoContour::compute, DrawMolecule::cov, prepare_texture_coordinates, DrawMolecule::scale_factor, VolMap::VolMap, VolumetricData, and voxel_coord_from_cartesian_coord.

int VolumetricData::ysize
 

Definition at line 31 of file VolumetricData.h.

Referenced by cell_axes, cell_lengths, IsoSurface::compute, IsoContour::compute, compute_volume_gradient, IsoSurface::DoCell, IsoContour::DoCell, VolumeTexture::generateChargeTexture, VolumeTexture::generateColorScaleTexture, VolumeTexture::generateContourLineTexture, VolumeTexture::generateHSVTexture, VolMap::VolMap, VolumetricData, voxel_coord_from_cartesian_coord, voxel_gradient_fast, voxel_gradient_interpolate_from_coord, voxel_gradient_safe, voxel_index_from_coord, voxel_value, voxel_value_interpolate_from_coord, and voxel_value_safe.

double VolumetricData::zaxis[3]
 

direction and length for Z axis (non-unit).

Definition at line 30 of file VolumetricData.h.

Referenced by cell_axes, cell_lengths, IsoContour::compute, DrawMolecule::cov, prepare_texture_coordinates, DrawMolecule::scale_factor, VolMap::VolMap, VolumetricData, and voxel_coord_from_cartesian_coord.

int VolumetricData::zsize
 

number of samples along each axis.

Definition at line 31 of file VolumetricData.h.

Referenced by cell_axes, cell_lengths, IsoSurface::compute, IsoContour::compute, compute_volume_gradient, VolumeTexture::generateChargeTexture, VolumeTexture::generateColorScaleTexture, VolumeTexture::generateContourLineTexture, VolumeTexture::generateHSVTexture, VolMap::VolMap, VolumetricData, voxel_coord_from_cartesian_coord, voxel_gradient_interpolate_from_coord, voxel_gradient_safe, voxel_index_from_coord, voxel_value_interpolate_from_coord, and voxel_value_safe.


The documentation for this class was generated from the following files:
Generated on Sat Sep 6 01:28:04 2008 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002