9#ifndef IMPEM_SAMPLED_DENSITY_MAP_H
10#define IMPEM_SAMPLED_DENSITY_MAP_H
12#include <IMP/em/em_config.h>
38 : DensityMap(
"SampledDensityMap%1%"), kt_(kt) {}
58 int sig_cutoff = 3, KernelType kt = GAUSSIAN);
81 void project(
const ParticlesTemp &ps,
int x_margin,
int y_margin,
90#if !defined(DOXYGEN) && !defined(SWIG)
94 inline const core::XYZRs &get_xyzr_particles()
const {
return xyzr_; }
96 inline const Particles &get_sampled_particles()
const {
return ps_; }
97 inline FloatKey get_weight_key()
const {
return weight_key_; }
121 double resolution,
double voxel_size,
int sig_offset);
124 void set_neighbor_mask(
float radius);
Class for handling density maps.
Calculates and stores Gaussian kernel parameters.
A decorator for particles with mass.
Decorator for a sphere-like particle.
An axis-aligned bounding box.
static FloatKey get_mass_key()
Calculates and stores Gaussian kernel parameters.
Class for sampling a density map from particles.
SampledDensityMap(KernelType kt=GAUSSIAN)
Creates a new density map for sampled map.
float get_minimum_resampled_value()
Get minimum density value between voxels that correspond to particles.
virtual void resample()
Resample beads on an EM grid.
void project(const ParticlesTemp &ps, int x_margin, int y_margin, int z_margin, algebra::Vector3D shift=algebra::Vector3D(0., 0., 0.), FloatKey mass_key=atom::Mass::get_mass_key())
Project particles on the grid by their mass value.
void update_resolution(Float res)
Update the simulation resolution.
IMP::algebra::BoundingBoxD< 3 > calculate_particles_bounding_box(const Particles &ps)
Calculate the parameters of the particles bounding box.
void determine_grid_size(double resolution, double voxel_size, int sig_cutoff)
SampledDensityMap(const DensityHeader &header, KernelType kt=GAUSSIAN)
The size of the map is determined by the header and the data is allocated.
SampledDensityMap(const ParticlesTemp &ps, double resolution, double voxel_size, IMP::FloatKey mass_key=IMP::atom::Mass::get_mass_key(), int sig_cutoff=3, KernelType kt=GAUSSIAN)
Generate a sampled density map from the particles.
KernelParameters kernel_params_
kernel handling
void set_particles(const ParticlesTemp &ps, IMP::FloatKey mass_key=IMP::atom::Mass::get_mass_key())
setting particles in case they were not set by the constructor
An approximation of the exponential function.
IMP::Vector< IMP::Pointer< SampledDensityMap > > SampledDensityMaps
Vector< Pointer< Particle > > Particles
A list of reference-counted Particle objects.
double Float
Basic floating-point value (could be float, double...).
Key< 0 > FloatKey
The type used to identify float attributes in the Particles.
#define IMP_OBJECTS(Name, PluralName)
Define the types for storing lists of object pointers.
#define IMP_REF_COUNTED_DESTRUCTOR(Name)
Set up destructor for a ref counted object.