IMP
2.4.0
The Integrative Modeling Platform
|
Class for getting the distance from the map envelope. More...
#include <IMP/em/MapDistanceTransform.h>
Class for getting the distance from the map envelope.
The class creates and stores a conversion of density map into a distance transform. The envelope voxels (that are determined using density_threshold) are zero distance. The rest of the voxels hold the distance to the closest envelop voxel. Positive distance means inside the object, negative - outside.
Definition at line 25 of file MapDistanceTransform.h.
Public Member Functions | |
MapDistanceTransform (IMP::em::DensityMap *map, float density_threshold, float max_distance) | |
float | get_distance_from_envelope (const IMP::algebra::Vector3D &v) const |
Public Member Functions inherited from IMP::em::DensityMap | |
DensityMap (std::string name="DensityMap%1%") | |
DensityMap (const DensityHeader &header, std::string name="DensityMap%1%") | |
Construct a density map as instructed in the input header. More... | |
void | add (const DensityMap *other) |
void | calc_all_voxel2loc () |
Calculates the coordinates that correspond to all voxels. More... | |
emreal | calcRMS () |
Calculates RMSD and mean of a map values as stored in the header. More... | |
void | copy_map (const DensityMap *other) |
copy map into this map More... | |
algebra::Vector3D | get_centroid (emreal threshold=0.0) const |
DensityMap * | get_cropped (float threshold) |
Create a new cropped map. More... | |
DensityMap * | get_cropped (const algebra::BoundingBox3D &bb) |
Create a new cropped map with the bounding box extent. More... | |
int | get_dim_index_by_location (const algebra::Vector3D &v, int ind) const |
Calculate dimension index of a given location. More... | |
int | get_dim_index_by_location (float loc_val, int ind) const |
const DensityHeader * | get_header () const |
DensityHeader * | get_header_writable () |
Returns a pointer to the header of the map in a writable version. More... | |
algebra::Vector3D | get_location_by_voxel (long index) const |
Calculate the location of a given voxel. More... | |
float | get_location_in_dim_by_voxel (long index, int dim) const |
Calculate the location of a given voxel in a given dimension. More... | |
std::string | get_locations_string (float t) |
emreal | get_max_value () const |
Returns the value of the voxel with the highest density. More... | |
float | get_maximum_value_in_xy_plane (int z_ind) |
Get the maximum value in a XY plane indicated by a Z index. More... | |
float | get_maximum_value_in_xz_plane (int y_ind) |
Get the maximum value in a XZ plane indicated by a Y index. More... | |
float | get_maximum_value_in_yz_plane (int x_ind) |
Get the maximum value in a YZ plane indicated by a X index. More... | |
emreal | get_min_value () const |
Returns the value of the voxel with the lowest density. More... | |
long | get_number_of_voxels () const |
number of map voxels More... | |
algebra::Vector3D | get_origin () const |
bool | get_rms_calculated () const |
Float | get_spacing () const |
Updated the voxel size of the map. More... | |
algebra::Vector3D | get_top () const |
virtual std::string | get_type_name () const |
emreal | get_value (float x, float y, float z) const |
Gets the value of the voxel located at (x,y,z) More... | |
emreal | get_value (const algebra::Vector3D &point) const |
emreal | get_value (long index) const |
Gets the value of the voxel at a given index. More... | |
virtual ::IMP::base::VersionInfo | get_version_info () const |
Get information about the module and version of the object. More... | |
long | get_voxel_by_location (float x, float y, float z) const |
Calculate the voxel of a given location. More... | |
long | get_voxel_by_location (const algebra::Vector3D &v) const |
Calculate the voxel of a given location. More... | |
bool | is_normalized () const |
bool | is_part_of_volume (float x, float y, float z) const |
Checks whether a given point is in the grid the voxel of a given location. More... | |
bool | is_part_of_volume (const algebra::Vector3D &v) const |
Checks whether a given point is in the grid the voxel of a given location. More... | |
bool | is_xyz_ind_part_of_volume (int ix, int iy, int iz) const |
int | lower_voxel_shift (emreal loc, emreal kdist, emreal orig, int ndim) const |
void | multiply (float factor) |
void | pad (int nx, int ny, int nz, float val=0.0) |
DensityMap * | pad_margin (int mrg_x, int mrg_y, int mrg_z, float val=0.0) |
Create a new padded map. More... | |
void | pick_max (const DensityMap *other) |
void | reset_data (float value=0.0) |
Set the density voxels to some value and reset the management flags. More... | |
bool | same_dimensions (const DensityMap *other) const |
Checks if two maps have the same dimensions. More... | |
bool | same_origin (const DensityMap *other) const |
Checks if two maps have the same origin. More... | |
bool | same_voxel_size (const DensityMap *other) const |
Checks if two maps have the same voxel size. More... | |
void | set_origin (float x, float y, float z) |
Sets the origin of the header. More... | |
void | set_origin (const IMP::algebra::Vector3D &v) |
void | set_value (long index, emreal value) |
Set the value of the voxel at a given index. More... | |
void | set_value (float x, float y, float z, emreal value) |
Set the value of the voxel at a given index. More... | |
void | set_void_map (int nx, int ny, int nz) |
Set the map dimension and reset all voxels to 0. More... | |
void | std_normalize () |
Normalize the density voxels according to standard deviation (stdv). More... | |
void | update_voxel_size (float new_apix) |
Updated the voxel size of the map. More... | |
int | upper_voxel_shift (emreal loc, emreal kdist, emreal orig, int ndim) const |
long | xyz_ind2voxel (int x, int y, int z) const |
Calculate the voxel of a given xyz indexes. More... | |
Public Member Functions inherited from IMP::base::Object | |
virtual void | clear_caches () |
CheckLevel | get_check_level () const |
LogLevel | get_log_level () const |
void | set_check_level (CheckLevel l) |
void | set_log_level (LogLevel l) |
Set the logging level used in this object. More... | |
void | set_was_used (bool tf) const |
void | show (std::ostream &out=std::cout) const |
const std::string & | get_name () const |
void | set_name (std::string name) |
Protected Attributes | |
float | max_distance_ |
std::vector< long > | neighbors_ |
Protected Attributes inherited from IMP::em::DensityMap | |
boost::scoped_array< emreal > | data_ |
bool | data_allocated_ |
DensityHeader | header_ |
bool | loc_calculated_ |
true if the locations have already been computed More... | |
bool | normalized_ |
bool | rms_calculated_ |
boost::scoped_array< float > | x_loc_ |
boost::scoped_array< float > | y_loc_ |
boost::scoped_array< float > | z_loc_ |
Additional Inherited Members | |
Protected Member Functions inherited from IMP::em::DensityMap | |
void | allocated_data () |
void | float2real (float *f_data, boost::scoped_array< emreal > &r_data) |
void | real2float (emreal *r_data, boost::scoped_array< float > &f_data) |
void | reset_all_voxel2loc () |
void | update_header () |
update the header values – still in work More... | |
Protected Member Functions inherited from IMP::base::Object | |
Object (std::string name) | |
Construct an object with the given name. More... | |
virtual void | do_destroy () |
IMP::em::MapDistanceTransform::MapDistanceTransform | ( | IMP::em::DensityMap * | map, |
float | density_threshold, | ||
float | max_distance | ||
) |
init the distance transform
[in] | map | input density map |
[in] | density_threshold | a threshold that determines the envelope of the map |
[in] | max_distance | how far from the envelope to compute the transform |
float IMP::em::MapDistanceTransform::get_distance_from_envelope | ( | const IMP::algebra::Vector3D & | v | ) | const |
get the distance from object envelope (-max_float is returned if the point is outside the grid)
Definition at line 40 of file MapDistanceTransform.h.