Leptonica
1.77.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
51
/*------------------------------------------------------------------------*
52
* Array Structs *
53
*------------------------------------------------------------------------*/
54
56
#define NUMA_VERSION_NUMBER 1
57
59
struct
Numa
60
{
61
l_int32
nalloc
;
62
l_int32
n
;
63
l_int32
refcount
;
64
l_float32
startx
;
65
l_float32
delx
;
66
l_float32 *
array
;
67
};
68
typedef
struct
Numa
NUMA
;
69
71
struct
Numaa
72
{
73
l_int32
nalloc
;
74
l_int32
n
;
75
struct
Numa
**
numa
;
76
};
77
typedef
struct
Numaa
NUMAA
;
78
80
#define DNA_VERSION_NUMBER 1
81
83
struct
L_Dna
84
{
85
l_int32
nalloc
;
86
l_int32
n
;
87
l_int32
refcount
;
88
l_float64
startx
;
89
l_float64
delx
;
90
l_float64 *
array
;
91
};
92
typedef
struct
L_Dna
L_DNA
;
93
95
struct
L_Dnaa
96
{
97
l_int32
nalloc
;
98
l_int32
n
;
99
struct
L_Dna
**
dna
;
100
};
101
typedef
struct
L_Dnaa
L_DNAA
;
102
104
struct
L_DnaHash
105
{
106
l_int32 nbuckets;
107
l_int32
initsize
;
108
struct
L_Dna
**
dna
;
109
};
110
typedef
struct
L_DnaHash
L_DNAHASH
;
111
113
#define SARRAY_VERSION_NUMBER 1
114
116
struct
Sarray
117
{
118
l_int32
nalloc
;
119
l_int32
n
;
120
l_int32
refcount
;
121
char
**
array
;
122
};
123
typedef
struct
Sarray
SARRAY
;
124
126
struct
L_Bytea
127
{
128
size_t
nalloc
;
129
size_t
size
;
130
l_int32
refcount
;
131
l_uint8 *
data
;
132
};
133
typedef
struct
L_Bytea
L_BYTEA
;
134
135
136
/*------------------------------------------------------------------------*
137
* Array flags *
138
*------------------------------------------------------------------------*/
140
enum
{
141
L_LINEAR_INTERP
= 1,
142
L_QUADRATIC_INTERP
= 2
143
};
144
146
enum
{
147
L_CONTINUED_BORDER
= 1,
148
L_SLOPE_BORDER
= 2,
149
L_MIRRORED_BORDER
= 3
150
};
151
153
enum
{
154
L_INTEGER_VALUE
= 1,
155
L_FLOAT_VALUE
= 2
156
};
157
158
159
#endif
/* LEPTONICA_ARRAY_H */
L_DnaHash
Definition:
array.h:104
L_Dna::delx
l_float64 delx
Definition:
array.h:89
L_Dna::n
l_int32 n
Definition:
array.h:86
Numaa::numa
struct Numa ** numa
Definition:
array.h:75
L_CONTINUED_BORDER
Definition:
array.h:147
L_Dna::refcount
l_int32 refcount
Definition:
array.h:87
L_Dna::nalloc
l_int32 nalloc
Definition:
array.h:85
L_DnaHash::dna
struct L_Dna ** dna
Definition:
array.h:108
Numaa::nalloc
l_int32 nalloc
Definition:
array.h:73
Numa::refcount
l_int32 refcount
Definition:
array.h:63
Numa::startx
l_float32 startx
Definition:
array.h:64
L_MIRRORED_BORDER
Definition:
array.h:149
Numa::nalloc
l_int32 nalloc
Definition:
array.h:61
L_Dna
Definition:
array.h:83
Numa::delx
l_float32 delx
Definition:
array.h:65
L_Dnaa
Definition:
array.h:95
L_Bytea::size
size_t size
Definition:
array.h:129
L_Bytea::refcount
l_int32 refcount
Definition:
array.h:130
Sarray
Definition:
array.h:116
Numa
Definition:
array.h:59
L_Dnaa::n
l_int32 n
Definition:
array.h:98
Sarray::n
l_int32 n
Definition:
array.h:119
L_INTEGER_VALUE
Definition:
array.h:154
L_Dnaa::dna
struct L_Dna ** dna
Definition:
array.h:99
L_Bytea::data
l_uint8 * data
Definition:
array.h:131
L_Dnaa::nalloc
l_int32 nalloc
Definition:
array.h:97
Sarray::refcount
l_int32 refcount
Definition:
array.h:120
Numa::array
l_float32 * array
Definition:
array.h:66
L_SLOPE_BORDER
Definition:
array.h:148
Numaa
Definition:
array.h:71
L_QUADRATIC_INTERP
Definition:
array.h:142
L_Dna::startx
l_float64 startx
Definition:
array.h:88
Sarray::nalloc
l_int32 nalloc
Definition:
array.h:118
Numaa::n
l_int32 n
Definition:
array.h:74
Numa::n
l_int32 n
Definition:
array.h:62
L_DnaHash::initsize
l_int32 initsize
Definition:
array.h:107
L_LINEAR_INTERP
Definition:
array.h:141
Sarray::array
char ** array
Definition:
array.h:121
L_FLOAT_VALUE
Definition:
array.h:155
L_Bytea::nalloc
size_t nalloc
Definition:
array.h:128
L_Dna::array
l_float64 * array
Definition:
array.h:90
L_Bytea
Definition:
array.h:126
src
array.h
Generated by
1.8.14