Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
mia
2d
SegFrame.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 SegFrame_h
22
#define SegFrame_h
23
24
#include <vector>
25
#include <
mia/2d/SegStar.hh
>
26
#include <
mia/2d/SegSection.hh
>
27
#include <
mia/2d/image.hh
>
28
29
NS_MIA_BEGIN
30
39
class
EXPORT_2D
CSegFrame
{
40
public
:
42
typedef
std::vector<CSegSection>
Sections
;
43
47
typedef
std::pair<float, float>
Statistics
;
48
50
typedef
std::vector<Statistics>
SectionsStats
;
51
52
53
CSegFrame
();
54
61
CSegFrame
(
const
std::string& image,
const
CSegStar
& star,
const
Sections
& sections);
62
68
CSegFrame
(
const
xmlpp::Node& node,
int
version);
69
71
const
std::string& get_imagename()
const
;
72
76
void
set_imagename(
const
std::string& name);
77
82
void
rename_base(
const
std::string& new_base);
83
85
const
Sections
& get_sections()
const
;
86
91
void
set_image(
P2DImage
image);
92
96
const
CSegStar
& get_star()
const
;
97
99
const
C2DBoundingBox
get_boundingbox()
const
;
100
101
107
void
write(xmlpp::Node& node,
int
version)
const
;
108
115
void
shift(
const
C2DFVector
& delta,
const
std::string& cropped_file);
116
117
122
void
transform(
const
C2DTransformation
& t);
123
128
void
inv_transform(
const
C2DTransformation
& t);
129
135
float
get_hausdorff_distance(
const
CSegFrame
& other)
const
;
136
137
146
C2DUBImage
get_section_masks(
const
C2DBounds
& size)
const
;
147
152
C2DUBImage
get_section_masks()
const
;
153
164
C2DUBImage
get_section_masks(
size_t
n_sections)
const
;
165
166
173
SectionsStats
get_stats(
const
C2DUBImage
& mask)
const
;
174
181
SectionsStats
get_stats(
size_t
n_sections)
const
;
182
186
size_t
get_nsections()
const
;
187
191
float
get_quality()
const
;
192
196
float
get_brightness()
const
;
197
201
float
get_contrast()
const
;
202
203
private
:
204
void
load_image
()
const
;
205
206
bool
m_has_star;
207
CSegStar
m_star;
208
Sections
m_sections;
209
std::string m_filename;
210
mutable
P2DImage
m_image;
211
212
float
m_quality;
213
float
m_brightness;
214
float
m_contrast;
215
int
m_version;
216
};
217
218
NS_MIA_END
219
220
#endif
221
Generated on Tue Oct 15 2013 13:56:37 by
1.8.4