X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=segmentation%2FclitkMorphoMath.cxx;h=97b67050b9086472d0245e1c6f3fb9130a253fde;hb=c135f9b390e2750d8248db5903753b94ca549623;hp=9952fe573359e65e2bb692ff8306cfb54decbb0d;hpb=2f5b335da5621bdfc86cb594cc667d0929f4d8e3;p=clitk.git diff --git a/segmentation/clitkMorphoMath.cxx b/segmentation/clitkMorphoMath.cxx index 9952fe5..97b6705 100755 --- a/segmentation/clitkMorphoMath.cxx +++ b/segmentation/clitkMorphoMath.cxx @@ -17,36 +17,33 @@ ======================================================================-====*/ #ifndef clitkMorphoMath_cxx #define clitkMorphoMath_cxx -/** - ================================================= - * @file clitkMorphoMath.cxx - * @author Jef Vandemeulebroucke - * @date 5 May 2009 - * - * @brief - =================================================*/ // clitk include #include "clitkMorphoMath_ggo.h" #include "clitkMorphoMathGenericFilter.h" -#include "clitkIO.h" -#include "clitkImageCommon.h" +//-------------------------------------------------------------------- int main(int argc, char * argv[]) { - //Init command line + // Init command line GGO(clitkMorphoMath,args_info); CLITK_INIT; - //Creation of a generic filter - clitk::MorphoMathGenericFilter::Pointer genericFilter = clitk::MorphoMathGenericFilter::New(); + // Creation of a generic filter + typedef clitk::MorphoMathGenericFilter FilterType; + FilterType::Pointer filter = FilterType::New(); - //Passing the arguments to the generic filter - genericFilter->SetArgsInfo(args_info); + // Passing the arguments to the generic filter + filter->SetArgsInfo(args_info); - //update - genericFilter->Update(); - return 0; -} + try { + filter->Update(); + } catch(std::runtime_error e) { + std::cout << e.what() << std::endl; + } + + return EXIT_SUCCESS; +} // This is the end, my friend +//-------------------------------------------------------------------- #endif