X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=tools%2FclitkBinarizeImage.cxx;h=1bfc8386b96eb0f78bb4762bccfb227bb25e3e1a;hb=fdc1613169b9725128ad19aaa4c4a5c39f2920d7;hp=2f1cdee71f027c59b7da4d8901d5e52b2818dc47;hpb=870c69d4433f861755085ce2e398032223768a94;p=clitk.git diff --git a/tools/clitkBinarizeImage.cxx b/tools/clitkBinarizeImage.cxx index 2f1cdee..1bfc838 100644 --- a/tools/clitkBinarizeImage.cxx +++ b/tools/clitkBinarizeImage.cxx @@ -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 "clitkBinarizeImage_ggo.h" @@ -33,10 +33,11 @@ int main(int argc, char * argv[]) FilterType::Pointer filter = FilterType::New(); filter->SetArgsInfo(args_info); - filter->Update(); - if (filter->HasError()) { - std::cout << filter->GetLastError() << std::endl; + try { + filter->Update(); + } catch(std::runtime_error e) { + std::cout << e.what() << std::endl; } return EXIT_SUCCESS;