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