IMP  2.0.0
The Integrative Modeling Platform
density_analysis.h
Go to the documentation of this file.
1 /**
2  * \file IMP/multifit/density_analysis.h
3  * \brief density analysis tools, such as histogram and segmentation
4  *
5  * Copyright 2007-2013 IMP Inventors. All rights reserved.
6  *
7  */
8 
9 #ifndef IMPMULTIFIT_DENSITY_ANALYSIS_H
10 #define IMPMULTIFIT_DENSITY_ANALYSIS_H
11 
13 #include <IMP/em/DensityMap.h>
14 #include <IMP/multifit/multifit_config.h>
15 #include <boost/graph/adjacency_list.hpp>
16 #include <boost/pending/disjoint_sets.hpp>
17 #include <boost/graph/incremental_components.hpp>
18 #include <boost/graph/graph_utility.hpp>
19 
20 IMPMULTIFIT_BEGIN_NAMESPACE
21 
22 //! Get a histogram of density values
23 IMPMULTIFITEXPORT statistics::Histogram get_density_histogram(
24  const em::DensityMap *dmap, float threshold,int num_bins);
25 
26 //! Returns a map containing all density without the background
27 /**
28 \param[in] dmap the density map to segment
29 \param[in] threshold consider only voxels above this threshold
30 \param[in] edge_threshold consider only voxels above this threshold
31 \return the segmented map
32  */
33 IMPMULTIFITEXPORT em::DensityMap* remove_background(em::DensityMap *dmap,
34  float threshold,float edge_threshold);
35 
36 
37 //! Return connected components based on density values
38 /**
39  \param[in] dmap the density map to analyze
40  \param[in] threshold consider only voxels above this threshold
41  \param[in] edge_threshold an edge is added between
42  two neighboring voxels if their density difference is below this threshold
43  \return List of indexes for each connected component
44 */
45 IMPMULTIFITEXPORT
47  em::DensityMap *dmap,
48  float threshold,float edge_threshold);
49 
50 IMPMULTIFIT_END_NAMESPACE
51 #endif /* IMPMULTIFIT_DENSITY_ANALYSIS_H */