X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=registration%2FclitkList.h;fp=registration%2FclitkList.h;h=c98ecc547c1d26efd2e037e19e4b963aa624941f;hb=657652a78c2e2717a6f77e027049173442ca29f0;hp=0000000000000000000000000000000000000000;hpb=8abe9edbdc63a33f8fbb1f321073b762e08be9aa;p=clitk.git diff --git a/registration/clitkList.h b/registration/clitkList.h new file mode 100644 index 0000000..c98ecc5 --- /dev/null +++ b/registration/clitkList.h @@ -0,0 +1,85 @@ +/*========================================================================= + Program: vv http://www.creatis.insa-lyon.fr/rio/vv + + Authors belong to: + - University of LYON http://www.universite-lyon.fr/ + - Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr + - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the copyright notices for more information. + + It is distributed under dual licence + + - BSD See included LICENSE.txt file + - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html +======================================================================-====*/ +#ifndef CLITKLIST_H +#define CLITKLIST_H +/** + ================================================= + * @file clitkList.h + * @author Jef Vandemeulebroucke + * @date 30 April 2008 + * + * @brief + * + =================================================*/ + +#include "clitkCommon.h" +#include "clitkIO.h" + +// itk include +#include "itkLightObject.h" + +using namespace std; + +namespace clitk{ + + template + class List: public std::vector + { + + public: + //===================================================================================== + //Typedefs + typedef typename ListItemType::ValueType ValueType; + itkStaticConstMacro(Dimension, unsigned int, ListItemType::Dimension); + typedef List ListType; + typedef itk::ContinuousIndex IndexType; + typedef itk::Image ImageType; + + //===================================================================================== + // IO + void Read(const string& fileName, bool verbose=false); + void ReadAndConvertPointPairs(const string& fileName, List& correspList, const typename ImageType::Pointer referenceImage , bool verbose=false); + bool ReadPointPair(const string& fileName, const unsigned int& pointNumber, IndexType& item1, IndexType& item2, bool& veryUnsure); + void Write(const string fileName, const bool verbose); + void Print(); + + //===================================================================================== + // Members + List > Norm(void); + + //===================================================================================== + //Constructors - Destructors + List(){}; + List(const string fileName, bool verbose=false ){Read(fileName, verbose);} + List(unsigned int size) { this->resize(size); }; + ~List(){}; + + protected: + + + }; + + +} // namespace clitk + +#ifndef ITK_MANUAL_INSTANTIATION +#include "clitkList.txx" +#endif + +#endif +