landmarklist.hh
Go to the documentation of this file.
1 /* -*- mia-c++ -*-
2  *
3  * This file is part of MIA - a toolbox for medical image analysis
4  * Copyright (c) Leipzig, Madrid 1999-2013 Gert Wollny
5  *
6  * MIA is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with MIA; if not, see <http://www.gnu.org/licenses/>.
18  *
19  */
20 
21 #ifndef mia_3d_landmarklist_hh
22 #define mia_3d_landmarklist_hh
23 
24 #include <map>
25 #include <boost/filesystem.hpp>
26 
27 #include <mia/core/iodata.hh>
28 #include <mia/3d/landmark.hh>
29 
40  typedef std::map<std::string, P3DLandmark> CMap;
41 public:
42 
44  typedef CMap::value_type value_type;
45 
47  typedef CMap::const_iterator const_iterator;
48 
50  typedef CMap::iterator iterator;
51 
56  static const char *data_descr;
57 
59  typedef C3DLandmarklist type;
61 
62  typedef std::shared_ptr<C3DLandmarklist> Pointer;
63 
69  void add(P3DLandmark lm);
70 
71 
75  C3DLandmarklist *clone() const;
76 
81  P3DLandmark get(const std::string& name) const;
82 
84  const_iterator begin() const;
86  const_iterator end() const;
87 
89  iterator begin();
90 
92  iterator end();
93 
98  void set_path(const boost::filesystem::path& path);
99 
104  void set_name(const std::string &name);
105 
109  size_t size() const;
110 
112  const std::string &get_name() const;
113 private:
114  CMap m_list;
115 
116  boost::filesystem::path m_path;
117  std::string m_name;
118 };
119 
120 
123 
125 #endif
126