Xmipp  v3.23.11-Nereus
steerable.h
Go to the documentation of this file.
1 /***************************************************************************
2  *
3  * Authors: Manuel Sanchez Pau
4  * Carlos Oscar Sanchez Sorzano
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 STEERABLE_H
28 #define STEERABLE_H
29 
30 #include <core/multidim_array.h>
31 #include <vector>
32 
35 
36 
38 {
39 public:
41  double rotPos;
43  double tiltPos;
45  double rotNeg;
47  double tiltNeg;
48 public:
49 
52  {
53  rotPos = 0.;
54  tiltPos = 0.;
55  rotNeg = 0.;
56  tiltNeg = 0.;
57  }
58 
60  void removeWedge(MultidimArray<double> &V) const;
61 };
62 
64 class Steerable
65 {
66 public:
67  // Basis functions for the steerability
68  std::vector< MultidimArray<double> > basis;
69 
70  // Missing wedge
71  const MissingWedge *MW;
72 public:
78  Steerable(double sigma, MultidimArray<double> &Vtomograph,
79  double deltaAng, const std::string &filterType,
80  const MissingWedge *_MW);
81 
83  void buildBasis(const MultidimArray<double> &Vtomograph, double sigma);
84 
86  void generate1DFilters(double sigma,
87  const MultidimArray<double> &Vtomograph,
88  std::vector< MultidimArray<double> > &hx1,
89  std::vector< MultidimArray<double> > &hy1,
90  std::vector< MultidimArray<double> > &hz1);
91 
93  void generate3DFilter(MultidimArray<double>& h3D,
94  std::vector< MultidimArray<double> > &hx1,
95  std::vector< MultidimArray<double> > &hy1,
96  std::vector< MultidimArray<double> > &hz1);
97 
99  void singleFilter(const MultidimArray<double>& Vin,
102 };
104 #endif
void removeWedge(MultidimArray< double > &V) const
Remove wedge.
Definition: steerable.cpp:35
double tiltPos
Tilt of the positive plane.
Definition: steerable.h:43
double rotNeg
Rot of the negative plane.
Definition: steerable.h:45
MissingWedge()
Empty constructor.
Definition: steerable.h:51
double tiltNeg
Tilt of the negative plane.
Definition: steerable.h:47
const MissingWedge * MW
Definition: steerable.h:71
double rotPos
Rot of the positive plane.
Definition: steerable.h:41
std::vector< MultidimArray< double > > basis
Definition: steerable.h:68