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;
40public:
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
75
80 P3DLandmark get(const std::string& name) const;
81
86
89
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;
112private:
113 CMap m_list;
114
115 std::string m_path;
116 std::string m_name;
117};
118
119
122
124#endif
125
A list of named landmarks.
CMap::iterator iterator
read-write iterator
P3DLandmark get(const std::string &name) const
const_iterator end() const
CMap::value_type value_type
Type of the map values (needed for lambda arguments)
void set_path(const std::string &path)
iterator end()
std::shared_ptr< C3DLandmarklist > Pointer
size_t size() const
void add(P3DLandmark lm)
const_iterator begin() const
void set_name(const std::string &name)
CMap::const_iterator const_iterator
read only iterator
iterator begin()
C3DLandmarklist * clone() const
const std::string & get_name() const
helper class to derive from for data that can be loaded and stored to a disk.
Definition iodata.hh:37
#define EXPORT_3D
Definition defines3d.hh:45
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
Definition defines.hh:33
#define NS_MIA_END
conveniance define to end the mia namespace
Definition defines.hh:36
C3DLandmark::Pointer P3DLandmark
Definition landmark.hh:151
C3DLandmarklist::Pointer P3DLandmarklist
Pointer type for land mark list.