IMP
2.1.0
The Integrative Modeling Platform
IMP Mainpage
All IMP Modules
Related Pages
Modules
Namespaces
Classes
Files
Examples
Indexes
File List
File Members
CollisionCrossSection.h
Go to the documentation of this file.
1
/**
2
* \file em2d/CollisionCrossSection.h
3
* \brief
4
*
5
* Copyright 2007-2013 IMP Inventors. All rights reserved.
6
*
7
*/
8
9
#ifndef IMPEM2D_COLLISION_CROSS_SECTION_H
10
#define IMPEM2D_COLLISION_CROSS_SECTION_H
11
12
13
14
#include "
IMP/em2d/ProjectionMask.h
"
15
#include "
IMP/em2d/RegistrationResult.h
"
16
#include "
IMP/em2d/project.h
"
17
#include "
IMP/macros.h
"
18
#include "
IMP/Particle.h
"
19
20
IMPEM2D_BEGIN_NAMESPACE
21
22
//! Determine the collision cross section for some projections of particles
23
class
IMPEM2DEXPORT
CollisionCrossSection
:
public
IMP::base::Object
{
24
public
:
25
26
/*!
27
\param[in] n_projections Number of projections to use for obtaining the CCS
28
\param[in] resolution "Resolution" to use to generate the projections.
29
\param[in] pixel_size size in A/pix to use when generating the projections
30
\param[in] projection_image_size The size of the projections to generate;
31
for this value you should request a size so that
32
pixel_size * projection_image_size >= Max distance between two
33
particles.
34
*/
35
CollisionCrossSection
(
unsigned
int
n_projections,
36
double
resolution,
37
double
pixel_size,
38
double
projection_image_size
39
);
40
41
42
/**
43
* kernel::Particles used to calculate their collision cross section
44
* @param ps The particles
45
*/
46
void
set_model_particles(
const
kernel::ParticlesTemp
&ps);
47
48
/**
49
* Returns the collision cross section. Before using this function you need
50
* to set the particles with set_model_particles()
51
* @return The value of the collision cross section
52
*/
53
double
get_ccs()
const
;
54
55
/**
56
* Shows information about the class
57
* @param out Stream used to show the information
58
*/
59
void
show
(std::ostream &out)
const
{
60
out <<
"Collision Cross section."
<< std::endl;
61
}
62
IMP_OBJECT_METHODS
(
CollisionCrossSection
);
63
64
protected
:
65
66
/*! Gets the sum of the values in the pixels with value > 0
67
\param[in] m The projected area is computed for this matrix
68
\return Values of the area
69
*/
70
double
get_projected_area(
const
cv::Mat &m)
const
;
71
72
unsigned
int
n_projections_;
73
double
resolution_;
74
double
pixel_size_;
75
unsigned
int
img_size_;
76
bool
particles_set_;
77
em2d::RegistrationResults
regs_;
78
cv::Mat average_projection_;
79
em2d::MasksManagerPtr masks_manager_;
80
double
collision_cross_section_;
81
};
82
IMP_OBJECTS
(
CollisionCrossSection
,
CollisionCrossSections
);
83
84
IMPEM2D_END_NAMESPACE
85
86
#endif
/* IMPEM2D_COLLISION_CROSS_SECTION_H */
project.h
Generation of projections from models or density maps Copyright 2007-2013 IMP Inventors. All rights reserved.
ProjectionMask.h
projection masks Copyright 2007-2013 IMP Inventors. All rights reserved.
IMP::em2d::CollisionCrossSection::show
void show(std::ostream &out) const
Definition:
CollisionCrossSection.h:59
macros.h
Import IMP/kernel/macros.h in the namespace.
IMP::base::Vector< base::WeakPointer< Particle > >
IMP_OBJECT_METHODS
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition:
base/object_macros.h:25
IMP::base::Object
Common base class for heavy weight IMP objects.
Definition:
base/declare_Object.h:123
IMP_OBJECTS
#define IMP_OBJECTS(Name, PluralName)
Define the types for storing sets of objects.
Definition:
base/object_macros.h:77
Particle.h
Import IMP/kernel/Particle.h in the namespace.
IMP::em2d::CollisionCrossSection
Determine the collision cross section for some projections of particles.
Definition:
CollisionCrossSection.h:23
RegistrationResult.h
Registration results class Copyright 2007-2013 IMP Inventors. All rights reserved.