X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=tools%2FclitkBinarizeImage.cxx;h=1bfc8386b96eb0f78bb4762bccfb227bb25e3e1a;hb=d24dbd466ba6aac0ed3e85f590ee1b933eb141d4;hp=7019c6c3bc775ddeac3780699b90b2417bfa3b9b;hpb=15784e384cd2d74c0ffa4ed54e1d4c0ecfb2a1bd;p=clitk.git diff --git a/tools/clitkBinarizeImage.cxx b/tools/clitkBinarizeImage.cxx index 7019c6c..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" @@ -29,14 +29,15 @@ int main(int argc, char * argv[]) CLITK_INIT; // Filter - typedef clitk::BinarizeImageGenericFilter FilterType; + typedef clitk::BinarizeImageGenericFilter FilterType; 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;