Xmipp  v3.23.11-Nereus
project.h
Go to the documentation of this file.
1 /***************************************************************************
2  *
3  * Authors: Carlos Oscar S. Sorzano (coss@cnb.csic.es)
4  *
5  * Unidad de Bioinformatica of Centro Nacional de Biotecnologia , CSIC
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
20  * 02111-1307 USA
21  *
22  * All comments concerning this program package may be sent to the
23  * e-mail address 'xmipp@cnb.csic.es'
24  ***************************************************************************/
25 #ifndef _PROG_PROJECTION_HH
26 #define _PROG_PROJECTION_HH
27 
28 #include <core/xmipp_funcs.h>
29 #include <core/metadata_vec.h>
30 #include <data/projection.h>
31 #include <core/xmipp_program.h>
32 #include <data/pdb.h>
33 
34 #include <data/phantom.h>
35 #include "project_crystal.h"
36 #include <data/ctf.h>
37 
43 /* Projection Program Parameters ------------------------------------------- */
46 {
47 public:
61  int projSize;
63  double samplingRate;
65  double highTs;
71  double rotSingle;
73  double tiltSingle;
75  double psiSingle;
77  double xShift;
79  double yShift;
83  double paddFactor;
85  double maxFrequency;
88 
89 public:
91  void readParams();
92 
94  void defineParams();
95 
97  void run();
98 };
99 
100 /* Angular range ----------------------------------------------------------- */
125 {
127  double ang0;
129  double angF;
131  int samples;
132 
133 #define ANGLE_RANGE_DETERMINISTIC 0
134 #define ANGLE_RANGE_RANDOM_GROUPS 1
135 #define ANGLE_RANGE_RANDOM 2
136 #define ANGLE_EVENLY 3
137 
143  double Navg;
145  double Ndev;
146 };
147 
148 /* Projection parameters --------------------------------------------------- */
158 {
159 public:
164 
166  int tell;
167 
176 
177  //Do phase flip
179  //Apply shift
181  //Do CTF correction
183 
186 
188  double Npixel_avg;
190  double Npixel_dev;
191 
193  double Ncenter_avg;
195  double Ncenter_dev;
196 public:
197 
202  void from_prog_params(const ProgProject &prog_prm);
203 
207  void read(const FileName &fn_proj_param);
208 };
209 
216 {
217 public:
221  enum PhantomType {VOXEL, XMIPP, PDB};
233  double paddFactor;
235  double maxFrequency;
239  bool doCrystal;
240 
241 public:
247  void produce_Side_Info(ParametersProjection &prm,
248  ProgProject &prog_prm);
249 };
250 
251 /* Assigning angles -------------------------------------------------------- */
268 
269 /* Effectively project ----------------------------------------------------- */
279  bool singleProjection,
280  int projType,
281  const ParametersProjection &prm,
282  PROJECT_Side_Info &side,
283  const Crystal_Projection_Parameters &prm_crystal,
284  Projection &proj, MetaData &SF);
285 
286 /* Main routine ------------------------------------------------------------ */
301 #endif
double highTs
High sampling rate: Only used for PDB projections.
Definition: project.h:65
void defineParams()
Definition: project.cpp:91
bool enable_angle_range
Enable angle range mode (0 or 1)
Definition: project.h:169
int ROUT_project(ProgProject &prm, Projection &proj, MetaData &SF)
Definition: project.cpp:1174
projectionType projType
Type of projection algorithm.
Definition: project.h:81
virtual void read(int argc, const char **argv, bool reportErrors=true)
double paddFactor
The padding factor for Fourier projection.
Definition: project.h:83
int proj_Ydim
Projection Ydim.
Definition: project.h:163
double Ndev
Stddev of the noise that must be added to the definition of the angle.
Definition: project.h:145
Angle_range psi_range
Psi angle range.
Definition: project.h:175
bool singleProjection
Single projection.
Definition: project.h:69
Angle_range tilt_range
Tilting angle range.
Definition: project.h:173
int BSplineDeg
The type of interpolation (NEAR.
Definition: project.h:237
Phantom phantomDescr
Phantom mathematical description.
Definition: project.h:227
PDBPhantom phantomPDB
Phantom PDB.
Definition: project.h:229
int samples
No. of samples.
Definition: project.h:131
int PROJECT_Assign_angles(MetaData &DF, const ParametersProjection &prm)
PhantomType phantomMode
Projecting from a voxel volume, Xmipp description or PDB?
Definition: project.h:223
PhantomType
Types of phantom: voxel, Xmipp, PDB.
Definition: project.h:221
int proj_Xdim
Projection Xdim.
Definition: project.h:161
double maxFrequency
The maximum frequency for pixels.
Definition: project.h:235
Definition: situs.h:43
double Npixel_avg
Bias to be applied to each pixel grey value */.
Definition: project.h:188
projectionType
Type of projection.
Definition: project.h:42
double maxFrequency
The maximum frequency for Fourier projection.
Definition: project.h:85
FileName fn_crystal
Definition: project.h:57
AtomInterpolator interpolator
Atom interpolator.
Definition: project.h:231
double xShift
Definition: project.h:77
Definition: project.h:42
FileName fnOut
Output filename (used for a singleProjection or a stack)
Definition: project.h:54
double yShift
Definition: project.h:79
double tiltSingle
Tilt angle of a single projection.
Definition: project.h:73
int PROJECT_Effectively_project(const FileName &fnOut, bool singleProjection, int projType, const ParametersProjection &prm, PROJECT_Side_Info &side, const Crystal_Projection_Parameters &prm_crystal, Projection &proj, MetaData &SF)
double Ncenter_avg
Bias to apply to the image center.
Definition: project.h:193
void readParams()
Definition: project.cpp:35
FileName fn_proj_param
Filename with the Projection_Parameters.
Definition: project.h:49
Image< double > phantomVol
Phantom Xmipp volume.
Definition: project.h:225
FileName fn_angle
Document filename.
Definition: project.h:185
double rotSingle
Rotational angle of a single projection.
Definition: project.h:71
double paddFactor
The padding factor for Fourier projection.
Definition: project.h:233
double psiSingle
Psi angle of a single projection.
Definition: project.h:75
Angle_range rot_range
Rotational angle range.
Definition: project.h:171
FileName fn_sym
Symmetry file.
Definition: project.h:59
double angF
final angular value
Definition: project.h:129
double Ncenter_dev
Standard deviation of the image center.
Definition: project.h:195
bool only_create_angles
Only create angles, do not project.
Definition: project.h:67
int BSplineDeg
The type of interpolation (NEAR.
Definition: project.h:87
double ang0
initial angular value
Definition: project.h:127
int tell
Debugging level.
Definition: project.h:166
MetaDataVec DF
Document File for the projecting angles. Order: rot, tilt, psi.
Definition: project.h:219
int randomness
Definition: project.h:141
double Navg
Mean of the noise that must be added to the definition of the angle.
Definition: project.h:143
ProgClassifyCL2D * prm
double samplingRate
Sampling rate: Only used for PDB projections.
Definition: project.h:63
int projSize
Projection size when fnOut is given.
Definition: project.h:61
void run()
Definition: project.cpp:175
FileName fnPhantom
Definition: project.h:52
double Npixel_dev
Standard deviation of the noise to be added to each pixel grey value.
Definition: project.h:190
bool doCrystal
Is this a crystal projection.
Definition: project.h:239