]> Creatis software - clitk.git/blobdiff - segmentation/clitkFilterWithAnatomicalFeatureDatabaseManagement.cxx
changes in license header
[clitk.git] / segmentation / clitkFilterWithAnatomicalFeatureDatabaseManagement.cxx
index 343e839a2c049120767db5e03c560a78bdd6246b..6e3e5946c7228f0f3b5be1fc73c43d5e47aa6893 100644 (file)
@@ -3,7 +3,7 @@
 
   Authors belong to: 
   - University of LYON              http://www.universite-lyon.fr/
-  - Léon Bérard cancer center       http://oncora1.lyon.fnclcc.fr
+  - Léon Bérard cancer center       http://www.centreleonberard.fr
   - CREATIS CNRS laboratory         http://www.creatis.insa-lyon.fr
 
   This software is distributed WITHOUT ANY WARRANTY; without even
@@ -14,7 +14,7 @@
 
   - BSD        See included LICENSE.txt file
   - CeCILL-B   http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
-  ======================================================================-====*/
+  ===========================================================================**/
 
 // clitk
 #include "clitkFilterWithAnatomicalFeatureDatabaseManagement.h"
@@ -24,7 +24,7 @@ clitk::FilterWithAnatomicalFeatureDatabaseManagement::
 FilterWithAnatomicalFeatureDatabaseManagement() 
 {
   m_AFDB = NULL; 
-  SetAFDBFilename("noname.afdb");
+  SetAFDBFilename("default.afdb");
 }
 //--------------------------------------------------------------------
 
@@ -42,7 +42,12 @@ void clitk::FilterWithAnatomicalFeatureDatabaseManagement::WriteAFDB()
 void clitk::FilterWithAnatomicalFeatureDatabaseManagement::LoadAFDB() 
 {
   GetAFDB()->SetFilename(GetAFDBFilename());
-  GetAFDB()->Load();
+  try {
+    GetAFDB()->Load();
+  } catch (clitk::ExceptionObject e) {
+    std::cout << "Could not read '" << GetAFDBFilename() << "', create one AFDB." << std::endl;
+    GetAFDB();
+  }
 }
 //--------------------------------------------------------------------