Xmipp  v3.23.11-Nereus
tomo_align_dual_tilt_series.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Authors: Carlos Oscar Sorzano (coss@cnb.csic.es)
3  *
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 #ifndef ANGULAR_ALIGN_DUAL_TILT_SERIES_H_
27 #define ANGULAR_ALIGN_DUAL_TILT_SERIES_H_
28 
29 #include "core/matrix2d.h"
30 #include "core/metadata_vec.h"
31 #include "core/multidim_array.h"
32 #include "core/xmipp_program.h"
33 
39 {
40 public:
43 
46 
49 
51  double scaleFactor;
52 public:
54  void readParams();
55 
57  void show();
58 
60  void defineParams();
61 
63  void readDual();
64 
66  void produceSideInfo();
67 
69  void findParametersAt0degrees(bool rotateDual);
70 
73  int refi, int dualj, const Matrix2D<double> &E,
74  double X, double Y, double Z);
75 
77  double evaluateAlignment(const Matrix1D<double> &_alignment);
78 
80  double optimizeAlignment();
81 
83  void alignDual();
84 
86  void run();
87 
89  void shiftProjectionInZ(MultidimArray<double> &I, int dualj, double Z) const;
90 
91 public:
92  // Show debugging information
93  bool debugging;
94 
95  // Reference tilt series
97 
98  // Dual tilt series
100 
101  // List of angles in ref
103 
104  // List of angles in dual
106 
107  // Images in the reference tilt series
108  std::vector< MultidimArray<double> > imgRef;
109 
110  // Images in the dual tilt series
111  std::vector< MultidimArray<double> > imgDual;
112 
113  // Dual images are rotated 180 degrees
115 
116  // Name of the images closer to 0 degrees
118 
119  // Shift at 0 degrees
121 
122  // Auxiliary vectors;
127 
128  // Image dimensions
129  int Xdim, Ydim;
130 };
132 #endif /* ANGULAR_ALIGN_DUAL_TILT_SERIES_H_ */
double distanceBetweenCommonLines(int refi, int dualj, const Matrix2D< double > &E, double X, double Y, double Z)
Distance between a pair of common lines.
FileName fnOut
Aligned tilt series.
void readParams()
Read parameters from command line.
MultidimArray< double > profilei
void readDual()
Read dual series.
void shiftProjectionInZ(MultidimArray< double > &I, int dualj, double Z) const
Shift the projection in Z.
void produceSideInfo()
Produce side info.
std::vector< MultidimArray< double > > imgDual
MultidimArray< double > tiltDual
MultidimArray< double > profilej
void findParametersAt0degrees(bool rotateDual)
Find parameters (shift+rotation) at 0 degrees.
double optimizeAlignment()
Optimize current alignment.
FileName fnRef
Reference tilt series.
std::vector< MultidimArray< double > > imgRef
double evaluateAlignment(const Matrix1D< double > &_alignment)
Evaluate alignment.
FileName fnDual
Dual tilt series.