Xmipp  v3.23.11-Nereus
symmetrize.h
Go to the documentation of this file.
1 /***************************************************************************
2  *
3  * Authors: Carlos Oscar S. Sorzano (coss@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 #ifndef _PROG_SYMMETRIZE_HH
26 # define _PROG_SYMMETRIZE_HH
27 
28 #include <core/xmipp_funcs.h>
29 #include <core/xmipp_image.h>
30 #include <data/mask.h>
31 #include <core/symmetries.h>
32 #include <core/xmipp_program.h>
33 
37 /* Test parameters --------------------------------------------------------- */
40 {
41 public:
49  bool doMask;
51  double rotHelical;
55  double zHelical;
59  double Ts;
63  bool wrap;
65  bool sum;
69  int Cn;
70 public:
72  void readParams();
73 
75  void defineParams();
76 
78  void show();
79 
81  void preProcess();
82 
84  void processImage(const FileName &fnImg, const FileName &fnImgOut, const MDRow &rowIn, MDRow &rowOut);
85 public:
86  // Symmetry description for volumes
88  // Symmetry description for images
89  int symorder;
90  // Helical symmetry
91  bool helical;
92  // Dihedral symmetry
93  bool dihedral;
94  // Helical dihedral
96 };
97 
99 void symmetrizeVolume(const SymList &SL, const MultidimArray<double> &V_in,
101  bool wrap=xmipp_transformation::WRAP, bool do_outside_avg=false, bool sum=false, bool helical=false, bool dihedral=false,
102  bool helicalDihedral=false,
103  double rotHelical=0.0, double rotPhaseHelical=0.0, double zHelical=0.0, double heightFraction=0.95,
104  const MultidimArray<double> * mask=nullptr, int Cn=1);
105 
107 void symmetrizeImage(int symorder, const MultidimArray<double> &I_in,
109  bool wrap=xmipp_transformation::WRAP, bool do_outside_avg=false, bool sum=false);
111 #endif
SymList SL
Definition: symmetrize.h:87
void symmetrizeImage(int symorder, const MultidimArray< double > &I_in, MultidimArray< double > &I_out, int spline=xmipp_transformation::BSPLINE3, bool wrap=xmipp_transformation::WRAP, bool do_outside_avg=false, bool sum=false)
Symmetrize Parameters.
Definition: symmetrize.h:39
bool wrap
wrap or don&#39;t wrap input file during symmetrisation
Definition: symmetrize.h:63
double Ts
Sampling rate (used for helical)
Definition: symmetrize.h:59
void symmetrizeVolume(const SymList &SL, const MultidimArray< double > &V_in, MultidimArray< double > &V_out, int spline=xmipp_transformation::BSPLINE3, bool wrap=xmipp_transformation::WRAP, bool do_outside_avg=false, bool sum=false, bool helical=false, bool dihedral=false, bool helicalDihedral=false, double rotHelical=0.0, double rotPhaseHelical=0.0, double zHelical=0.0, double heightFraction=0.95, const MultidimArray< double > *mask=nullptr, int Cn=1)
Definition: symmetrize.cpp:117
double zHelical
Helical shift.
Definition: symmetrize.h:55
double rotHelical
Helical rotation.
Definition: symmetrize.h:51
int splineOrder
Spline order.
Definition: symmetrize.h:67
double rotPhaseHelical
Helical phase.
Definition: symmetrize.h:53
bool helicalDihedral
Definition: symmetrize.h:95
FileName fn_sym2
Definition: symmetrize.h:43
bool sum
Sum or average the result.
Definition: symmetrize.h:65
double heightFraction
Helical height fraction.
Definition: symmetrize.h:57
FileName fn_sym
symmetry file
Definition: symmetrize.h:43
void processImage(const FileName &fnImg, const FileName &fnImgOut, const MDRow &rowIn, MDRow &rowOut)
Process image or volume.
Definition: symmetrize.cpp:233
void defineParams()
Definition: symmetrize.cpp:63
int Cn
Cn for helical or helicalDihedral.
Definition: symmetrize.h:69
FileName fn_Maskout
mask file (mask what is outside)
Definition: symmetrize.h:47
bool do_not_generate_subgroup
Do not generate subgroup.
Definition: symmetrize.h:61
FileName fn_Maskin
mask file (mask what is inside)
Definition: symmetrize.h:45
bool doMask
set to true is we should mask
Definition: symmetrize.h:49
void readParams()
Definition: symmetrize.cpp:32