Leptonica
1.82.0
Image processing and image analysis suite
array.h
Go to the documentation of this file.
1
/*====================================================================*
2
- Copyright (C) 2001 Leptonica. All rights reserved.
3
-
4
- Redistribution and use in source and binary forms, with or without
5
- modification, are permitted provided that the following conditions
6
- are met:
7
- 1. Redistributions of source code must retain the above copyright
8
- notice, this list of conditions and the following disclaimer.
9
- 2. Redistributions in binary form must reproduce the above
10
- copyright notice, this list of conditions and the following
11
- disclaimer in the documentation and/or other materials
12
- provided with the distribution.
13
-
14
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
15
- ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
16
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
17
- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANY
18
- CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19
- EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20
- PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
21
- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
22
- OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
23
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25
*====================================================================*/
26
27
#ifndef LEPTONICA_ARRAY_H
28
#define LEPTONICA_ARRAY_H
29
62
/*------------------------------------------------------------------------*
63
* Array Structs *
64
*------------------------------------------------------------------------*/
65
67
#define NUMA_VERSION_NUMBER 1
68
70
struct
Numa
71
{
72
l_int32
nalloc
;
73
l_int32
n
;
74
l_int32
refcount
;
75
l_float32
startx
;
76
l_float32
delx
;
77
l_float32 *
array
;
78
};
79
typedef
struct
Numa
NUMA
;
80
82
struct
Numaa
83
{
84
l_int32
nalloc
;
85
l_int32
n
;
86
struct
Numa
**
numa
;
87
};
88
typedef
struct
Numaa
NUMAA
;
89
91
#define DNA_VERSION_NUMBER 1
92
94
struct
L_Dna
95
{
96
l_int32
nalloc
;
97
l_int32
n
;
98
l_int32
refcount
;
99
l_float64
startx
;
100
l_float64
delx
;
101
l_float64 *
array
;
102
};
103
typedef
struct
L_Dna
L_DNA
;
104
106
struct
L_Dnaa
107
{
108
l_int32
nalloc
;
109
l_int32
n
;
110
struct
L_Dna
**
dna
;
111
};
112
typedef
struct
L_Dnaa
L_DNAA
;
113
114
struct
L_DnaHash
115
{
116
l_int32 nbuckets;
117
l_int32
initsize
;
118
struct
L_Dna
**
dna
;
119
};
120
typedef
struct
L_DnaHash
L_DNAHASH
;
121
123
#define SARRAY_VERSION_NUMBER 1
124
126
struct
Sarray
127
{
128
l_int32
nalloc
;
129
l_int32
n
;
130
l_int32
refcount
;
131
char
**
array
;
132
};
133
typedef
struct
Sarray
SARRAY
;
134
136
struct
L_Bytea
137
{
138
size_t
nalloc
;
139
size_t
size
;
140
l_int32
refcount
;
141
l_uint8 *
data
;
142
};
143
typedef
struct
L_Bytea
L_BYTEA
;
144
145
146
/*------------------------------------------------------------------------*
147
* Array flags *
148
*------------------------------------------------------------------------*/
150
enum
{
151
L_LINEAR_INTERP
= 1,
152
L_QUADRATIC_INTERP
= 2
153
};
154
156
enum
{
157
L_CONTINUED_BORDER
= 1,
158
L_SLOPE_BORDER
= 2,
159
L_MIRRORED_BORDER
= 3
160
};
161
163
enum
{
164
L_INTEGER_VALUE
= 1,
165
L_FLOAT_VALUE
= 2
166
};
167
168
#endif
/* LEPTONICA_ARRAY_H */
L_LINEAR_INTERP
@ L_LINEAR_INTERP
Definition:
array.h:151
L_QUADRATIC_INTERP
@ L_QUADRATIC_INTERP
Definition:
array.h:152
L_FLOAT_VALUE
@ L_FLOAT_VALUE
Definition:
array.h:165
L_INTEGER_VALUE
@ L_INTEGER_VALUE
Definition:
array.h:164
L_CONTINUED_BORDER
@ L_CONTINUED_BORDER
Definition:
array.h:157
L_MIRRORED_BORDER
@ L_MIRRORED_BORDER
Definition:
array.h:159
L_SLOPE_BORDER
@ L_SLOPE_BORDER
Definition:
array.h:158
L_Bytea
Definition:
array.h:137
L_Bytea::size
size_t size
Definition:
array.h:139
L_Bytea::nalloc
size_t nalloc
Definition:
array.h:138
L_Bytea::refcount
l_int32 refcount
Definition:
array.h:140
L_Bytea::data
l_uint8 * data
Definition:
array.h:141
L_DnaHash
Definition:
array.h:115
L_DnaHash::dna
struct L_Dna ** dna
Definition:
array.h:118
L_DnaHash::initsize
l_int32 initsize
Definition:
array.h:117
L_Dna
Definition:
array.h:95
L_Dna::startx
l_float64 startx
Definition:
array.h:99
L_Dna::refcount
l_int32 refcount
Definition:
array.h:98
L_Dna::n
l_int32 n
Definition:
array.h:97
L_Dna::array
l_float64 * array
Definition:
array.h:101
L_Dna::nalloc
l_int32 nalloc
Definition:
array.h:96
L_Dna::delx
l_float64 delx
Definition:
array.h:100
L_Dnaa
Definition:
array.h:107
L_Dnaa::n
l_int32 n
Definition:
array.h:109
L_Dnaa::nalloc
l_int32 nalloc
Definition:
array.h:108
L_Dnaa::dna
struct L_Dna ** dna
Definition:
array.h:110
Numa
Definition:
array.h:71
Numa::startx
l_float32 startx
Definition:
array.h:75
Numa::delx
l_float32 delx
Definition:
array.h:76
Numa::nalloc
l_int32 nalloc
Definition:
array.h:72
Numa::array
l_float32 * array
Definition:
array.h:77
Numa::refcount
l_int32 refcount
Definition:
array.h:74
Numa::n
l_int32 n
Definition:
array.h:73
Numaa
Definition:
array.h:83
Numaa::numa
struct Numa ** numa
Definition:
array.h:86
Numaa::n
l_int32 n
Definition:
array.h:85
Numaa::nalloc
l_int32 nalloc
Definition:
array.h:84
Sarray
Definition:
array.h:127
Sarray::refcount
l_int32 refcount
Definition:
array.h:130
Sarray::nalloc
l_int32 nalloc
Definition:
array.h:128
Sarray::array
char ** array
Definition:
array.h:131
Sarray::n
l_int32 n
Definition:
array.h:129
src
array.h
Generated by
1.9.1