]> Creatis software - clitk.git/blob - segmentation/clitkConnectedComponentLabeling.cxx
Add 2 options to clitkImage2Dicom
[clitk.git] / segmentation / clitkConnectedComponentLabeling.cxx
1 /*=========================================================================
2   Program:   vv                     http://www.creatis.insa-lyon.fr/rio/vv
3
4   Authors belong to:
5   - University of LYON              http://www.universite-lyon.fr/
6   - Léon Bérard cancer center       http://www.centreleonberard.fr
7   - CREATIS CNRS laboratory         http://www.creatis.insa-lyon.fr
8
9   This software is distributed WITHOUT ANY WARRANTY; without even
10   the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11   PURPOSE.  See the copyright notices for more information.
12
13   It is distributed under dual licence
14
15   - BSD        See included LICENSE.txt file
16   - CeCILL-B   http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17 ===========================================================================**/
18
19 // clitk
20 #include "clitkConnectedComponentLabeling_ggo.h"
21 #include "clitkConnectedComponentLabelingGenericFilter.h"
22 #include "clitkMemoryUsage.h"
23
24 //--------------------------------------------------------------------
25 int main(int argc, char * argv[])
26 {
27   //  clitk::PrintMemory(true, "start");
28
29   // Init command line
30   GGO(clitkConnectedComponentLabeling, args_info);
31   CLITK_INIT;
32
33   // Filter
34   //clitk::PrintMemory(true, "before filter");
35   typedef clitk::ConnectedComponentLabelingGenericFilter<args_info_clitkConnectedComponentLabeling> FilterType;
36   FilterType::Pointer filter = FilterType::New();
37
38   filter->SetArgsInfo(args_info);
39   //clitk::PrintMemory(true, "before update");
40   try {
41     filter->Update();
42   } catch(std::runtime_error e) {
43     std::cout << e.what() << std::endl;
44   }
45
46   //clitk::PrintMemory(true, "after filter");
47
48   return EXIT_SUCCESS;
49 } // This is the end, my friend
50 //--------------------------------------------------------------------