Xmipp
v3.23.11-Nereus
xmipp
libraries
data
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
"
32
#include "
core/xmipp_metadata_program.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
50
typedef
void
ImageUnaryOperator
(
Image<double>
&op);
51
53
void
radialAvg
(
Image<double>
&op);
54
56
class
ProgOperate
:
public
XmippMetadataProgram
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
radialAvg
void radialAvg(Image< double > &op)
Definition:
image_operate.cpp:269
ProgOperate
Definition:
image_operate.h:56
xmipp_metadata_program.h
metadata_vec.h
ProgOperate::readParams
void readParams()
Read input parameters.
Definition:
image_operate.cpp:377
ProgOperate::processImage
void processImage(const FileName &fnImg, const FileName &fnImgOut, const MDRow &rowIn, MDRow &rowOut)
Process one image.
Definition:
image_operate.cpp:565
ImageUnaryOperator
void ImageUnaryOperator(Image< double > &op)
Definition:
image_operate.h:50
FileName
Definition:
xmipp_filename.h:65
ProgOperate::defineParams
void defineParams()
Define parameters.
Definition:
image_operate.cpp:314
MetaDataVec
Definition:
metadata_vec.h:46
xmipp_image.h
ImageBinaryOperator
void ImageBinaryOperator(Image< double > &op1, const Image< double > &op2)
Definition:
image_operate.h:46
XmippMetadataProgram
Definition:
xmipp_metadata_program.h:44
Image
Definition:
image_operate.h:36
MDRow
Definition:
metadata_row_base.h:53
Generated by
1.8.13