Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
mia
3d
landmark.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_landmarks_hh
22
#define mia_3d_landmarks_hh
23
24
#include <memory>
25
#include <vector>
26
#include <boost/filesystem.hpp>
27
#include <
mia/3d/defines3d.hh
>
28
#include <
mia/3d/camera.hh
>
29
#include <
mia/2d/image.hh
>
30
31
NS_MIA_BEGIN
32
40
class
EXPORT_3D
C3DLandmark
{
41
public
:
42
44
typedef
std::shared_ptr<C3DLandmark>
Pointer
;
45
51
C3DLandmark
(
const
std::string& name,
const
C3DFVector
& location);
52
57
C3DLandmark
(
const
std::string& name);
58
60
C3DLandmark
(
const
C3DLandmark
& other) =
default
;
61
62
66
const
std::string& get_name()
const
;
67
69
const
C3DFVector
& get_location()
const
;
70
71
73
const
C3DCamera
& get_view()
const
;
74
75
77
const
std::string& get_picture_file()
const
;
78
85
P2DImage
get_picture(
const
boost::filesystem::path& root_path)
const
;
86
88
float
get_isovalue()
const
;
89
90
95
void
set_location(
const
C3DFVector
& pos);
96
100
void
set_view(
const
C3DCamera
& view);
101
106
void
set_picture_file(
const
std::string& picfile);
107
112
void
set_isovalue(
float
value);
113
115
bool
has_location()
const
;
116
117
void
print(std::ostream& os)
const
;
118
119
private
:
120
// required attributes
121
std::string m_name;
122
bool
m_has_location;
123
C3DFVector
m_location;
124
125
126
// additional attributes
127
std::string m_picfile;
128
float
m_isovalue;
129
C3DCamera
m_view;
130
131
mutable
P2DImage
m_picture;
132
};
133
134
bool
EXPORT_3D
operator ==
(
const
C3DLandmark
& a,
const
C3DLandmark
& b);
135
136
inline
137
std::ostream&
operator <<
(std::ostream& os,
const
C3DLandmark
& lm)
138
{
139
lm.
print
(os);
140
return
os;
141
}
142
143
typedef
C3DLandmark::Pointer
P3DLandmark
;
144
145
NS_MIA_END
146
147
#endif
148
Generated on Tue Oct 15 2013 13:56:37 by
1.8.4