My Project
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 {
39  typedef std::map<std::string, P3DLandmark> CMap;
40 public:
41 
43  typedef CMap::value_type value_type;
44 
46  typedef CMap::const_iterator const_iterator;
47 
49  typedef CMap::iterator iterator;
50 
55  static const char *data_descr;
56 
58  typedef C3DLandmarklist type;
60 
61  typedef std::shared_ptr<C3DLandmarklist> Pointer;
62 
68  void add(P3DLandmark lm);
69 
70 
74  C3DLandmarklist *clone() const;
75 
80  P3DLandmark get(const std::string& name) const;
81 
83  const_iterator begin() const;
85  const_iterator end() const;
86 
88  iterator begin();
89 
91  iterator end();
92 
97  void set_path(const std::string& path);
98 
103  void set_name(const std::string& name);
104 
108  size_t size() const;
109 
111  const std::string& get_name() const;
112 private:
113  CMap m_list;
114 
115  std::string m_path;
116  std::string m_name;
117 };
118 
119 
122 
124 #endif
125 
iodata.hh
NS_MIA_BEGIN
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
Definition: defines.hh:33
C3DLandmarklist::iterator
CMap::iterator iterator
read-write iterator
Definition: landmarklist.hh:49
C3DLandmarklist::Pointer
std::shared_ptr< C3DLandmarklist > Pointer
Definition: landmarklist.hh:61
P3DLandmark
C3DLandmark::Pointer P3DLandmark
Definition: landmark.hh:151
NS_MIA_END
#define NS_MIA_END
conveniance define to end the mia namespace
Definition: defines.hh:36
C3DLandmarklist::value_type
CMap::value_type value_type
Type of the map values (needed for lambda arguments)
Definition: landmarklist.hh:43
C3DLandmarklist::const_iterator
CMap::const_iterator const_iterator
read only iterator
Definition: landmarklist.hh:46
landmark.hh
EXPORT_3D
#define EXPORT_3D
Definition: defines3d.hh:45
C3DLandmarklist
A list of named landmarks.
Definition: landmarklist.hh:37
CIOData
helper class to derive from for data that can be loaded and stored to a disk.
Definition: iodata.hh:36
P3DLandmarklist
C3DLandmarklist::Pointer P3DLandmarklist
Pointer type for land mark list.
Definition: landmarklist.hh:121