Xmipp  v3.23.11-Nereus
reconstruct_wbp.h
Go to the documentation of this file.
1 /***************************************************************************
2  *
3  * Authors: Roberto Marabini roberto@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 
26 #include <memory>
27 #include "core/symmetries.h"
28 #include "core/xmipp_image.h"
29 #include "core/metadata_vec.h"
30 #include "reconstruction/recons.h"
31 
32 class Projection;
33 
37 typedef struct
38 {
39  double x; // Projection direction (x,y,z)
40  double y;
41  double z;
42  double count;
43 }
44 WBPInfo;
45 
48 {
49 public:
55  double threshold;
57  int count_thr;
59  int diameter;
61  //int verb;
63  size_t dim;
65  int no_mats;
69  double sampling;
74  bool do_weights;
80  std::unique_ptr<MetaDataVec::id_iterator> iter;
83 public:
84 
86  void readParams();
87 
89  void show();
90 
92  void defineParams();
93 
95  void run();
96 
98  virtual void showProgress();
99 
101  virtual void finishProcessing();
102 
104  void setIO(const FileName &fn_in, const FileName &fn_out);
105 
107  virtual void produceSideInfo() ;
108 
110  virtual bool getImageToProcess(size_t &objId);
111 
113  void getAnglesForImage(size_t id, double &rot, double &tilt, double &psi,
114  double &xoff, double &yoff, bool &flip, double &weight);
115 
117  void getAllMatrices(MetaData &SF) ;
118 
121  void getSampledMatrices(MetaData &SF) ;
122 
123  // Simple (i.e. unfiltered) backprojection of a single image
125  int diameter) ;
126 
127  // Calculate the filter and apply it to a projection
128  void filterOneImage(Projection &proj, Tabsinc &TSINC);
129 
130  // Calculate the filter for arbitrary tilt geometry in 2D and apply
132 };
void filterOneImage(Projection &proj, Tabsinc &TSINC)
Image< double > reconstructedVolume
Reconstructed volume.
virtual void produceSideInfo()
Fill arrays with relevant transformation matrices.
virtual void showProgress()
double threshold
size_t time_bar_size
double count
void simpleBackprojection(Projection &img, MultidimArray< double > &vol, int diameter)
void show()
Show.
FileName fn_sel
void getSampledMatrices(MetaData &SF)
size_t time_bar_step
Time bar variables.
FileName fn_sym
void getAnglesForImage(size_t id, double &rot, double &tilt, double &psi, double &xoff, double &yoff, bool &flip, double &weight)
Get angles (either from reading the header or from a docfile)
double z
void readParams()
Read arguments from command line.
void defineParams()
Define parameters.
std::unique_ptr< MetaDataVec::id_iterator > iter
Iterator over input metadata.
void apply2DFilterArbitraryGeometry()
void getAllMatrices(MetaData &SF)
Fill array with transformation matrices needed for arbitrary geometry filter.
WBPInfo * mat_f
WBPInfo * mat_g
virtual bool getImageToProcess(size_t &objId)
Get 1 image to process.
void setIO(const FileName &fn_in, const FileName &fn_out)
FileName fn_out
size_t time_bar_done
MetaDataVec SF
double psi(const double x)
double sampling
virtual void finishProcessing()
double y
bool do_all_matrices
double x