]> Creatis software - clitk.git/blobdiff - tools/clitkImageArithm.cxx
more refined abort-on-exception mechanism
[clitk.git] / tools / clitkImageArithm.cxx
index 554d1513bfe8f215586e078fb92d009234529d96..4cb22ca85c806ae1bb0d9f941913e8e91a152b01 100644 (file)
@@ -27,6 +27,7 @@
 // clitk include
 #include "clitkImageArithm_ggo.h"
 #include "clitkImageArithmGenericFilter.h"
+#include "clitkIO.h"
 
 //--------------------------------------------------------------------
 int main(int argc, char * argv[])
@@ -34,6 +35,7 @@ int main(int argc, char * argv[])
 
   // Init command line
   GGO(clitkImageArithm, args_info);
+  CLITK_INIT;
 
   // Creation of a generic filter
   typedef clitk::ImageArithmGenericFilter<args_info_clitkImageArithm> FilterType;
@@ -41,7 +43,7 @@ int main(int argc, char * argv[])
 
   // Go !
   filter->SetArgsInfo(args_info);
-  filter->Update();
+  CLITK_TRY_CATCH_EXIT(filter->Update());
 
   // this is the end my friend
   return EXIT_SUCCESS;