$search
Public Member Functions | |
def | __contains__ |
def | __init__ |
def | __len__ |
def | add |
def | get |
def | on_exit |
Private Member Functions | |
def | _remove_array |
Private Attributes | |
_cache |
Caches references to numpy arrays that are not copied but views of which are converted to VTK arrays. The caching prevents the user from deleting or resizing the numpy array after it has been sent down to VTK.
Definition at line 52 of file array_handler.py.
def nodes::utils::array_handler::ArrayCache::__contains__ | ( | self, | ||
vtk_arr | ||||
) |
Definition at line 69 of file array_handler.py.
def nodes::utils::array_handler::ArrayCache::__init__ | ( | self | ) |
Definition at line 62 of file array_handler.py.
def nodes::utils::array_handler::ArrayCache::__len__ | ( | self | ) |
Definition at line 66 of file array_handler.py.
def nodes::utils::array_handler::ArrayCache::_remove_array | ( | self, | ||
key | ||||
) | [private] |
Private function that removes the cached array. Do not call this unless you know what you are doing.
Definition at line 120 of file array_handler.py.
def nodes::utils::array_handler::ArrayCache::add | ( | self, | ||
vtk_arr, | ||||
np_arr | ||||
) |
Add numpy array corresponding to the vtk array to the cache.
Definition at line 76 of file array_handler.py.
def nodes::utils::array_handler::ArrayCache::get | ( | self, | ||
vtk_arr | ||||
) |
Return the cached numpy array given a VTK array.
Definition at line 98 of file array_handler.py.
def nodes::utils::array_handler::ArrayCache::on_exit | ( | self | ) |
Should be registered with atexit.register so the observers are removed before the VTK arrays destruct. If not done, this causes segfaults. Note that this is not done by default so the user must explicitly register this function with atexit.
Definition at line 103 of file array_handler.py.
Definition at line 64 of file array_handler.py.