Basic Image AlgorithmS Library
2.8.0
Main Page
Related Pages
Modules
Classes
Examples
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
Filter
Dilation.hh
1
/*
2
This file is part of the BIAS library (Basic ImageAlgorithmS).
3
4
Copyright (C) 2003-2009 (see file CONTACT for details)
5
Multimediale Systeme der Informationsverarbeitung
6
Institut fuer Informatik
7
Christian-Albrechts-Universitaet Kiel
8
9
10
BIAS is free software; you can redistribute it and/or modify
11
it under the terms of the GNU Lesser General Public License as published by
12
the Free Software Foundation; either version 2.1 of the License, or
13
(at your option) any later version.
14
15
BIAS is distributed in the hope that it will be useful,
16
but WITHOUT ANY WARRANTY; without even the implied warranty of
17
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
GNU Lesser General Public License for more details.
19
20
You should have received a copy of the GNU Lesser General Public License
21
along with BIAS; if not, write to the Free Software
22
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23
*/
24
#ifndef _BIAS_MOPRH_DILATION_HH_
25
#define _BIAS_MOPRH_DILATION_HH_
26
#include "./Morphology.hh"
27
28
namespace
BIAS {
29
30
/** @class Dilation
31
@ingroup g_filter
32
@brief Dilation operator for binary images (black and white)
33
34
Dilation sets all pixel to 255, which have a neighboring pixel !=0
35
It is also possible to dilate the image with a real grey-value image with
36
Dilate3Fast().
37
Fastest ist TBH_valid and kernelsize=3
38
or call Dilate3Fast() directly.
39
@author grest, Oct. 2004
40
*/
41
42
template
<
class
InputStorageType,
class
OutputStorageType>
43
class
BIASFilter_EXPORT
Dilation
:
public
Morphology
<InputStorageType, OutputStorageType>
44
{
45
public
:
46
Dilation
() {}
47
Dilation
(
const
Dilation<InputStorageType, OutputStorageType>
& other);
48
virtual
~Dilation
() {}
49
50
/** Does the dilation. ROI ignored, but set if TBH_valid
51
*/
52
virtual
int
Filter(
const
Image<InputStorageType>
& src,
53
Image<OutputStorageType>
& dst);
54
55
/** dilate with square kernel filled with 255
56
@author Felix Woelk (22/04/2002)
57
@status alpha */
58
int
Dilate(
const
Image<InputStorageType>
& Source,
59
Image<OutputStorageType>
& Destination,
60
int
KernelSize = 3);
61
62
/** Very fast dilate with 3x3 mask, all values, which are not
63
not zero, are treated as foreground.
64
The src img is dilated with pixels from orig.
65
Therefore src and orig MUST NOT be the same,
66
set orig to a 255 image if u have no original grey image.
67
The border of one pixel is always deleted (set to zero).
68
default is 8-neighborhood.
69
src and dest must NOT be the same!
70
@author Daniel Grest, Sept. 2002
71
@status tested */
72
int
Dilate3Fast(
const
Image<InputStorageType>
& src,
73
const
Image<InputStorageType>
& orig,
74
Image<OutputStorageType>
& dest,
75
bool
Neighbor4=
false
);
76
77
/** Very fast dilate with 3x3 mask, all values, which are not
78
not zero, are treated as foreground.
79
src and dest must NOT be the same!
80
@author woelk, grest 04/2006 */
81
int
Dilate3Fast(
const
Image<InputStorageType>
& src,
82
Image<OutputStorageType>
& dest,
83
bool
Neighbor4 =
false
);
84
85
/** @brief If DilateLower=true then the lower value (except 0) overwrites
86
* the higher otherwise the standard algorithm (higher value
87
* overrides lower) is done.
88
* @ author streckel 10/06 */
89
void
SetDilateLower
(
bool
dl) {
90
DilateLower_ = dl; }
91
92
protected
:
93
virtual
void
GetBordersValid_(
int
& border_x,
int
& border_y)
const
;
94
95
using
Morphology<InputStorageType, OutputStorageType>::_FilterBorderHandling
;
96
using
Morphology<InputStorageType, OutputStorageType>::TBH_valid
;
97
using
Morphology<InputStorageType, OutputStorageType>::TBH_same
;
98
using
Morphology<InputStorageType, OutputStorageType>::TBH_full
;
99
using
Morphology<InputStorageType, OutputStorageType>::kernelSize_
;
100
101
bool
DilateLower_
;
102
};
103
104
}
// namespace
105
#endif
106
BIAS::Dilation::SetDilateLower
void SetDilateLower(bool dl)
If DilateLower=true then the lower value (except 0) overwrites the higher otherwise the standard algo...
Definition:
Dilation.hh:89
BIAS::Dilation::Dilation
Dilation()
Definition:
Dilation.hh:46
BIAS::Dilation
Dilation operator for binary images (black and white)
Definition:
Dilation.hh:43
BIAS::Dilation::DilateLower_
bool DilateLower_
Definition:
Dilation.hh:101
BIAS::Dilation::~Dilation
virtual ~Dilation()
Definition:
Dilation.hh:48
BIAS::Morphology
base class for Erosion, Dilation, and single Deletion
Definition:
Morphology.hh:41
BIAS::Image< InputStorageType >
Generated on Tue Feb 6 2018 02:01:34 for Basic Image AlgorithmS Library by
1.8.5