landmarklist.hh
Go to the documentation of this file.
/* -*- mia-c++ -*-
*
* This file is part of MIA - a toolbox for medical image analysis
* Copyright (c) Leipzig, Madrid 1999-2017 Gert Wollny
*
* MIA is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with MIA; if not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef mia_3d_landmarklist_hh
#define mia_3d_landmarklist_hh
#include <map>
#include <mia/core/iodata.hh>
#include <mia/3d/landmark.hh>
NS_MIA_BEGIN
class EXPORT_3D C3DLandmarklist : public CIOData
{
typedef std::map<std::string, P3DLandmark> CMap;
public:
typedef CMap::value_type value_type;
typedef CMap::const_iterator const_iterator;
typedef CMap::iterator iterator;
static const char *data_descr;
typedef C3DLandmarklist type;
typedef std::shared_ptr<C3DLandmarklist> Pointer;
void add(P3DLandmark lm);
C3DLandmarklist *clone() const;
P3DLandmark get(const std::string& name) const;
const_iterator begin() const;
const_iterator end() const;
iterator begin();
iterator end();
void set_path(const std::string& path);
void set_name(const std::string& name);
size_t size() const;
const std::string& get_name() const;
private:
CMap m_list;
std::string m_path;
std::string m_name;
};
typedef C3DLandmarklist::Pointer P3DLandmarklist;
NS_MIA_END
#endif
C3DLandmarklist
A list of named landmarks.
Definition landmarklist.hh:38
C3DLandmarklist::iterator
CMap::iterator iterator
read-write iterator
Definition landmarklist.hh:49
C3DLandmarklist::get
P3DLandmark get(const std::string &name) const
C3DLandmarklist::end
const_iterator end() const
C3DLandmarklist::value_type
CMap::value_type value_type
Type of the map values (needed for lambda arguments).
Definition landmarklist.hh:43
C3DLandmarklist::set_path
void set_path(const std::string &path)
C3DLandmarklist::end
iterator end()
C3DLandmarklist::Pointer
std::shared_ptr< C3DLandmarklist > Pointer
Definition landmarklist.hh:61
C3DLandmarklist::size
size_t size() const
C3DLandmarklist::add
void add(P3DLandmark lm)
C3DLandmarklist::begin
const_iterator begin() const
C3DLandmarklist::set_name
void set_name(const std::string &name)
C3DLandmarklist::const_iterator
CMap::const_iterator const_iterator
read only iterator
Definition landmarklist.hh:46
C3DLandmarklist::begin
iterator begin()
C3DLandmarklist::clone
C3DLandmarklist * clone() const
C3DLandmarklist::get_name
const std::string & get_name() const
CIOData
helper class to derive from for data that can be loaded and stored to a disk.
Definition iodata.hh:37
type
EXPORT_3D
#define EXPORT_3D
Definition defines3d.hh:45
NS_MIA_BEGIN
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
Definition defines.hh:33
NS_MIA_END
#define NS_MIA_END
conveniance define to end the mia namespace
Definition defines.hh:36
iodata.hh
landmark.hh
P3DLandmark
C3DLandmark::Pointer P3DLandmark
Definition landmark.hh:151
P3DLandmarklist
C3DLandmarklist::Pointer P3DLandmarklist
Pointer type for land mark list.
Definition landmarklist.hh:121