$extrastylesheet
Olena
User documentation 2.1
An Image Processing Platform
Milena
Getting started
API Reference Manual
All Classes
Examples
Demos
Publications
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
pixter1d.hh
1
// Copyright (C) 2007, 2008, 2009, 2012, 2013 EPITA Research and
2
// Development Laboratory (LRDE)
3
//
4
// This file is part of Olena.
5
//
6
// Olena is free software: you can redistribute it and/or modify it under
7
// the terms of the GNU General Public License as published by the Free
8
// Software Foundation, version 2 of the License.
9
//
10
// Olena is distributed in the hope that it will be useful,
11
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
// General Public License for more details.
14
//
15
// You should have received a copy of the GNU General Public License
16
// along with Olena. If not, see <http://www.gnu.org/licenses/>.
17
//
18
// As a special exception, you may use this file as part of a free
19
// software project without restriction. Specifically, if other files
20
// instantiate templates or use macros or inline functions from this
21
// file, or you compile this file and link it with other files to produce
22
// an executable, this file does not by itself cause the resulting
23
// executable to be covered by the GNU General Public License. This
24
// exception does not however invalidate any other reasons why the
25
// executable file might be covered by the GNU General Public License.
26
27
#ifndef MLN_CORE_PIXTER1D_HH
28
# define MLN_CORE_PIXTER1D_HH
29
32
33
# include <mln/core/internal/pixel_iterator_base.hh>
34
# include <mln/core/alias/point1d.hh>
35
# include <mln/geom/size1d.hh>
36
37
namespace
mln
38
{
39
40
/*------------------.
41
| fwd_pixter1d<I>. |
42
`------------------*/
43
48
template
<
typename
I>
49
class
fwd_pixter1d
:
50
public
internal::forward_pixel_iterator_base_
< I, fwd_pixter1d<I> >
51
{
52
typedef
internal::forward_pixel_iterator_base_< I, fwd_pixter1d<I>
>
super_
;
53
54
public
:
56
typedef
I
image
;
57
60
fwd_pixter1d
(I&
image
);
61
64
void
next_
();
66
};
67
68
69
/*------------------.
70
| bkd_pixter1d<I>. |
71
`------------------*/
72
77
template
<
typename
I>
78
class
bkd_pixter1d
:
79
public
internal::backward_pixel_iterator_base_
< I, bkd_pixter1d<I> >
80
{
81
typedef
internal::backward_pixel_iterator_base_< I, bkd_pixter1d<I>
>
super_
;
82
83
public
:
85
typedef
I
image
;
86
89
bkd_pixter1d
(I&
image
);
90
93
void
next_
();
95
};
96
97
98
99
#ifndef MLN_INCLUDE_ONLY
100
101
/*------------------.
102
| fwd_pixter1d<I>. |
103
`------------------*/
104
105
template
<
typename
I>
106
inline
107
fwd_pixter1d<I>::fwd_pixter1d
(I& image)
108
: super_(image)
109
{
110
mln_precondition(image.is_valid());
111
}
112
113
template
<
typename
I>
114
inline
115
void
116
fwd_pixter1d<I>::next_
()
117
{
118
++this->value_ptr_;
119
}
120
121
122
/*------------------.
123
| bkd_pixter1d<I>. |
124
`------------------*/
125
126
template
<
typename
I>
127
inline
128
bkd_pixter1d<I>::bkd_pixter1d
(I& image)
129
: super_(image)
130
{
131
mln_precondition(image.is_valid());
132
}
133
134
template
<
typename
I>
135
inline
136
void
137
bkd_pixter1d<I>::next_
()
138
{
139
--this->value_ptr_;
140
}
141
142
#endif // ! MLN_INCLUDE_ONLY
143
144
}
// end of namespace mln
145
146
#endif // ! MLN_CORE_PIXTER1D_HH
mln
core
pixter1d.hh
Copyright (C) 2012 EPITA Research and Development Laboratory (LRDE)