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