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