Xmipp
v3.23.11-Nereus
xmipp
libraries
data
xmipp_image_convert.h
Go to the documentation of this file.
1
/***************************************************************************
2
*
3
* Authors: Carlos Oscar coss@cnb.csic.es (2007)
4
* Joaquin Oton joton@cnb.csic.es (2010)
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
#ifndef IMAGE_CONVERT_H_
27
#define IMAGE_CONVERT_H_
28
29
#include "
core/xmipp_metadata_program.h
"
30
#include "
core/xmipp_image_generic.h
"
31
35
typedef
enum
36
{
37
MD2MD
,
38
MD2VOL
,
39
VOL2MD
40
}
ImageConv
;
41
42
class
ProgConvImg
:
public
XmippMetadataProgram
43
{
44
45
private
:
46
String
type;
// Type of output conversion
47
String
depth;
48
ImageGeneric
imIn;
49
ImageGeneric
*imOut =
nullptr
;
50
ImageConv
convMode;
51
CastWriteMode
castMode;
52
size_t
k;
53
int
writeMode;
54
bool
appendToStack;
55
bool
swap;
56
57
public
:
59
ProgConvImg
();
60
virtual
~ProgConvImg
() {
61
if
(imOut) {
62
delete
imOut;
63
}
64
}
65
void
setType
(
const
String
&sType)
66
{
67
type = sType;
68
}
69
protected
:
70
void
init
();
71
void
defineParams
();
72
void
readParams
();
73
void
preProcess
();
74
void
processImage
(
const
FileName
&fnImg,
const
FileName
&fnImgOut,
const
MDRow
&rowIn,
MDRow
&rowOut);
75
void
finishProcessing
();
76
void
show
();
77
};
//class ProgConvImg
79
#endif
/* IMAGE_CONVERT_H_ */
ProgConvImg::setType
void setType(const String &sType)
Definition:
xmipp_image_convert.h:65
ProgConvImg::defineParams
void defineParams()
Definition:
xmipp_image_convert.cpp:55
xmipp_metadata_program.h
ProgConvImg::ProgConvImg
ProgConvImg()
Definition:
xmipp_image_convert.cpp:30
ProgConvImg::init
void init()
Definition:
xmipp_image_convert.cpp:35
ProgConvImg::finishProcessing
void finishProcessing()
Definition:
xmipp_image_convert.cpp:341
FileName
Definition:
xmipp_filename.h:65
ImageConv
ImageConv
Definition:
xmipp_image_convert.h:35
xmipp_image_generic.h
ProgConvImg::show
void show()
Definition:
xmipp_image_convert.cpp:359
MD2MD
Definition:
xmipp_image_convert.h:37
ProgConvImg::preProcess
void preProcess()
Definition:
xmipp_image_convert.cpp:197
MD2VOL
Definition:
xmipp_image_convert.h:38
ImageGeneric
Definition:
xmipp_image_generic.h:47
ProgConvImg
Definition:
xmipp_image_convert.h:42
ProgConvImg::~ProgConvImg
virtual ~ProgConvImg()
Definition:
xmipp_image_convert.h:60
XmippMetadataProgram
Definition:
xmipp_metadata_program.h:44
ProgConvImg::readParams
void readParams()
Definition:
xmipp_image_convert.cpp:160
String
std::string String
Definition:
xmipp_strings.h:34
ProgConvImg::processImage
void processImage(const FileName &fnImg, const FileName &fnImgOut, const MDRow &rowIn, MDRow &rowOut)
Definition:
xmipp_image_convert.cpp:303
VOL2MD
Definition:
xmipp_image_convert.h:39
MDRow
Definition:
metadata_row_base.h:53
CastWriteMode
CastWriteMode
Definition:
xmipp_image_base.h:101
Generated by
1.8.13