Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
mia
2d
morphshape.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_2d_morphshape_hh
22
#define mia_2d_morphshape_hh
23
24
#include <
mia/2d/shape.hh
>
25
26
NS_MIA_BEGIN
27
28
38
class
EXPORT_2D
C2DMorphShape
:
public
CProductBase
{
39
public
:
41
typedef
C2DImage
plugin_data
;
42
44
typedef
C2DMorphShape
plugin_type
;
45
47
static
const
char
*
type_descr
;
48
50
typedef
std::shared_ptr<C2DMorphShape>
Pointer
;
51
53
typedef
C2DShape::value_type
value_type
;
54
56
C2DMorphShape
();
57
58
66
C2DMorphShape
(
P2DShape
foreground_mask,
P2DShape
background_mask);
67
68
75
void
add_pixel(
const
value_type
& pixel,
bool
foreground);
76
84
void
add_pixel(
int
x,
int
y,
bool
foreground);
85
86
88
const
C2DShape
& get_foreground_mask()
const
;
89
91
const
C2DShape
& get_background_mask()
const
;
92
94
C2DMorphShape
rotate_by_90()
const
;
95
private
:
96
97
P2DShape
m_foreground_mask;
98
P2DShape
m_background_mask;
99
};
100
102
typedef
C2DMorphShape::Pointer
P2DMorphShape
;
103
104
113
size_t
EXPORT_2D
morph_hit_and_miss_2d
(
C2DBitImage
& target,
const
C2DBitImage
& source,
const
C2DMorphShape
& shape);
114
123
size_t
EXPORT_2D
morph_thinning_2d
(
C2DBitImage
& target,
const
C2DBitImage
& source,
const
C2DMorphShape
& shape);
124
125
126
NS_MIA_END
127
128
#endif
129
Generated on Tue Oct 15 2013 13:56:37 by
1.8.4