IMP logo
IMP Reference Guide  develop.1a86c4215a,2024/04/24
The Integrative Modeling Platform
grid_utility.h File Reference
#include <IMP/algebra/algebra_config.h>
#include "GridD.h"
#include "internal/grid_interpolation.h"
#include "grid_indexes.h"
#include "internal/grid_3d_impl.h"
+ Include dependency graph for grid_utility.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 IMP
 Base functionality and abstract base classes for representation, scoring and sampling.
 
 IMP::algebra
 General purpose algebraic and geometric methods that are expected to be used by a wide variety of IMP modules.
 

Macros

#define IMP_GRID3D_FOREACH_SMALLER_EXTENDED_INDEX_RANGE(grid, center, lower_corner, upper_corner, action)
 Iterate over each voxel in a subset of the grid that are less than center. More...
 
#define IMP_GRID3D_FOREACH_VOXEL(g, action)
 Iterate over each voxel in grid and do something with each one. More...
 

Functions

template<int D, class Storage , class Value , class Embedding >
Value IMP::algebra::get_linearly_interpolated (const GridD< D, Storage, Value, Embedding > &g, const VectorD< D > &pt)
 Get the value from the grid with linear interpolation. More...
 
template<class Storage , class Embedding >
const Storage::Value IMP::algebra::get_trilinearly_interpolated (const GridD< 3, Storage, typename Storage::Value, Embedding > &g, const Vector3D &v, const typename Storage::Value &outside=0)
 Use trilinear interpolation to compute a smoothed value at v. More...
 

Detailed Description

Utility functions for working with grids.

Copyright 2007-2022 IMP Inventors. All rights reserved.

Definition in file grid_utility.h.

Macro Definition Documentation

#define IMP_GRID3D_FOREACH_SMALLER_EXTENDED_INDEX_RANGE (   grid,
  center,
  lower_corner,
  upper_corner,
  action 
)

Iterate over each voxel in a subset of the grid that are less than center.

The voxel index is unsigned int voxel_index[3]. Use this if, for example, you want to find nearby pairs of voxels once each.

See Also
Grid3D

Definition at line 120 of file grid_utility.h.

#define IMP_GRID3D_FOREACH_VOXEL (   g,
  action 
)

Iterate over each voxel in grid and do something with each one.

The voxel index is GridIndexD<3> voxel_index and the coordinates of the center is Vector3D voxel_center and the index of the voxel is loop_voxel_index.

See Also
Grid3D

Definition at line 81 of file grid_utility.h.