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 ===========================================================================**/
21 =================================================
23 * @author Jef Vandemeulebroucke <jef@creatis.insa-lyon.fr>
28 =================================================*/
30 #include "clitkCommon.h"
34 #include "itkLightObject.h"
40 template <class ListItemType >
41 class List: public std::vector<ListItemType >
45 //=====================================================================================
47 typedef typename ListItemType::ValueType ValueType;
48 itkStaticConstMacro(Dimension, unsigned int, ListItemType::Dimension);
49 typedef List<ListItemType> ListType;
50 typedef itk::ContinuousIndex<ValueType, Dimension> IndexType;
51 typedef itk::Image<signed short, Dimension> ImageType;
53 //=====================================================================================
55 void Read(const string& fileName, bool verbose=false);
56 void ReadAndConvertPointPairs(const string& fileName, List& correspList, const typename ImageType::Pointer referenceImage , bool verbose=false);
57 bool ReadPointPair(const string& fileName, const unsigned int& pointNumber, IndexType& item1, IndexType& item2, bool& veryUnsure);
58 void Write(const string fileName, const bool verbose);
61 //=====================================================================================
63 List<itk::FixedArray<double, 1> > Norm(void);
65 //=====================================================================================
66 //Constructors - Destructors
68 List(const string fileName, bool verbose=false ){Read(fileName, verbose);}
69 List(unsigned int size) { this->resize(size); };
80 #ifndef ITK_MANUAL_INSTANTIATION
81 #include "clitkList.txx"