IMP
2.0.0
The Integrative Modeling Platform
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
CoarseConvolution.h
Go to the documentation of this file.
1
/**
2
* \file IMP/em/CoarseConvolution.h
3
* \brief Convolutes two grids
4
*
5
* Copyright 2007-2013 IMP Inventors. All rights reserved.
6
*
7
*/
8
9
#ifndef IMPEM_COARSE_CONVOLUTION_H
10
#define IMPEM_COARSE_CONVOLUTION_H
11
12
#include <IMP/em/em_config.h>
13
#include "
exp.h
"
14
#include "
DensityMap.h
"
15
#include "
SampledDensityMap.h
"
16
#include "
def.h
"
17
#include <vector>
18
19
IMPEM_BEGIN_NAMESPACE
20
21
//! Convolutes two grids
22
/** The pixels involved are derived from the positions of N particles.
23
*/
24
class
IMPEMEXPORT
CoarseConvolution
25
{
26
27
public
:
28
#if 0
29
//! Evaluates the convolution between two density grids
30
/**
31
f*g(n)=f(m)g(n-m); m runs between -inf to inf
32
\param[in] f A densityMap. note:
33
correct RMSD and mean MUST be in the header!
34
\param[in] g a sampled density map of particles
35
\param[in] g_ps particles data (location, radii, weight)
36
\param[in] dvx vector to contain the xpartial derivatives for g_access_p
37
\param[in] dvy vector to contain the y partial derivatives for g_access_p
38
\param[in] dvz vector to contain the z partial derivatives for g_access_p
39
\param[in] scalefactor scale factor to apply to the value of the cross
40
correlation term
41
\param[in] lderiv if true, the derivatives of the term are computed
42
\return the value of the cross correlation term: scalefac*(1-ccc)
43
*/
44
/*
45
static float evaluate(DensityMap &f, SampledDensityMap &g,
46
const Particles &g_ps,
47
std::vector<float> &dvx, std::vector<float>&dvy,
48
std::vector<float>&dvz, float scalefac, bool lderiv);
49
*/
50
/*
51
static void calc_derivatives(const DensityMap &comp1,
52
SampledDensityMap &comp2,
53
const Particles &ps_comp2,
54
const float &scalefac,
55
std::vector<float> &dvx, std::vector<float>&dvy,
56
std::vector<float>&dvz);
57
*/
58
#endif
59
60
/** Cross correlation coefficient between the em density and the density of a
61
model. moddens threshold can be specified that is checked in moddens to
62
reduce elements of summation
63
\note This is not the local CC function
64
\param[in] em_map the target map (experimentally determined)
65
\param[in] model_map the sampled density map of the model
66
\param[in] voxel_data_threshold voxels with value lower than threshold
67
in model_map are not summed (avoid calculating correlation on
68
voxels below the threshold)
69
\param[in] recalc_ccnormfac Ignored. The purpose is to determines wheather
70
the model_map should be
71
normalized prior to the correlation calculation. false is
72
faster, but potentially innacurate
73
\return the convolution value between two density maps
74
75
\note recalc_ccnormfac is ignored.
76
*/
77
static
float
convolution(
const
DensityMap
*em_map,
DensityMap
*model_map,
78
float
voxel_data_threshold,
79
bool
recalc_ccnormfac =
true
);
80
};
81
82
IMPEM_END_NAMESPACE
83
84
#endif
/* IMPEM_COARSE_CONVOLUTION_H */