Xmipp  v3.23.11-Nereus
volume_apply_coefficient_zernike3d.h
Go to the documentation of this file.
1 /***************************************************************************
2  *
3  * Authors: David Herreros Calero dherreros@cnb.csic.es
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
18  * 02111-1307 USA
19  *
20  * All comments concerning this program package may be sent to the
21  * e-mail address 'xmipp@cnb.uam.es'
22  ***************************************************************************/
23 
24 #ifndef _PROG_FORWARD_APPLY_ZERNIKE3D
25 #define _PROG_FORWARD_APPLY_ZERNIKE3D
26 
27 #include <core/xmipp_program.h>
28 #include <core/xmipp_image.h>
29 #include <data/blobs.h>
30 
31 
33 {
34 private:
36  FileName fn_vol;
37 
39  FileName fn_sph;
40 
42  FileName fn_mask;
43 
45  FileName fn_out;
46 
48  std::vector<double> clnm;
49 
51  std::vector<double> basisParams;
52 
54  Matrix1D<int> vL1;
55  Matrix1D<int> vN;
56  Matrix1D<int> vL2;
57  Matrix1D<int> vM;
58 
59  // Loop step
60  int loop_step;
61 
62  // Blob
63  struct blobtype blob;
64  double blob_r;
65 
66 private:
68  void defineParams() override;
69 
71  void readParams() override;
72 
74  void show() const override;
75 
77  void run() override;
78 
80  std::string readNthLine(int N) const;
81 
83  std::vector<double> string2vector(std::string const &s) const;
84 
86  void fillVectorTerms();
87 
89  void splattingAtPos(std::array<double, 3> r, double weight, const MultidimArray<double> &mVO);
90 
91  double bspline1(double x);
92 
93 };
95 #endif
doublereal * x