]> Creatis software - clitk.git/blob - registration/clitkList.h
Debug RTStruct conversion with empty struc
[clitk.git] / registration / clitkList.h
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 #ifndef CLITKLIST_H
19 #define CLITKLIST_H
20 /**
21    =================================================
22    * @file   clitkList.h
23    * @author Jef Vandemeulebroucke <jef@creatis.insa-lyon.fr>
24    * @date   30 April 2008
25    * 
26    * @brief 
27    * 
28    =================================================*/
29
30 #include "clitkCommon.h"
31 #include "clitkIO.h"
32
33 // itk include
34 #include "itkLightObject.h"
35
36 using namespace std;
37
38 namespace clitk{
39
40   template <class ListItemType > 
41   class List: public std::vector<ListItemType >
42   {
43
44   public:
45     //=====================================================================================
46     //Typedefs
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;
52
53     //=====================================================================================  
54     // IO
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);
59     void Print();
60   
61     //=====================================================================================
62     // Members
63     List<itk::FixedArray<double, 1> > Norm(void);
64
65     //=====================================================================================
66     //Constructors - Destructors
67     List(){};
68     List(const string fileName, bool verbose=false ){Read(fileName, verbose);}
69     List(unsigned int size) { this->resize(size); };
70     ~List(){};
71
72   protected:
73
74
75   };
76
77
78 } // namespace clitk
79
80 #ifndef ITK_MANUAL_INSTANTIATION
81 #include "clitkList.txx"
82 #endif
83
84 #endif
85