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-2017 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 <mia/core/iodata.hh>
26 #include <mia/3d/landmark.hh>
27 
38  typedef std::map<std::string, P3DLandmark> CMap;
39 public:
40 
42  typedef CMap::value_type value_type;
43 
45  typedef CMap::const_iterator const_iterator;
46 
48  typedef CMap::iterator iterator;
49 
54  static const char *data_descr;
55 
57  typedef C3DLandmarklist type;
59 
60  typedef std::shared_ptr<C3DLandmarklist> Pointer;
61 
67  void add(P3DLandmark lm);
68 
69 
73  C3DLandmarklist *clone() const;
74 
79  P3DLandmark get(const std::string& name) const;
80 
82  const_iterator begin() const;
84  const_iterator end() const;
85 
87  iterator begin();
88 
90  iterator end();
91 
96  void set_path(const std::string& path);
97 
102  void set_name(const std::string &name);
103 
107  size_t size() const;
108 
110  const std::string &get_name() const;
111 private:
112  CMap m_list;
113 
114  std::string m_path;
115  std::string m_name;
116 };
117 
118 
121 
123 #endif
124 
C3DLandmarklist::Pointer P3DLandmarklist
Pointer type for land mark list.
CMap::const_iterator const_iterator
read only iterator
Definition: landmarklist.hh:45
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
Definition: defines.hh:33
#define EXPORT_3D
Definition: defines3d.hh:44
std::shared_ptr< C3DLandmarklist > Pointer
Definition: landmarklist.hh:60
helper class to derive from for data that can be loaded and stored to a disk.
Definition: iodata.hh:36
CMap::value_type value_type
Type of the map values (needed for lambda arguments)
Definition: landmarklist.hh:42
C3DLandmark::Pointer P3DLandmark
Definition: landmark.hh:147
A list of named landmarks.
Definition: landmarklist.hh:37
CMap::iterator iterator
read-write iterator
Definition: landmarklist.hh:48
#define NS_MIA_END
conveniance define to end the mia namespace
Definition: defines.hh:36