Xmipp  v3.23.11-Nereus
image_operate.h
Go to the documentation of this file.
1 /***************************************************************************
2  *
3  * Authors: J.M. de la Rosa Trevin (jmdelarosa@cnb.csic.es) x 0.95
4  * Joaquin Oton (joton@cnb.csic.es) x 0.05
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 IMAGE_OPERATE_H
28 #define IMAGE_OPERATE_H
29 
30 #include <memory>
31 #include "core/metadata_vec.h"
33 #include "core/xmipp_image.h"
34 
35 template<typename T>
36 class Image;
37 
40 
41 
46 typedef void ImageBinaryOperator(Image<double> &op1, const Image<double> &op2);
47 
51 
53 void radialAvg(Image<double> &op);
54 
57 {
58 private:
59  //Functions pointer to binary operation
60  ImageBinaryOperator * binaryOperator;
61  //Functions pointer to unary operation
62  ImageUnaryOperator * unaryOperator;
63  FileName fn2;
64  MetaDataVec md2;
65  std::unique_ptr<MetaDataVec::id_iterator> md2IdIterator;
66  Image<double> img2;
67  bool isValue;
68  double value;
69  FileName file_or_value;
70 protected:
72  void defineParams();
73 
75  void readParams();
76 
78  void processImage(const FileName &fnImg, const FileName &fnImgOut, const MDRow &rowIn, MDRow &rowOut);
79 }
80 ;
82 #endif
void radialAvg(Image< double > &op)
void readParams()
Read input parameters.
void processImage(const FileName &fnImg, const FileName &fnImgOut, const MDRow &rowIn, MDRow &rowOut)
Process one image.
void ImageUnaryOperator(Image< double > &op)
Definition: image_operate.h:50
void defineParams()
Define parameters.
void ImageBinaryOperator(Image< double > &op1, const Image< double > &op2)
Definition: image_operate.h:46