Xmipp  v3.23.11-Nereus
base_art_recons.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Authors: Carlos Oscar S. Sorzano (coss@cnb.csic.es)
3  * Joaquin Oton (joton@cnb.csic.es)
4  *
5  *
6  * Unidad de Bioinformatica of Centro Nacional de Biotecnologia , CSIC
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
21  * 02111-1307 USA
22  *
23  * All comments concerning this program package may be sent to the
24  * e-mail address 'xmipp@cnb.csic.es'
25  ***************************************************************************/
26 
27 #ifndef BASE_ART_RECONS_H_
28 #define BASE_ART_RECONS_H_
29 
30 #include "basic_art.h"
31 
43 
44 /* ART Reconstruction ------------------------------------------ */
51 {
52 public:
54 
55  virtual ~ARTReconsBase()
56  {}
57 
58  static void defineParams(XmippProgram * program, bool mpiMode = false)
59  {
60  BasicARTParameters::defineParams(program, mpiMode);
61  }
62 
63  /* --- Virtual methods to be implemented by children --- */
64 
65  /* Read params from command line
66  */
67  virtual void readParams(XmippProgram * program);
68 
69  /* Show reconstruction information
70  */
71  virtual void print(std::ostream &o)const;
72 
74  virtual void preProcess(GridVolume &vol_basis0, int level = FULL, int rank = -1);
75 
89  virtual void singleStep(GridVolume &vol_in, GridVolume *vol_out,
90  Projection &theo_proj, Projection &read_proj,
91  int sym_no,
92  Projection &diff_proj, Projection &corr_proj, Projection &alig_proj,
93  double &mean_error, int numIMG, double lambda, int act_proj,
94  const FileName &fn_ctf, const MultidimArray<int> *maskPtr,
95  bool refine);
96 
100  virtual void postProcess(GridVolume &vol_basis);
101 
104  virtual void applySymmetry(GridVolume &vol_in, GridVolume *vol_out,int grid_type);
105 
106  /* --- Methods that do not have to be implemented by children --- */
107 
117  void initHistory(const GridVolume &vol_basis0);
118 
138  void iterations(GridVolume &vol_basis, int rank = -1);
139 
140  friend std::ostream & operator<< (std::ostream &o, const ARTReconsBase& artRecons);
141 
142 };
143 
144 
145 
147 {
148  pthread_t *th_ids;
149 
150 public:
152  {}
153 
155  {}
156 
157  void preProcess(GridVolume &vol_basis0, int level = FULL, int rank = -1);
158 
159  virtual void singleStep(GridVolume &vol_in, GridVolume *vol_out,
160  Projection &theo_proj, Projection &read_proj,
161  int sym_no,
162  Projection &diff_proj, Projection &corr_proj, Projection &alig_proj,
163  double &mean_error, int numIMG, double lambda, int act_proj,
164  const FileName &fn_ctf, const MultidimArray<int> *maskPtr,
165  bool refine);
166 
167  void postProcess(GridVolume &vol_basis);
168 }
169 ;
170 
171 
172 
173 
175 #endif /* BASE_ART_RECONS_H_ */
static void defineParams(XmippProgram *program, bool mpiMode=false)
Definition: basic_art.cpp:115
void initHistory(const GridVolume &vol_basis0)
#define FULL
Definition: basic_art.h:406
virtual void print(std::ostream &o) const
virtual void applySymmetry(GridVolume &vol_in, GridVolume *vol_out, int grid_type)
virtual ~ARTReconsBase()
virtual void readParams(XmippProgram *program)
static void defineParams(XmippProgram *program, bool mpiMode=false)
double * lambda
virtual void postProcess(GridVolume &vol_basis)
virtual void preProcess(GridVolume &vol_basis0, int level=FULL, int rank=-1)
Produce Plain side information from the Class parameters.
friend std::ostream & operator<<(std::ostream &o, const ARTReconsBase &artRecons)
virtual void singleStep(GridVolume &vol_in, GridVolume *vol_out, Projection &theo_proj, Projection &read_proj, int sym_no, Projection &diff_proj, Projection &corr_proj, Projection &alig_proj, double &mean_error, int numIMG, double lambda, int act_proj, const FileName &fn_ctf, const MultidimArray< int > *maskPtr, bool refine)
virtual ~SinPartARTRecons()
void iterations(GridVolume &vol_basis, int rank=-1)
BasicARTParameters artPrm