IMP Reference Guide
develop.7cb8855c60,2024/10/08
The Integrative Modeling Platform
|
A voxel grid in d-dimensional space. More...
#include <IMP/algebra/GridD.h>
A voxel grid in d-dimensional space.
First some terminology:
IMP
provides support for a variety of spatial grids. The grid support in C++ is implemented by combining several different layers to specify what capabilities are desired. These layers are:
These are implemented as mix-ins, so each layer provides a set of accessible functionality as methods/types in the final class.
Iterate over the set of voxels incident on a bounding box:
Public Types | |
typedef EmbeddingT | Embedding |
typedef StorageT | Storage |
typedef VectorD< D > | Vector |
Public Member Functions | |
GridD (const Ints counts, const BoundingBoxD< D > &bb, Value default_value=Value()) | |
GridD (double side, const BoundingBoxD< D > &bb, const Value &default_value=Value()) | |
GridD (const VectorD< D > &sides, const BoundingBoxD< D > &bb, const Value &default_value=Value()) | |
GridD (const Storage &storage, const Embedding &embed) | |
GridD (double side, const VectorD< D > &origin, const Value &default_value=Value()) | |
GridD (const VectorD< D > &sides, const VectorD< D > &origin, const Value &default_value=Value()) | |
GridD () | |
An empty, undefined grid. More... | |
GridIndexD< D > | add_voxel (const VectorD< D > &pt, const Value &vt) |
const Value | at (VectorD< D >) const |
Value & | at (VectorD< D >) |
BoundingBoxD< D > | get_bounding_box () const |
ExtendedGridIndexD< D > | get_extended_index (const GridIndexD< D > &index) const |
Convert an index back to an extended index. More... | |
Value & | operator[] (VectorD< D >) |
const Value | operator[] (VectorD< D >) const |
void | set_bounding_box (const BoundingBoxD< D > &bb3) |
Change the bounding box but not the grid or contents. More... | |
void | show (std::ostream &out=std::cout) const |
Get nearest | |
If the point is in the bounding box of the grid, this is the index of the voxel containing the point, otherwise it is the closest one in the bounding box. This can only be used with bounded grids, right now. | |
GridIndexD< D > | get_nearest_index (const VectorD< D > &pt) const |
ExtendedGridIndexD< D > | get_nearest_extended_index (const VectorD< D > &pt) const |
Voxel iterators | |
These iterators go through a range of voxels in the grid. These voxels include any that touch or are contained in the shape passed to the begin/end calls. | |
typedef internal::GridIndexIterator < ExtendedGridIndexD< D > , internal::AllItHelp < ExtendedGridIndexD< D > , ExtendedGridIndexD< D > > > | ExtendedIndexIterator |
typedef boost::iterator_range < typename Storage::IndexIterator > | Indexes |
typedef boost::iterator_range < typename Storage::AllIndexIterator > | AllIndexes |
typedef boost::iterator_range < ExtendedIndexIterator > | ExtendedIndexes |
VoxelIterator | voxels_begin (const BoundingBoxD< D > &bb) |
VoxelIterator | voxels_end (const BoundingBoxD< D > &bb) |
VoxelConstIterator | voxels_begin (const BoundingBoxD< D > &bb) const |
VoxelConstIterator | voxels_end (const BoundingBoxD< D > &bb) const |
Storage::IndexIterator | indexes_begin (const BoundingBoxD< D > &bb) const |
Storage::IndexIterator | indexes_end (const BoundingBoxD< D > &) const |
ExtendedIndexIterator | extended_indexes_begin (const BoundingBoxD< D > &bb) const |
ExtendedIndexIterator | extended_indexes_end (const BoundingBoxD< D > &) const |
Indexes | get_indexes (const BoundingBoxD< D > &bb) const |
AllIndexes | get_all_indexes () const |
ExtendedIndexes | get_extended_indexes (const BoundingBoxD< D > &bb) const |
IMP::algebra::GridD< D, StorageT, Value, EmbeddingT >::GridD | ( | const Ints | counts, |
const BoundingBoxD< D > & | bb, | ||
Value | default_value = Value() |
||
) |
IMP::algebra::GridD< D, StorageT, Value, EmbeddingT >::GridD | ( | double | side, |
const BoundingBoxD< D > & | bb, | ||
const Value & | default_value = Value() |
||
) |
IMP::algebra::GridD< D, StorageT, Value, EmbeddingT >::GridD | ( | const VectorD< D > & | sides, |
const BoundingBoxD< D > & | bb, | ||
const Value & | default_value = Value() |
||
) |
IMP::algebra::GridD< D, StorageT, Value, EmbeddingT >::GridD | ( | const Storage & | storage, |
const Embedding & | embed | ||
) |
IMP::algebra::GridD< D, StorageT, Value, EmbeddingT >::GridD | ( | ) |
ExtendedGridIndexD<D> IMP::algebra::GridD< D, StorageT, Value, EmbeddingT >::get_extended_index | ( | const GridIndexD< D > & | index | ) | const |
void IMP::algebra::GridD< D, StorageT, Value, EmbeddingT >::set_bounding_box | ( | const BoundingBoxD< D > & | bb3 | ) |