Xmipp
v3.23.11-Nereus
|
#include <phantom.h>
Public Member Functions | |
void | prepare () |
void | assign (const DCylinder &F) |
int | point_inside (const Matrix1D< double > &r, Matrix1D< double > &aux) const |
double | density_inside (const Matrix1D< double > &r, Matrix1D< double > &aux) const |
Feature * | scale (double factor) const |
__attribute__ ((deprecated)) void scale(double factor | |
double | intersection (const Matrix1D< double > &direction, const Matrix1D< double > &passing_point, Matrix1D< double > &r, Matrix1D< double > &u) const |
double | volume () const |
void | read_specific (char *line) |
void | read_specific (const std::vector< double > &vect) |
void | feat_printf (FILE *fh) const |
void | feat_printm (MetaData &MD, size_t id) |
void | init_rnd (double minradius, double maxradius, double minheight, double maxheight, double minsep, double maxsep, double minden=1.0, double maxden=1.0, double minx0=0, double maxx0=0, double miny0=0, double maxy0=0, double minz0=0, double maxz0=0, double minrot=0, double maxrot=360, double mintilt=0, double maxtilt=180, double minpsi=0, double maxpsi=360) |
Public Member Functions inherited from Oriented_Feature | |
void | prepare_Euler () |
void | assign (const Oriented_Feature &OF) |
virtual void | rotate (const Matrix2D< double > &E) |
Public Member Functions inherited from Feature | |
void | assign (const Feature &F) |
virtual void | rotate_center (const Matrix2D< double > &E) |
int | point_inside (const Matrix1D< double > &r) const |
int | voxel_inside (const Matrix1D< double > &r, Matrix1D< double > &aux1, Matrix1D< double > &aux2) const |
int | voxel_inside (const Matrix1D< double > &r) const |
double | voxel_inside_by_normalized_density (const Matrix1D< double > &r, Matrix1D< double > &aux1, Matrix1D< double > &aux2) const |
int | intersects_sphere (const Matrix1D< double > &r, double radius, Matrix1D< double > &aux1, Matrix1D< double > &aux2, Matrix1D< double > &aux3) const |
int | intersects_sphere (const Matrix1D< double > &r, double radius) const |
Feature * | encircle (double radius=0) const |
Feature * | background (int back_mode, double back_param) const |
double | intersection (const Matrix1D< double > &direction, const Matrix1D< double > &passing_point) const |
void | mean_variance_in_plane (Image< double > *V, double z, double &mean, double &var) |
void | project_to (Projection &P, const Matrix2D< double > &VP, const Matrix2D< double > &PV) const |
void | corners (const MultidimArray< double > &V, Matrix1D< double > &corner1, Matrix1D< double > &corner2) |
void | draw_in (MultidimArray< double > &V, int color_mode=INTERNAL, double colour=-1) |
void | sketch_in (MultidimArray< double > &V, double colour=2) |
void | shift (double shiftX, double shiftY, double shiftZ) |
void | selfApplyGeometry (const Matrix2D< double > &A) |
void | readCommon (char *line) |
void | readCommon (MDRow &row) |
void | read (MDRow &row) |
Public Attributes | |
double | radius |
Cylinder radius. More... | |
double | height |
Each cylinder height. More... | |
double | separation |
Separation between cylinders. More... | |
Feature **_f | const |
Public Attributes inherited from Oriented_Feature | |
double | rot |
First Euler angle. More... | |
double | tilt |
Second Euler angle. More... | |
double | psi |
Third Euler angle. More... | |
Matrix2D< double > | euler |
Euler matrix. More... | |
Matrix2D< double > | eulert |
Inverse Euler matrix. More... | |
Public Attributes inherited from Feature | |
std::string | type |
char | add_assign |
double | density |
Matrix1D< double > | center |
double | max_distance |
Friends | |
std::ostream & | operator<< (std::ostream &o, const DCylinder &f) |
Double cylinders. A double cylinder is defined by its center, a radius, a height and a set of Euler angles, label="dcy". The double cylinder are two cylinders whose centers are (before rotating) "+separation/2+height/2" and "-separation/2-height/2" respectively. Ie, two cylinders along Z axis of height "height" and separated "separation" units. These two cylinders are placed with its base parallel to XY plane (the base is of radius "radius"), and the cylinder is defined between "-height/2" to "+height/2" starting from their own centers. Then the cylinders, as a block, are rotated after the three Euler angles.
A point (r) in the universal coordinate system, where cylinders are defined in general, can be expressed (rp) with respect to a system where the FIRST cylinder is centered at the origin, its radius is unity and its base is parallel to the XY plane (notice that the height is not transformed) by
and for the SECOND dcyinder
Directions (free vectors) are transformed in the same fashion except that for the first two vector subtraction (referring the origin).
DCylinder::__attribute__ | ( | (deprecated) | ) |
Another function for return a scaled double cylinder.
Another function for assignment.
Definition at line 128 of file phantom.cpp.
|
virtual |
Print double cylinder in the standard feature format. \ See {Feature::feat_printf}, Phantoms
Implements Feature.
Definition at line 478 of file phantom.cpp.
|
virtual |
Implements Feature.
Definition at line 488 of file phantom.cpp.
void DCylinder::init_rnd | ( | double | minradius, |
double | maxradius, | ||
double | minheight, | ||
double | maxheight, | ||
double | minsep, | ||
double | maxsep, | ||
double | minden = 1.0 , |
||
double | maxden = 1.0 , |
||
double | minx0 = 0 , |
||
double | maxx0 = 0 , |
||
double | miny0 = 0 , |
||
double | maxy0 = 0 , |
||
double | minz0 = 0 , |
||
double | maxz0 = 0 , |
||
double | minrot = 0 , |
||
double | maxrot = 360 , |
||
double | mintilt = 0 , |
||
double | maxtilt = 180 , |
||
double | minpsi = 0 , |
||
double | maxpsi = 360 |
||
) |
Generate a random double cylinder. A double cylinder is generated randomly within the range of the parameters given. Notice that most of them are set by default. The exact parameters are picked uniformly from the range. The maximum distance is adjusted properly according to the randomly generated feature. 'den' stands for density and (x0,y0,z0) is the center of the feature. The behaviour of the new sphere is always Add. 'Sep' is the range for the separation
Definition at line 1779 of file phantom.cpp.
|
virtual |
Intersection of a ray with a double cylinder. See Feature::intersection to know more about the parameters meaning. The ray intersection consider both cylinders, of course.
Implements Feature.
Definition at line 1182 of file phantom.cpp.
|
virtual |
Speeded up point inside a double cylinder. This function tells you if a point is inside any of the cylinders or not. See Feature::point_inside
Implements Feature.
Definition at line 757 of file phantom.cpp.
|
virtual |
void DCylinder::read_specific | ( | char * | line | ) |
Read specific description for a double cylinder. An exception is thrown if the line doesn't conform the standard specification. See Feature::read_specific
Definition at line 308 of file phantom.cpp.
|
virtual |
Read a feature from a file, VIRTUAL!!!. The format must be the one given in Phantoms, and each subclass must implement its own I/O routines. These routines must fill only the non common part of the feature description, but they receive the whole line with the description.
Implements Feature.
Definition at line 319 of file phantom.cpp.
|
virtual |
Return a scaled double cylinder. The center, density, angles and behaviour of the new double cylinder is exactly the same as the actual one. The radius and height are multiplied by the scale factor and the maximum distance is recalculated for the new double cylinder.
Implements Feature.
Definition at line 1558 of file phantom.cpp.
|
inlinevirtual |
Volume of a double cylinder. This function returns 2* 4/3*PI*radius*radius*height. See Feature::volume
Implements Feature.
Definition at line 946 of file phantom.h.
Show feature not in the standard format but more informatively. This function only shows the non common part of the feature. Use the << operator of Feature to show the whole feature.
Definition at line 634 of file phantom.cpp.
double DCylinder::separation |