1 /*=========================================================================
2 Program: vv http://www.creatis.insa-lyon.fr/rio/vv
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
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.
13 It is distributed under dual licence
15 - BSD See included LICENSE.txt file
16 - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17 ===========================================================================**/
19 //--------------------------------------------------------------------
20 template<class ArgsInfoType>
21 clitk::LabelImageOverlapMeasureGenericFilter<ArgsInfoType>::
22 LabelImageOverlapMeasureGenericFilter():
23 ImageToImageGenericFilter<Self>("LabelImageOverlapMeasure")
26 cmdline_parser_clitkLabelImageOverlapMeasure_init(&mArgsInfo);
27 //InitializeImageType<2>();
28 InitializeImageType<3>();
30 //--------------------------------------------------------------------
33 //--------------------------------------------------------------------
34 template<class ArgsInfoType>
35 template<unsigned int Dim>
36 void clitk::LabelImageOverlapMeasureGenericFilter<ArgsInfoType>::
39 ADD_IMAGE_TYPE(Dim, uchar);
41 //--------------------------------------------------------------------
44 //--------------------------------------------------------------------
45 template<class ArgsInfoType>
46 void clitk::LabelImageOverlapMeasureGenericFilter<ArgsInfoType>::
47 SetArgsInfo(const ArgsInfoType & a)
50 SetIOVerbose(mArgsInfo.verbose_flag);
51 if (mArgsInfo.imagetypes_flag) this->PrintAvailableImageTypes();
52 if (mArgsInfo.input1_given) AddInputFilename(mArgsInfo.input1_arg);
53 if (mArgsInfo.input2_given) AddInputFilename(mArgsInfo.input2_arg);
55 //--------------------------------------------------------------------
58 //--------------------------------------------------------------------
59 // Update with the number of dimensions and the pixeltype
60 //--------------------------------------------------------------------
61 template<class ArgsInfoType>
62 template<class FilterType>
63 void clitk::LabelImageOverlapMeasureGenericFilter<ArgsInfoType>::
64 SetOptionsFromArgsInfoToFilter(FilterType * f)
66 f->SetLabel1(mArgsInfo.label1_arg);
67 f->SetLabel2(mArgsInfo.label2_arg);
70 //--------------------------------------------------------------------
71 // Update with the number of dimensions and the pixeltype
72 //--------------------------------------------------------------------
73 template<class ArgsInfoType>
74 template<class ImageType>
75 void clitk::LabelImageOverlapMeasureGenericFilter<ArgsInfoType>::
76 UpdateWithInputImageType()
79 typename ImageType::Pointer input1 = this->template GetInput<ImageType>(0);
80 typename ImageType::Pointer input2 = this->template GetInput<ImageType>(1);
83 typedef clitk::LabelImageOverlapMeasureFilter<ImageType> FilterType;
84 typename FilterType::Pointer filter = FilterType::New();
87 filter->SetInput(0, input1);
88 filter->SetInput(1, input2);
89 SetOptionsFromArgsInfoToFilter<FilterType>(filter);
95 // typename ImageType::Pointer output = filter->GetOutput();
96 // this->template SetNextOutput<ImageType>(output);
98 //--------------------------------------------------------------------