Xmipp
v3.23.11-Nereus
xmipp
libraries
data
image_resize.h
Go to the documentation of this file.
1
/***************************************************************************
2
* Authors: Joaquin Oton (joton@cnb.csic.es)
3
* J.M. De la Rosa (jmdelarosa@cnb.csic.es)
4
*
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_RESIZE_H
28
#define IMAGE_RESIZE_H
29
30
#include "
core/matrix1d.h
"
31
#include "
core/xmipp_image_generic.h
"
32
#include "
core/xmipp_metadata_program.h
"
33
34
35
typedef
enum
{
RESIZE_NONE
,
RESIZE_FACTOR
,
RESIZE_FOURIER
,
RESIZE_PYRAMID_EXPAND
,
RESIZE_PYRAMID_REDUCE
}
ScaleType
;
36
constexpr
signed
int
INTERP_FOURIER
= -1;
40
class
ProgImageResize
:
public
XmippMetadataProgram
41
{
42
public
:
44
ProgImageResize
();
45
~ProgImageResize
();
46
47
protected
:
48
ScaleType
scale_type
;
49
50
int
splineDegree
;
51
int
dim
;
52
int
pyramid_level
;
53
int
fourier_threads
;
54
bool
isVol
;
55
bool
temporaryOutput
;
56
//Matrix2D<double> R, T, S, A, B;
57
Matrix1D<double>
resizeFactor
;
58
ImageGeneric
img
;
59
ImageGeneric
imgOut
;
60
61
void
defineParams
();
62
void
readParams
();
63
void
preProcess
();
64
void
postProcess
();
65
void
processImage
(
const
FileName
&fnImg,
const
FileName
&fnImgOut,
const
MDRow
&rowIn,
MDRow
&rowOut);
66
67
};
69
#endif //IMAGE_RESIZE_H
RESIZE_FACTOR
Definition:
image_resize.h:35
ProgImageResize::~ProgImageResize
~ProgImageResize()
Definition:
image_resize.cpp:33
ProgImageResize::processImage
void processImage(const FileName &fnImg, const FileName &fnImgOut, const MDRow &rowIn, MDRow &rowOut)
Definition:
image_resize.cpp:195
xmipp_metadata_program.h
ProgImageResize::preProcess
void preProcess()
Definition:
image_resize.cpp:88
ProgImageResize::scale_type
ScaleType scale_type
Definition:
image_resize.h:48
ProgImageResize::dim
int dim
Definition:
image_resize.h:51
RESIZE_PYRAMID_REDUCE
Definition:
image_resize.h:35
FileName
Definition:
xmipp_filename.h:65
ProgImageResize::postProcess
void postProcess()
Definition:
image_resize.cpp:236
ProgImageResize::imgOut
ImageGeneric imgOut
Definition:
image_resize.h:59
ProgImageResize::defineParams
void defineParams()
Definition:
image_resize.cpp:36
RESIZE_FOURIER
Definition:
image_resize.h:35
xmipp_image_generic.h
matrix1d.h
ScaleType
ScaleType
Definition:
image_resize.h:35
ProgImageResize::temporaryOutput
bool temporaryOutput
Definition:
image_resize.h:55
ProgImageResize::isVol
bool isVol
Definition:
image_resize.h:54
ProgImageResize::splineDegree
int splineDegree
Definition:
image_resize.h:50
RESIZE_NONE
Definition:
image_resize.h:35
ProgImageResize::pyramid_level
int pyramid_level
Definition:
image_resize.h:52
ProgImageResize::ProgImageResize
ProgImageResize()
Definition:
image_resize.cpp:30
RESIZE_PYRAMID_EXPAND
Definition:
image_resize.h:35
ImageGeneric
Definition:
xmipp_image_generic.h:47
XmippMetadataProgram
Definition:
xmipp_metadata_program.h:44
Matrix1D< double >
ProgImageResize::readParams
void readParams()
Definition:
image_resize.cpp:72
ProgImageResize::resizeFactor
Matrix1D< double > resizeFactor
Definition:
image_resize.h:57
ProgImageResize::img
ImageGeneric img
Definition:
image_resize.h:58
MDRow
Definition:
metadata_row_base.h:53
ProgImageResize::fourier_threads
int fourier_threads
Definition:
image_resize.h:53
ProgImageResize
Definition:
image_resize.h:40
INTERP_FOURIER
constexpr signed int INTERP_FOURIER
Definition:
image_resize.h:36
Generated by
1.8.13