CASToR  2.0
Tomographic Reconstruction (PET/SPECT/CT)
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
iImageProcessingTemplate.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 #include "sOutputManager.hh"
33 
34 // =====================================================================
35 // ---------------------------------------------------------------------
36 // ---------------------------------------------------------------------
37 // =====================================================================
38 
40 {
41  // Set the booleans that describe if this image processing module will affect each of the dynamic dimension.
42  // The boolean members m_affectXXXDimensionFlag are used to avoid any misuse of an image processing module due to the indexation
43  // on dynamic basis functions. Here is an example: if the module is acting on the time dynamics (1st pointer) and actually uses
44  // the time information to do some processing along this dimension, then the m_affectTimeDimensionFlag must be set to 'true' in
45  // the constructor. Doing that, the image processing manager will forbid any use of this processing module if time basis functions
46  // are being used. So this insures that when entering this function, the first pointer of the a4p_image will be frames and not
47  // generic time basis functions (i.e. there is an equivalence). The same reasoning applies to the respiratory and cardiac dimensions.
51  // Affect default values to the parameters specific to this module
52 }
53 
54 // =====================================================================
55 // ---------------------------------------------------------------------
56 // ---------------------------------------------------------------------
57 // =====================================================================
58 
60 {
61  // Delete or free all structures specific to this module that were allocated by this module
62 }
63 
64 // =====================================================================
65 // ---------------------------------------------------------------------
66 // ---------------------------------------------------------------------
67 // =====================================================================
68 
69 int iImageProcessingTemplate::ReadConfigurationFile(const string& a_configurationFile)
70 {
71  // Implement here the reading of any options specific to this image processing module, through a configuration file
72 
73  // Normal end
74  return 0;
75 }
76 
77 // =====================================================================
78 // ---------------------------------------------------------------------
79 // ---------------------------------------------------------------------
80 // =====================================================================
81 
82 int iImageProcessingTemplate::ReadOptionsList(const string& a_optionsList)
83 {
84  // Implement here the reading of any options specific to this image processing module, through a list of options separated by commas
85 
86  // Normal end
87  return 0;
88 }
89 
90 // =====================================================================
91 // ---------------------------------------------------------------------
92 // ---------------------------------------------------------------------
93 // =====================================================================
94 
96 {
97  // Here, display some help and guidance to how to use this image processing module and what it does.
98  // Also describes the form of the configuration file or the list of options that parameterize your module.
99  cout << "This image processing module is a template class dedicated to add your own custom image processing module." << endl;
100 }
101 
102 // =====================================================================
103 // ---------------------------------------------------------------------
104 // ---------------------------------------------------------------------
105 // =====================================================================
106 
108 {
109  // Implement here all mandatory checks specific to this image processing module needed for a nice use
110 
111  // Normal end
112  return 0;
113 }
114 
115 // =====================================================================
116 // ---------------------------------------------------------------------
117 // ---------------------------------------------------------------------
118 // =====================================================================
119 
121 {
122  // Implement here the initialization of whatever member variables specifically used by this image processing module
123 
124  return 0;
125 }
126 
127 // =====================================================================
128 // ---------------------------------------------------------------------
129 // ---------------------------------------------------------------------
130 // =====================================================================
131 
133 {
134  // Do the processing here.
135  // The input parameter is the image to be processed.
136  // For genericity purpose, the a4p_image is indexed using dynamic basis functions and not directly frames and gates indices.
137  // 1st pointer: time basis functions
138  // 2nd pointer: respiratory basis functions
139  // 3rd pointer: cardiac basis functions
140  // 4th pointer: voxels
141  // The boolean members m_affectXXXDimensionFlag are used to avoid any misuse of an image processing module due to the indexation
142  // on dynamic basis functions. Here is an example: if the module is acting on the time dynamics (1st pointer) and actually uses
143  // the time information to do some processing along this dimension, then the m_affectTimeDimensionFlag must be set to 'true' in
144  // the constructor. Doing that, the image processing manager will forbid any use of this processing module if time basis functions
145  // are being used. So this insures that when entering this function, the first pointer of the a4p_image will be frames and not
146  // generic time basis functions (i.e. there is an equivalence). The same reasoning applies to the respiratory and cardiac dimensions.
147  // All informations about frames, durations, gates, etc, can be accessed via the object member mp_ImageDimensionsAndQuantification.
148 
149  // Normal end
150  return 0;
151 }
152 
153 // =====================================================================
154 // ---------------------------------------------------------------------
155 // ---------------------------------------------------------------------
156 // =====================================================================
#define FLTNB
Definition: gVariables.hh:81
int CheckSpecificParameters()
A private function used to check the parameters settings specific to the child module.
int Process(FLTNB ****a4p_image)
A function used to actually perform the processing.
int ReadOptionsList(const string &a_optionsList)
A function used to read options from a list of options.
~iImageProcessingTemplate()
The destructor of iImageProcessingTemplate.
This abstract class is the generic image processing module class used by the oImageProcessingManager...
void ShowHelp()
A function used to show help about the child module.
int ReadConfigurationFile(const string &a_configurationFile)
A function used to read options from a configuration file.
iImageProcessingTemplate()
The constructor of iImageProcessingTemplate.
Declaration of class sOutputManager.
Declaration of class iImageProcessingTemplate.
int InitializeSpecific()
A private function used to initialize everything specific to the child module.