CASToR  2.0
Tomographic Reconstruction (PET/SPECT/CT)
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
vImageProcessingModule.cc
Go to the documentation of this file.
1 /*
2 This file is part of CASToR.
3 
4  CASToR is free software: you can redistribute it and/or modify it under the
5  terms of the GNU General Public License as published by the Free Software
6  Foundation, either version 3 of the License, or (at your option) any later
7  version.
8 
9  CASToR is distributed in the hope that it will be useful, but WITHOUT ANY
10  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11  FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
12  details.
13 
14  You should have received a copy of the GNU General Public License along with
15  CASToR (in file GNU_GPL.TXT). If not, see <http://www.gnu.org/licenses/>.
16 
17 Copyright 2017-2018 all CASToR contributors listed below:
18 
19  --> current contributors: Thibaut MERLIN, Simon STUTE, Didier BENOIT, Claude COMTAT, Marina FILIPOVIC, Mael MILLARDET
20  --> past contributors: Valentin VIELZEUF
21 
22 This is CASToR version 2.0.
23 */
24 
32 
33 // =====================================================================
34 // ---------------------------------------------------------------------
35 // ---------------------------------------------------------------------
36 // =====================================================================
37 
39 {
40  // Affect default values
42  m_verbose = 0;
46  m_checked = false;
47  m_initialized = false;
48 }
49 
50 // =====================================================================
51 // ---------------------------------------------------------------------
52 // ---------------------------------------------------------------------
53 // =====================================================================
54 
56 {
57 }
58 
59 // =====================================================================
60 // ---------------------------------------------------------------------
61 // ---------------------------------------------------------------------
62 // =====================================================================
63 
65 {
66  // Check image dimensions
68  {
69  Cerr("***** vImageProcessingModule::CheckParameters() -> oImageDimensionsAndQuantification is null !" << endl);
70  return 1;
71  }
72  // Check verbose level
73  if (m_verbose<0)
74  {
75  Cerr("***** vImageProcessingModule::CheckParameters() -> Verbose level is negative !" << endl);
76  return 1;
77  }
78  // Call the CheckSpecificParameters function of the child
80  {
81  Cerr("***** vImageProcessingModule::CheckParameters() -> A problem occured while checking parameters specific to the image processing module !" << endl);
82  return 1;
83  }
84  // All set
85  m_checked = true;
86  // Normal end
87  return 0;
88 }
89 
90 // =====================================================================
91 // ---------------------------------------------------------------------
92 // ---------------------------------------------------------------------
93 // =====================================================================
94 
96 {
97  // Call the specific initialization function of the child
98  if (InitializeSpecific())
99  {
100  Cerr("***** vImageProcessingModule::Initialize() -> A problem occured while initializing stuff specific to the image processing module !" << endl);
101  return 1;
102  }
103  // All set
104  m_initialized = true;
105  // Normal end
106  return 0;
107 }
108 
109 // =====================================================================
110 // ---------------------------------------------------------------------
111 // ---------------------------------------------------------------------
112 // =====================================================================
virtual ~vImageProcessingModule()
The destructor of vImageProcessingModule.
virtual int InitializeSpecific()=0
A private function used to initialize everything specific to the child module.
#define Cerr(MESSAGE)
int Initialize()
A public function used to initialize the module.
virtual int CheckSpecificParameters()=0
A private function used to check the parameters settings specific to the child module.
oImageDimensionsAndQuantification * mp_ImageDimensionsAndQuantification
vImageProcessingModule()
The constructor of vImageProcessingModule.
int CheckParameters()
A public function used to check the parameters settings.
Declaration of class vImageProcessingModule.