CASToR  3.0
Tomographic Reconstruction (PET/SPECT/CT)
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-2019 all CASToR contributors listed below:
18 
19  --> Didier BENOIT, Claude COMTAT, Marina FILIPOVIC, Thibaut MERLIN, Mael MILLARDET, Simon STUTE, Valentin VIELZEUF
20 
21 This is CASToR version 3.0.
22 */
23 
31 
32 // =====================================================================
33 // ---------------------------------------------------------------------
34 // ---------------------------------------------------------------------
35 // =====================================================================
36 
38 {
39  // Affect default values
41  m_verbose = 0;
45  m_checked = false;
46  m_initialized = false;
47 }
48 
49 // =====================================================================
50 // ---------------------------------------------------------------------
51 // ---------------------------------------------------------------------
52 // =====================================================================
53 
55 {
56 }
57 
58 // =====================================================================
59 // ---------------------------------------------------------------------
60 // ---------------------------------------------------------------------
61 // =====================================================================
62 
64 {
65  // Check image dimensions
67  {
68  Cerr("***** vImageProcessingModule::CheckParameters() -> oImageDimensionsAndQuantification is null !" << endl);
69  return 1;
70  }
71  // Check verbose level
72  if (m_verbose<0)
73  {
74  Cerr("***** vImageProcessingModule::CheckParameters() -> Verbose level is negative !" << endl);
75  return 1;
76  }
77  // Call the CheckSpecificParameters function of the child
79  {
80  Cerr("***** vImageProcessingModule::CheckParameters() -> A problem occurred while checking parameters specific to the image processing module !" << endl);
81  return 1;
82  }
83  // All set
84  m_checked = true;
85  // Normal end
86  return 0;
87 }
88 
89 // =====================================================================
90 // ---------------------------------------------------------------------
91 // ---------------------------------------------------------------------
92 // =====================================================================
93 
95 {
96  // Call the specific initialization function of the child
97  if (InitializeSpecific())
98  {
99  Cerr("***** vImageProcessingModule::Initialize() -> A problem occurred while initializing stuff specific to the image processing module !" << endl);
100  return 1;
101  }
102  // All set
103  m_initialized = true;
104  // Normal end
105  return 0;
106 }
107 
108 // =====================================================================
109 // ---------------------------------------------------------------------
110 // ---------------------------------------------------------------------
111 // =====================================================================
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.