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 ===========================================================================**/
18 #ifndef CLITKLISTOFPAIR_TXX
19 #define CLITKLISTOFPAIR_TXX
21 =================================================
22 * @file clitkListOfPair.txx
23 * @author David Sarrut <david.sarrut@creatis.insa-lyon.fr>
24 * @date 27 Feb 2007 09:44:48
29 =================================================*/
31 //====================================================================
32 template<class MapType>
33 void ReadMap(const std::string & filename, MapType & list, bool inverse)
36 clitk::openFileForReading(is, filename);
37 clitk::skipComment(is);
38 typedef typename MapType::key_type KType;
40 typedef typename MapType::mapped_type MType;
46 if (!inverse) list.insert(std::pair<KType, MType>(v1,v2));
47 else list.insert(std::pair<KType, MType>(v2,v1));
49 clitk::skipComment(is);
53 //====================================================================
55 #endif /* end #define CLITKLISTOFPAIR_TXX */