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::RelativePositionDataBaseBuilderGenericFilter<ArgsInfoType>::
22 RelativePositionDataBaseBuilderGenericFilter():
23 ImageToImageGenericFilter<Self>("RelativePositionDataBaseBuilder")
26 cmdline_parser_clitkRelativePositionDataBaseBuilder_init(&mArgsInfo);
27 InitializeImageType<3>();
29 //--------------------------------------------------------------------
32 //--------------------------------------------------------------------
33 template<class ArgsInfoType>
34 template<unsigned int Dim>
35 void clitk::RelativePositionDataBaseBuilderGenericFilter<ArgsInfoType>::
38 ADD_IMAGE_TYPE(Dim, uchar);
40 //--------------------------------------------------------------------
43 //--------------------------------------------------------------------
44 template<class ArgsInfoType>
45 void clitk::RelativePositionDataBaseBuilderGenericFilter<ArgsInfoType>::
46 SetArgsInfo(const ArgsInfoType & a)
49 SetIOVerbose(mArgsInfo.verbose_flag);
50 if (mArgsInfo.imagetypes_flag) this->PrintAvailableImageTypes();
52 //--------------------------------------------------------------------
55 //--------------------------------------------------------------------
56 // Update with the number of dimensions and the pixeltype
57 //--------------------------------------------------------------------
58 template<class ArgsInfoType>
59 template<class FilterType>
60 void clitk::RelativePositionDataBaseBuilderGenericFilter<ArgsInfoType>::
61 SetOptionsFromArgsInfoToFilter(FilterType * f)
63 f->SetAFDBFilename(mArgsInfo.afdb_arg);
64 f->SetAFDBPath(mArgsInfo.afdb_path_arg);
65 f->SetNumberOfBins(mArgsInfo.bins_arg);
66 f->SetNumberOfAngles(mArgsInfo.nb_arg);
67 f->SetAreaLossTolerance(mArgsInfo.tol_arg);
68 f->SetSupportName(mArgsInfo.supportName_arg);
69 f->SetTargetName(mArgsInfo.targetName_arg);
70 for(unsigned int i=0; i<mArgsInfo.objectName_given; i++)
71 f->AddObjectName(mArgsInfo.objectName_arg[i]);
73 //--------------------------------------------------------------------
76 //--------------------------------------------------------------------
77 // Update with the number of dimensions and the pixeltype
78 //--------------------------------------------------------------------
79 template<class ArgsInfoType>
80 template<class ImageType>
81 void clitk::RelativePositionDataBaseBuilderGenericFilter<ArgsInfoType>::
82 UpdateWithInputImageType()
85 typedef clitk::RelativePositionDataBaseBuilderFilter<ImageType> FilterType;
86 typename FilterType::Pointer filter = FilterType::New();
89 SetOptionsFromArgsInfoToFilter<FilterType>(filter);
95 // typename ImageType::Pointer output = filter->GetOutput();
96 //this->template SetNextOutput<ImageType>(output);
99 //--------------------------------------------------------------------