Main Page   Namespace List   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...

int gridsize () const
 return total number of gridpoints. More...

void set_name (const char *name)
 Sets data name to an internal copy of the provided string. 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 27 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 36 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 70 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 112 of file VolumetricData.C.

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

Referenced by cell_dirs, IsoSurface::compute, VolMapCreateCoulombPotentialMSM::compute_frame, VolMapCreateCoulombPotential::compute_frame, VolMapCreateOccupancy::compute_frame, VolMapCreateDensity::compute_frame, VolMapCreateMask::compute_frame, and volmap_write_dx_file.

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

return cell axes directions.

Definition at line 146 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 86 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 300 of file VolumetricData.C.

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

Referenced by BaseMolecule::add_volume_data, and QuickSurf::calc_surf.

int VolumetricData::gridsize   const [inline]
 

return total number of gridpoints.

Definition at line 48 of file VolumetricData.h.

References xsize, ysize, and zsize.

Referenced by VolMapCreateILS::compute, and vmd_volmap_compare.

void VolumetricData::set_name const char *    name
 

Sets data name to an internal copy of the provided string.

Definition at line 78 of file VolumetricData.C.

References name.

Referenced by VolMapCreateCoulombPotentialMSM::compute_init, VolMapCreateCoulombPotential::compute_init, VolMapCreateDistance::compute_init, VolMapCreateOccupancy::compute_init, VolMapCreateInterp::compute_init, VolMapCreateDensity::compute_init, VolMapCreateMask::compute_init, and VolMapCreateILS::write_map.

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

return volumetric coordinate from cartesian coordinate.

Definition at line 168 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 88 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 410 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 371 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 422 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 358 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 206 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 69 of file VolumetricData.h.

References data, xsize, and ysize.

Referenced by compute_volume_gradient, and volmap_write_dx_file.

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

return voxel value based on cartesian coordinates.

Definition at line 269 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 238 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 279 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 227 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 35 of file VolumetricData.h.

Referenced by VolMapCreateILS::add_map_to_molecule, VolMapCreate::combo_begin, VolMapCreate::combo_export, VolMapCreateILS::compute, VolMapCreate::compute_all, IsoContour::DoCell, IsoSurface::DoCellGeneral, IsoSurface::DoGridPosNorms, VolumeTexture::generateChargeTexture, VolumeTexture::generateColorScaleTexture, VolumeTexture::generateHSVTexture, vmd_volmap_compare, vmd_volmap_new_fromtype, volmap_write_dx_file, VolumetricData, voxel_value, voxel_value_from_coord, voxel_value_safe, and ~VolumetricData.

float VolumetricData::datamax
 

min and max data values.

Definition at line 37 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 37 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 36 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 29 of file VolumetricData.h.

Referenced by VolMapCreateILS::add_map_to_molecule, BaseMolecule::add_volume_data, SaveTrajectoryFltkMenu::molchooser_activate_selection, set_name, GraphicsFltkMenu::update_molchooser, vmd_volmap_new_fromtype, GraphicsFltkMenu::volindex_update, volmap_write_dx_file, VolumetricData, and ~VolumetricData.

double VolumetricData::origin[3]
 

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

Definition at line 30 of file VolumetricData.h.

Referenced by VolMapCreateILS::add_map_to_molecule, VolMapCreateCoulombPotentialMSM::compute_frame, VolMapCreateCoulombPotential::compute_frame, VolMapCreateDistance::compute_frame, VolMapCreateOccupancy::compute_frame, VolMapCreateInterp::compute_frame, VolMapCreateDensity::compute_frame, VolMapCreateMask::compute_frame, VolMapCreate::compute_init, DrawMolecule::cov, IsoContour::DoCell, IsoSurface::DoCellGeneral, IsoSurface::DoGridPosNorms, prepare_texture_coordinates, IsoSurface::set_color_voltex_rgb3fv, vmd_volmap_compare, vmd_volmap_new_fromtype, volmap_write_dx_file, VolumetricData, and voxel_coord_from_cartesian_coord.

double VolumetricData::xaxis[3]
 

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

Definition at line 31 of file VolumetricData.h.

Referenced by VolMapCreateILS::add_map_to_molecule, cell_axes, cell_lengths, IsoContour::compute, VolMapCreate::compute_init, DrawMolecule::cov, prepare_texture_coordinates, DrawMolecule::scale_factor, vmd_volmap_compare, vmd_volmap_new_fromtype, VolumetricData, and voxel_coord_from_cartesian_coord.

int VolumetricData::xsize
 

Definition at line 34 of file VolumetricData.h.

Referenced by VolMapCreateILS::add_map_to_molecule, cell_axes, cell_lengths, VolMapCreate::combo_addframe, VolMapCreate::combo_begin, VolMapCreate::combo_export, VolMapCreateILS::compute, IsoSurface::compute, IsoContour::compute, VolMapCreate::compute_all, VolMapCreateCoulombPotentialMSM::compute_frame, VolMapCreateCoulombPotential::compute_frame, VolMapCreateDistance::compute_frame, VolMapCreateOccupancy::compute_frame, VolMapCreateInterp::compute_frame, VolMapCreateDensity::compute_frame, VolMapCreateMask::compute_frame, VolMapCreate::compute_init, compute_volume_gradient, IsoContour::DoCell, IsoSurface::DoCellGeneral, IsoSurface::DoGridPosNorms, VolumeTexture::generateChargeTexture, VolumeTexture::generateColorScaleTexture, VolumeTexture::generateContourLineTexture, VolumeTexture::generateHSVTexture, gridsize, IsoSurface::set_color_voltex_rgb3fv, vmd_volmap_compare, vmd_volmap_new_fromtype, volmap_write_dx_file, 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 32 of file VolumetricData.h.

Referenced by VolMapCreateILS::add_map_to_molecule, cell_axes, cell_lengths, IsoContour::compute, VolMapCreate::compute_init, DrawMolecule::cov, prepare_texture_coordinates, DrawMolecule::scale_factor, vmd_volmap_compare, vmd_volmap_new_fromtype, VolumetricData, and voxel_coord_from_cartesian_coord.

int VolumetricData::ysize
 

Definition at line 34 of file VolumetricData.h.

Referenced by VolMapCreateILS::add_map_to_molecule, cell_axes, cell_lengths, VolMapCreate::combo_addframe, VolMapCreate::combo_begin, VolMapCreate::combo_export, VolMapCreateILS::compute, IsoSurface::compute, IsoContour::compute, VolMapCreate::compute_all, VolMapCreateCoulombPotentialMSM::compute_frame, VolMapCreateCoulombPotential::compute_frame, VolMapCreateDistance::compute_frame, VolMapCreateOccupancy::compute_frame, VolMapCreateInterp::compute_frame, VolMapCreateDensity::compute_frame, VolMapCreateMask::compute_frame, VolMapCreate::compute_init, compute_volume_gradient, IsoContour::DoCell, IsoSurface::DoCellGeneral, IsoSurface::DoGridPosNorms, VolumeTexture::generateChargeTexture, VolumeTexture::generateColorScaleTexture, VolumeTexture::generateContourLineTexture, VolumeTexture::generateHSVTexture, gridsize, IsoSurface::set_color_voltex_rgb3fv, vmd_volmap_compare, vmd_volmap_new_fromtype, volmap_write_dx_file, 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 33 of file VolumetricData.h.

Referenced by VolMapCreateILS::add_map_to_molecule, cell_axes, cell_lengths, IsoContour::compute, VolMapCreate::compute_init, DrawMolecule::cov, prepare_texture_coordinates, DrawMolecule::scale_factor, vmd_volmap_compare, vmd_volmap_new_fromtype, VolumetricData, and voxel_coord_from_cartesian_coord.

int VolumetricData::zsize
 

number of samples along each axis.

Definition at line 34 of file VolumetricData.h.

Referenced by VolMapCreateILS::add_map_to_molecule, cell_axes, cell_lengths, VolMapCreate::combo_addframe, VolMapCreate::combo_begin, VolMapCreate::combo_export, IsoSurface::compute, IsoContour::compute, VolMapCreate::compute_all, VolMapCreateCoulombPotentialMSM::compute_frame, VolMapCreateCoulombPotential::compute_frame, VolMapCreateDistance::compute_frame, VolMapCreateOccupancy::compute_frame, VolMapCreateInterp::compute_frame, VolMapCreateDensity::compute_frame, VolMapCreateMask::compute_frame, VolMapCreate::compute_init, compute_volume_gradient, IsoSurface::DoGridPosNorms, VolumeTexture::generateChargeTexture, VolumeTexture::generateColorScaleTexture, VolumeTexture::generateContourLineTexture, VolumeTexture::generateHSVTexture, gridsize, IsoSurface::set_color_voltex_rgb3fv, vmd_volmap_compare, vmd_volmap_new_fromtype, volmap_write_dx_file, 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 May 26 01:49:35 2012 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002