Public Member Functions | |
void | resample () |
Resample the grid to consist of density shells of a model. | |
SurfaceShellDensityMap (const Particles &ps, float resolution, float voxel_size, IMP::FloatKey radius_key=IMP::core::XYZR::get_default_radius_key(), IMP::FloatKey mass_key=IMP::atom::Mass::get_mass_key(), int num_shells=5) | |
Generatea a surface shell density map from the input particles. | |
SurfaceShellDensityMap (const DensityHeader &header) | |
SurfaceShellDensityMap () | |
Creates a new density map. | |
Protected Member Functions | |
void | binaries (float scene_val) |
Set the value of the map voxels as either scene or background. | |
bool | has_background_neighbor (long voxel_ind) |
Checks if the one of the nieghbors of the voxel is a background voxel. | |
void | set_neighbor_mask () |
void | set_surface_shell (std::vector< long > *shell) |
Protected Attributes | |
std::vector< emreal > | neighbor_dist_ |
std::vector< long > | neighbor_shift_ |
int | num_shells_ |
float | surface_val_ |
IMP::em::SurfaceShellDensityMap::SurfaceShellDensityMap | ( | ) |
Creates a new density map.
The header of the map is not determined and no data is being allocated
IMP::em::SurfaceShellDensityMap::SurfaceShellDensityMap | ( | const DensityHeader & | header | ) |
Creates a new density map. The size of the map is determined by the header and the data is allocated.
IMP::em::SurfaceShellDensityMap::SurfaceShellDensityMap | ( | const Particles & | ps, | |
float | resolution, | |||
float | voxel_size, | |||
IMP::FloatKey | radius_key = IMP::core::XYZR::get_default_radius_key() , |
|||
IMP::FloatKey | mass_key = IMP::atom::Mass::get_mass_key() , |
|||
int | num_shells = 5 | |||
) |
Generatea a surface shell density map from the input particles.
/param[in] ps particles with XYZ, radius and weight attributes /param[in] voxel_size the voxel size. /note the voxel size and the number of shells determines the resolution/accuracy of the surface rasterization. /param[in] sig_cutoff Choose what should be the sigma cutoff for accurate sampling. It is used in two functions; (i) to determine the size of the grid dimensions (ii) to determine the voxels around the coords participating in the sampling procedure.
void IMP::em::SurfaceShellDensityMap::binaries | ( | float | scene_val | ) | [protected] |
Set the value of the map voxels as either scene or background.
/param[in] scene_val all voxels corredponsing to particles will be set to this value
bool IMP::em::SurfaceShellDensityMap::has_background_neighbor | ( | long | voxel_ind | ) | [protected] |
Checks if the one of the nieghbors of the voxel is a background voxel.
/param[in] voxel_ind the index of the voxel /return true is the at least of the nieghbors of the voxel is in the background
void IMP::em::SurfaceShellDensityMap::resample | ( | ) | [virtual] |
Resample the grid to consist of density shells of a model.
All voxels that are outside of the model defined by the particles will be set to zero. Voxels on the surface between the model and the background will be set of 1. The interior voxels will be assign value according to their corresponding shell ( the value increases as the voxel is farthrer away from the surface).
Reimplemented from IMP::em::SampledDensityMap.
void IMP::em::SurfaceShellDensityMap::set_surface_shell | ( | std::vector< long > * | shell | ) | [protected] |
Finds all of the voxels that are part of the surface (i.e, seperate background from scene) /param[in] shell indexes of all of the surface particles will be stored here.