Xmipp
v3.23.11-Nereus
xmipp
libraries
reconstruction_adapt_cuda
volume_halves_restoration_gpu.h
Go to the documentation of this file.
1
/***************************************************************************
2
*
3
* Authors: Martin Horacek (horacek1martin@gmail.com)
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_VOLUME_HALVES_RESTORATION_GPU
26
#define _PROG_VOLUME_HALVES_RESTORATION_GPU
27
28
#include <iostream>
29
30
#include <
core/xmipp_program.h
>
31
#include <
data/mask.h
>
32
33
#include "
reconstruction_cuda/cuda_volume_halves_restorator.h
"
34
38
/*
39
* This is GPU implementation of reconstruction/volume_halves_restoration.h
40
* It checks validity of input and delegates the computation to VolumeHalvesRestorator
41
*/
42
template
<
typename
T >
43
class
ProgVolumeHalvesRestorationGpu
:
public
XmippProgram
{
44
static_assert(std::is_floating_point<T>::value,
"Only float and double are allowed as template parameters"
);
45
47
FileName
fnV1;
48
FileName
fnV2;
49
FileName
fnRoot;
50
51
Image<T>
V1;
52
Image<T>
V2;
53
Mask
mask;
54
int
* maskData =
nullptr
;
55
56
typename
VolumeHalvesRestorator<T>::Builder
builder;
57
58
public
:
59
/*
60
* Extract parameters from command line and check their values
61
*/
62
void
readParams
()
override
;
63
64
/*
65
* Defines command line arguments for the program
66
*/
67
void
defineParams
()
override
;
68
69
/*
70
* Runs the volume halves restoration algorithm
71
*/
72
void
run
()
override
;
73
74
private
:
75
76
/*
77
* Prints information about program settings to standard output
78
*/
79
void
show
(
const
VolumeHalvesRestorator<T>
& restorator);
80
81
/*
82
* helper methods for readParams
83
*/
84
void
readFilenames();
85
void
readDenoisingParams();
86
void
readDeconvolutionParams();
87
void
readFilterBankParams();
88
void
readDifferenceParams();
89
void
readMaskParams();
90
91
/*
92
* Loads V1, V2 and mask
93
*/
94
void
readData();
95
void
checkInputDimensions();
96
97
void
saveResults(
const
VolumeHalvesRestorator<T>
& restorator);
98
void
saveImage(
Image<T>
& image, std::string&& filename);
99
};
101
#endif
XmippProgram::show
virtual void show() const
Definition:
xmipp_program.cpp:429
Mask
Definition:
mask.h:360
mask.h
FileName
Definition:
xmipp_filename.h:65
ProgVolumeHalvesRestorationGpu::defineParams
void defineParams() override
Definition:
volume_halves_restoration_gpu.cpp:128
xmipp_program.h
ProgVolumeHalvesRestorationGpu::run
void run() override
Definition:
volume_halves_restoration_gpu.cpp:144
cuda_volume_halves_restorator.h
ProgVolumeHalvesRestorationGpu
Definition:
volume_halves_restoration_gpu.h:43
Image
Definition:
image_operate.h:36
VolumeHalvesRestorator
Definition:
cuda_volume_halves_restorator.h:41
ProgVolumeHalvesRestorationGpu::readParams
void readParams() override
Definition:
volume_halves_restoration_gpu.cpp:28
XmippProgram
Definition:
xmipp_program.h:52
VolumeHalvesRestorator::Builder
Definition:
cuda_volume_halves_restorator.h:232
Generated by
1.8.13