Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
mia
core
core/shape.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
22
#ifndef mia_core_shape_hh
23
#define mia_core_shape_hh
24
25
#include <set>
26
27
#include <
mia/core/product_base.hh
>
28
#include <
mia/core/type_traits.hh
>
29
#include <
mia/core/utils.hh
>
30
31
#ifndef EXPORT_SHAPE
32
# ifdef WIN32
33
# define EXPORT_SHAPE __declspec(dllimport)
34
# else
35
# define EXPORT_SHAPE
36
# endif
37
#endif
38
39
NS_MIA_BEGIN
40
41
42
struct
EXPORT_CORE
shape_type
{
43
static
const
char
*
type_descr
;
44
};
45
46
47
62
template
<
template
<
typename
>
class
T,
typename
M>
63
class
EXPORT_SHAPE
TShape
:
public
CProductBase
{
64
public
:
66
typedef
shape_type
plugin_type
;
67
69
typedef
typename
M::Super
plugin_data
;
70
74
typedef
std::set< T<int>, less_then<T<int> > >
Flat
;
75
77
typedef
T<int>
value_type
;
78
80
typedef
typename
Flat::const_iterator
const_iterator
;
81
83
typedef
M
Mask
;
84
86
typedef
T<unsigned int>
Size
;
87
89
TShape
();
90
92
const_iterator
begin()
const
;
93
95
const_iterator
end()
const
;
96
98
Mask
get_mask()
const
;
99
101
Size
get_size()
const
;
102
104
typename
Flat::size_type size()
const
;
105
109
void
insert(
const
T<int>& p);
110
116
bool
has_location(
const
T<int>& p)
const
;
117
private
:
118
Flat
m_shape;
119
T<int> m_size;
120
};
121
122
NS_MIA_END
123
124
#endif
Generated on Tue Oct 15 2013 13:56:37 by
1.8.4