Xmipp  v3.23.11-Nereus
directions.h
Go to the documentation of this file.
1 /***************************************************************************
2  *
3  * Authors: Sjors Scheres scheres@cnb.csic.es (2004)
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 _DIRECTIONS_H
27 #define _DIRECTIONS_H
28 
29 #include <core/xmipp_funcs.h>
30 #include <core/metadata_vec.h>
31 
32 #include <core/symmetries.h>
33 
37 bool directions_are_unique(double rot, double tilt,
39  double rot2, double tilt2,
40  double rot_limit, double tilt_limit,
41  SymList &SL, bool include_mirrors,
42  Matrix2D<double> &Laux, Matrix2D<double> &Raux);
43 
45 double distance_directions(double rot1, double tilt1,
46  double rot2, double tilt2,
47  bool include_mirrors);
48 
50 void make_even_distribution(std::vector<double> &rotList, std::vector<double> &tiltList,
51  double sampling, SymList &SL, bool include_mirror);
52 
54 void limit_tilt_range(MetaDataVec &DF, double tilt_range0, double tilt_rangeF);
55 
57 int find_nearest_direction(double rot1, double tilt1,
58  std::vector<double> &rotList, std::vector<double> &tiltList,
59  SymList &SL, Matrix2D<double> &Laux, Matrix2D<double> &Raux);
61 #endif
void make_even_distribution(std::vector< double > &rotList, std::vector< double > &tiltList, double sampling, SymList &SL, bool include_mirror)
Make even distribution, taking symmetry into account.
Definition: directions.cpp:133
void limit_tilt_range(MetaDataVec &DF, double tilt_range0, double tilt_rangeF)
Select a user-provided tilt range.
Definition: directions.cpp:185
int find_nearest_direction(double rot1, double tilt1, std::vector< double > &rotList, std::vector< double > &tiltList, SymList &SL, Matrix2D< double > &Laux, Matrix2D< double > &Raux)
Determine which of the entries in DFlib is closest to [rot1,tilt1].
Definition: directions.cpp:194
#define sampling
double distance_directions(double rot1, double tilt1, double rot2, double tilt2, bool include_mirrors)
Calculate angular distance between two directions.
Definition: directions.cpp:91
bool directions_are_unique(double rot, double tilt, double rot2, double tilt2, double rot_limit, double tilt_limit, SymList &SL, bool include_mirrors, Matrix2D< double > &Laux, Matrix2D< double > &Raux)
Check whether projection directions are unique.
Definition: directions.cpp:31