![]() |
CASToR
1.0
Tomographic Reconstruction (PET/SPECT)
|
00001 00002 /* 00003 Implementation of class vImageProcessingModule 00004 00005 - separators: done 00006 - doxygen: done 00007 - default initialization: done 00008 - CASTOR_DEBUG: 00009 - CASTOR_VERBOSE: 00010 */ 00011 00018 #include "vImageProcessingModule.hh" 00019 00020 // ===================================================================== 00021 // --------------------------------------------------------------------- 00022 // --------------------------------------------------------------------- 00023 // ===================================================================== 00024 00025 vImageProcessingModule::vImageProcessingModule() 00026 { 00027 // Affect default values 00028 mp_ImageDimensionsAndQuantification = NULL; 00029 m_verbose = 0; 00030 m_affectTimeDimensionFlag = false; 00031 m_affectRespDimensionFlag = false; 00032 m_affectCardDimensionFlag = false; 00033 m_checked = false; 00034 m_initialized = false; 00035 } 00036 00037 // ===================================================================== 00038 // --------------------------------------------------------------------- 00039 // --------------------------------------------------------------------- 00040 // ===================================================================== 00041 00042 vImageProcessingModule::~vImageProcessingModule() 00043 { 00044 } 00045 00046 // ===================================================================== 00047 // --------------------------------------------------------------------- 00048 // --------------------------------------------------------------------- 00049 // ===================================================================== 00050 00051 int vImageProcessingModule::CheckParameters() 00052 { 00053 // Check image dimensions 00054 if (mp_ImageDimensionsAndQuantification==NULL) 00055 { 00056 Cerr("***** vImageProcessingModule::CheckParameters() -> oImageDimensionsAndQuantification is null !" << endl); 00057 return 1; 00058 } 00059 // Check verbose level 00060 if (m_verbose<0) 00061 { 00062 Cerr("***** vImageProcessingModule::CheckParameters() -> Verbose level is negative !" << endl); 00063 return 1; 00064 } 00065 // Call the CheckSpecificParameters function of the child 00066 if (CheckSpecificParameters()) 00067 { 00068 Cerr("***** vImageProcessingModule::CheckParameters() -> A problem occured while checking parameters specific to the image processing module !" << endl); 00069 return 1; 00070 } 00071 // All set 00072 m_checked = true; 00073 // Normal end 00074 return 0; 00075 } 00076 00077 // ===================================================================== 00078 // --------------------------------------------------------------------- 00079 // --------------------------------------------------------------------- 00080 // ===================================================================== 00081 00082 int vImageProcessingModule::Initialize() 00083 { 00084 // Call the specific initialization function of the child 00085 if (InitializeSpecific()) 00086 { 00087 Cerr("***** vImageProcessingModule::Initialize() -> A problem occured while initializing stuff specific to the image processing module !" << endl); 00088 return 1; 00089 } 00090 // All set 00091 m_initialized = true; 00092 // Normal end 00093 return 0; 00094 } 00095 00096 // ===================================================================== 00097 // --------------------------------------------------------------------- 00098 // --------------------------------------------------------------------- 00099 // =====================================================================