1 | /* --------------- */ |
---|
2 | /* --- nrio1.h --- */ |
---|
3 | /* --------------- */ |
---|
4 | |
---|
5 | /* |
---|
6 | * Copyright (c) 2000-2014, Lionel Lacassagne, All rights reserved |
---|
7 | * Univ Paris Sud XI, CNRS |
---|
8 | */ |
---|
9 | |
---|
10 | #ifndef _NR_IO1_H_ |
---|
11 | #define _NR_IO1_H_ |
---|
12 | |
---|
13 | #ifdef __cplusplus |
---|
14 | #pragma message ("C++") |
---|
15 | extern "C" { |
---|
16 | #endif |
---|
17 | |
---|
18 | #ifdef VERBOSE_PRAGMA |
---|
19 | //#pragma message ("- *** include nrio1.h ***") |
---|
20 | #endif |
---|
21 | |
---|
22 | /* |
---|
23 | * ---------------------- |
---|
24 | * --- display_vector --- |
---|
25 | * ---------------------- |
---|
26 | */ |
---|
27 | |
---|
28 | IMAGE_EXPORT(void) display_bvector (byte *v, long nl,long nh, char *format, char *name); |
---|
29 | IMAGE_EXPORT(void) display_si8vector (sint8 *v, long nl,long nh, char *format, char *name); |
---|
30 | IMAGE_EXPORT(void) display_ui8vector (uint8 *v, long nl,long nh, char *format, char *name); |
---|
31 | IMAGE_EXPORT(void) display_si16vector (sint16 *v, long nl,long nh, char *format, char *name); |
---|
32 | IMAGE_EXPORT(void) display_ui16vector (uint16 *v, long nl,long nh, char *format, char *name); |
---|
33 | IMAGE_EXPORT(void) display_si32vector (sint32 *v, long nl,long nh, char *format, char *name); |
---|
34 | IMAGE_EXPORT(void) display_ui32vector (uint32 *v, long nl,long nh, char *format, char *name); |
---|
35 | IMAGE_EXPORT(void) display_si64vector (sint64 *v, long nl,long nh, char *format, char *name); |
---|
36 | IMAGE_EXPORT(void) display_ui64vector (uint64 *v, long nl,long nh, char *format, char *name); |
---|
37 | |
---|
38 | IMAGE_EXPORT(void) display_f32vector (float32 *v, long nl,long nh, char *format, char *name); |
---|
39 | IMAGE_EXPORT(void) display_f64vector (float64 *v, long nl,long nh, char *format, char *name); |
---|
40 | |
---|
41 | IMAGE_EXPORT(void) display_rgb8vector (rgb8 *v, long nl,long nh, char *format, char *name); |
---|
42 | IMAGE_EXPORT(void) display_rgbx8vector(rgbx8 *v, long nl,long nh, char *format, char *name); |
---|
43 | |
---|
44 | /* |
---|
45 | * ----------------------------- |
---|
46 | * --- display_vector_number --- |
---|
47 | * ----------------------------- |
---|
48 | */ |
---|
49 | |
---|
50 | IMAGE_EXPORT(void) display_bvector_number (byte *v, long nl,long nh, char *format, char *name); |
---|
51 | IMAGE_EXPORT(void) display_si8vector_number (sint8 *v, long nl,long nh, char *format, char *name); |
---|
52 | IMAGE_EXPORT(void) display_ui8vector_number (uint8 *v, long nl,long nh, char *format, char *name); |
---|
53 | IMAGE_EXPORT(void) display_si16vector_number (sint16 *v, long nl,long nh, char *format, char *name); |
---|
54 | IMAGE_EXPORT(void) display_ui16vector_number (uint16 *v, long nl,long nh, char *format, char *name); |
---|
55 | IMAGE_EXPORT(void) display_si32vector_number (sint32 *v, long nl,long nh, char *format, char *name); |
---|
56 | IMAGE_EXPORT(void) display_ui32vector_number (uint32 *v, long nl,long nh, char *format, char *name); |
---|
57 | IMAGE_EXPORT(void) display_si64vector_number (sint64 *v, long nl,long nh, char *format, char *name); |
---|
58 | IMAGE_EXPORT(void) display_ui64vector_number (uint64 *v, long nl,long nh, char *format, char *name); |
---|
59 | |
---|
60 | IMAGE_EXPORT(void) display_f32vector_number (float32 *v, long nl,long nh, char *format, char *name); |
---|
61 | IMAGE_EXPORT(void) display_f64vector_number (float64 *v, long nl,long nh, char *format, char *name); |
---|
62 | |
---|
63 | IMAGE_EXPORT(void) display_rgb8vector_number (rgb8 *v, long nl,long nh, char *format, char *name); |
---|
64 | IMAGE_EXPORT(void) display_rgbx8vector_number(rgbx8 *v, long nl,long nh, char *format, char *name); |
---|
65 | |
---|
66 | /* |
---|
67 | * ------------------------ |
---|
68 | * --- display_vector_T --- |
---|
69 | * ------------------------ |
---|
70 | */ |
---|
71 | |
---|
72 | IMAGE_EXPORT(void) display_si8vector_T (sint8 *v,int i0, int i1, char *format, char *name); |
---|
73 | IMAGE_EXPORT(void) display_ui8vector_T (uint8 *v,int i0, int i1, char *format, char *name); |
---|
74 | IMAGE_EXPORT(void) display_si16vector_T (sint16 *v,int i0, int i1, char *format, char *name); |
---|
75 | IMAGE_EXPORT(void) display_ui16vector_T (uint16 *v,int i0, int i1, char *format, char *name); |
---|
76 | IMAGE_EXPORT(void) display_si32vector_T (sint32 *v,int i0, int i1, char *format, char *name); |
---|
77 | IMAGE_EXPORT(void) display_ui32vector_T (uint32 *v,int i0, int i1, char *format, char *name); |
---|
78 | IMAGE_EXPORT(void) display_si64vector_T (sint64 *v,int i0, int i1, char *format, char *name); |
---|
79 | IMAGE_EXPORT(void) display_ui64vector_T (uint64 *v,int i0, int i1, char *format, char *name); |
---|
80 | |
---|
81 | IMAGE_EXPORT(void) display_f32vector_T (float32 *v,int i0, int i1, char *format, char *name); |
---|
82 | IMAGE_EXPORT(void) display_f64vector_T (float64 *v,int i0, int i1, char *format, char *name); |
---|
83 | |
---|
84 | IMAGE_EXPORT(void) display_rgb8vector_T (rgb8 *v, int i0, int i1, char *format, char *name); |
---|
85 | IMAGE_EXPORT(void) display_rgbx8vector_T(rgbx8 *v, int i0, int i1, char *format, char *name); |
---|
86 | |
---|
87 | /* |
---|
88 | * ------------------------------- |
---|
89 | * --- display_vector_number_T --- |
---|
90 | * ------------------------------- |
---|
91 | */ |
---|
92 | |
---|
93 | IMAGE_EXPORT(void) display_si8vector_number_T (sint8 *v,int i0, int i1, char *format, char *name); |
---|
94 | IMAGE_EXPORT(void) display_ui8vector_number_T (uint8 *v,int i0, int i1, char *format, char *name); |
---|
95 | IMAGE_EXPORT(void) display_si16vector_number_T(sint16 *v,int i0, int i1, char *format, char *name); |
---|
96 | IMAGE_EXPORT(void) display_ui16vector_number_T(uint16 *v,int i0, int i1, char *format, char *name); |
---|
97 | IMAGE_EXPORT(void) display_si32vector_number_T(sint32 *v,int i0, int i1, char *format, char *name); |
---|
98 | IMAGE_EXPORT(void) display_ui32vector_number_T(uint32 *v,int i0, int i1, char *format, char *name); |
---|
99 | IMAGE_EXPORT(void) display_si64vector_number_T(sint64 *v,int i0, int i1, char *format, char *name); |
---|
100 | IMAGE_EXPORT(void) display_ui64vector_number_T(uint64 *v,int i0, int i1, char *format, char *name); |
---|
101 | |
---|
102 | IMAGE_EXPORT(void) display_f32vector_number_T (float32 *v,int i0, int i1, char *format, char *name); |
---|
103 | IMAGE_EXPORT(void) display_f64vector_number_T (float64 *v,int i0, int i1, char *format, char *name); |
---|
104 | |
---|
105 | IMAGE_EXPORT(void) display_rgb8vector_number_T (rgb8 *v,int i0, int i1, char *format, char *name); |
---|
106 | IMAGE_EXPORT(void) display_rgbx8vector_number_T(rgbx8 *v,int i0, int i1, char *format, char *name); |
---|
107 | |
---|
108 | /* |
---|
109 | * ------------------------------- |
---|
110 | * --- display_vector_positive --- |
---|
111 | * ------------------------------- |
---|
112 | */ |
---|
113 | |
---|
114 | void display_ui8vector_positive (uint8 *v, int j0, int j1, int iformat, char *name); |
---|
115 | void display_ui16vector_positive(uint16 *v, int j0, int j1, int iformat, char *name); |
---|
116 | void display_ui32vector_positive(uint32 *v, int j0, int j1, int iformat, char *name); |
---|
117 | |
---|
118 | /* |
---|
119 | * -------------------- |
---|
120 | * --- write_vector --- |
---|
121 | * -------------------- |
---|
122 | */ |
---|
123 | |
---|
124 | IMAGE_EXPORT(void) write_si8vector (sint8 *v,long nl,long nh, char *format, char *filename); |
---|
125 | IMAGE_EXPORT(void) write_ui8vector (uint8 *v,long nl,long nh, char *format, char *filename); |
---|
126 | IMAGE_EXPORT(void) write_si16vector (sint16 *v,long nl,long nh, char *format, char *filename); |
---|
127 | IMAGE_EXPORT(void) write_ui16vector (uint16 *v,long nl,long nh, char *format, char *filename); |
---|
128 | IMAGE_EXPORT(void) write_si32vector (sint32 *v,long nl,long nh, char *format, char *filename); |
---|
129 | IMAGE_EXPORT(void) write_ui32vector (uint32 *v,long nl,long nh, char *format, char *filename); |
---|
130 | IMAGE_EXPORT(void) write_si64vector (sint64 *v,long nl,long nh, char *format, char *filename); |
---|
131 | IMAGE_EXPORT(void) write_ui64vector (uint64 *v,long nl,long nh, char *format, char *filename); |
---|
132 | |
---|
133 | IMAGE_EXPORT(void) write_f32vector (float32 *v,long nl,long nh, char *format, char *filename); |
---|
134 | IMAGE_EXPORT(void) write_f64vector (float64 *v,long nl,long nh, char *format, char *filename); |
---|
135 | |
---|
136 | IMAGE_EXPORT(void) write_rgb8vector (rgb8 *v,long nl,long nh, char *format, char *filename); |
---|
137 | IMAGE_EXPORT(void) write_rgbx8vector(rgbx8 *v,long nl,long nh, char *format, char *filename); |
---|
138 | |
---|
139 | /* |
---|
140 | * ---------------------- |
---|
141 | * --- write_vector_T --- |
---|
142 | * ---------------------- |
---|
143 | */ |
---|
144 | |
---|
145 | IMAGE_EXPORT(void) write_si8vector_T (sint8 *v,long nl,long nh, char *format, char *filename); |
---|
146 | IMAGE_EXPORT(void) write_ui8vector_T (uint8 *v,long nl,long nh, char *format, char *filename); |
---|
147 | IMAGE_EXPORT(void) write_si16vector_T (sint16 *v,long nl,long nh, char *format, char *filename); |
---|
148 | IMAGE_EXPORT(void) write_ui16vector_T (uint16 *v,long nl,long nh, char *format, char *filename); |
---|
149 | IMAGE_EXPORT(void) write_si32vector_T (sint32 *v,long nl,long nh, char *format, char *filename); |
---|
150 | IMAGE_EXPORT(void) write_ui32vector_T (uint32 *v,long nl,long nh, char *format, char *filename); |
---|
151 | IMAGE_EXPORT(void) write_si64vector_T (sint64 *v,long nl,long nh, char *format, char *filename); |
---|
152 | IMAGE_EXPORT(void) write_ui64vector_T (uint64 *v,long nl,long nh, char *format, char *filename); |
---|
153 | |
---|
154 | IMAGE_EXPORT(void) write_f32vector_T (float32 *v,long nl,long nh, char *format, char *filename); |
---|
155 | IMAGE_EXPORT(void) write_f64vector_T (float64 *v,long nl,long nh, char *format, char *filename); |
---|
156 | |
---|
157 | IMAGE_EXPORT(void) write_rgb8vector_T (rgb8 *v,long nl,long nh, char *format, char *filename); |
---|
158 | IMAGE_EXPORT(void) write_rgbx8vector_T(rgbx8 *v,long nl,long nh, char *format, char *filename); |
---|
159 | |
---|
160 | /* |
---|
161 | * --------------------------- |
---|
162 | * --- write_vector_number --- |
---|
163 | * --------------------------- |
---|
164 | */ |
---|
165 | |
---|
166 | IMAGE_EXPORT(void) write_si8vector_number (sint8 *v,long nl,long nh, char *format, char *filename); |
---|
167 | IMAGE_EXPORT(void) write_ui8vector_number (uint8 *v,long nl,long nh, char *format, char *filename); |
---|
168 | IMAGE_EXPORT(void) write_si16vector_number (sint16 *v,long nl,long nh, char *format, char *filename); |
---|
169 | IMAGE_EXPORT(void) write_ui16vector_number (uint16 *v,long nl,long nh, char *format, char *filename); |
---|
170 | IMAGE_EXPORT(void) write_si32vector_number (sint32 *v,long nl,long nh, char *format, char *filename); |
---|
171 | IMAGE_EXPORT(void) write_ui32vector_number (uint32 *v,long nl,long nh, char *format, char *filename); |
---|
172 | IMAGE_EXPORT(void) write_si64vector_number (sint64 *v,long nl,long nh, char *format, char *filename); |
---|
173 | IMAGE_EXPORT(void) write_ui64vector_number (uint64 *v,long nl,long nh, char *format, char *filename); |
---|
174 | |
---|
175 | IMAGE_EXPORT(void) write_f32vector_number (float32 *v,long nl,long nh, char *format, char *filename); |
---|
176 | IMAGE_EXPORT(void) write_f64vector_number (float64 *v,long nl,long nh, char *format, char *filename); |
---|
177 | |
---|
178 | IMAGE_EXPORT(void) write_rgb8vector_number (rgb8 *v,long nl,long nh, char *format, char *filename); |
---|
179 | IMAGE_EXPORT(void) write_rgbx8vector_number(rgbx8 *v,long nl,long nh, char *format, char *filename); |
---|
180 | |
---|
181 | /* |
---|
182 | * ----------------------------- |
---|
183 | * --- write_vector_T_number --- |
---|
184 | * ----------------------------- |
---|
185 | */ |
---|
186 | |
---|
187 | IMAGE_EXPORT(void) write_si8vector_T_number (sint8 *v,long nl,long nh, char *format, char *filename); |
---|
188 | IMAGE_EXPORT(void) write_ui8vector_T_number (uint8 *v,long nl,long nh, char *format, char *filename); |
---|
189 | IMAGE_EXPORT(void) write_si16vector_T_number (sint16 *v,long nl,long nh, char *format, char *filename); |
---|
190 | IMAGE_EXPORT(void) write_ui16vector_T_number (uint16 *v,long nl,long nh, char *format, char *filename); |
---|
191 | IMAGE_EXPORT(void) write_si32vector_T_number (sint32 *v,long nl,long nh, char *format, char *filename); |
---|
192 | IMAGE_EXPORT(void) write_ui32vector_T_number (uint32 *v,long nl,long nh, char *format, char *filename); |
---|
193 | IMAGE_EXPORT(void) write_si64vector_T_number (sint64 *v,long nl,long nh, char *format, char *filename); |
---|
194 | IMAGE_EXPORT(void) write_ui64vector_T_number (uint64 *v,long nl,long nh, char *format, char *filename); |
---|
195 | |
---|
196 | IMAGE_EXPORT(void) write_f32vector_T_number (float32 *v,long nl,long nh, char *format, char *filename); |
---|
197 | IMAGE_EXPORT(void) write_f64vector_T_number (float64 *v,long nl,long nh, char *format, char *filename); |
---|
198 | |
---|
199 | IMAGE_EXPORT(void) write_rgb8vector_T_number (rgb8 *v,long nl,long nh, char *format, char *filename); |
---|
200 | IMAGE_EXPORT(void) write_rgbx8vector_T_number(rgbx8 *v,long nl,long nh, char *format, char *filename); |
---|
201 | |
---|
202 | /* |
---|
203 | * -------------------- |
---|
204 | * --- fread_vector --- |
---|
205 | * -------------------- |
---|
206 | */ |
---|
207 | IMAGE_EXPORT(void) fread_si8vector (char *filename, sint8 *v,long nl,long nh); |
---|
208 | IMAGE_EXPORT(void) fread_ui8vector (char *filename, uint8 *v,long nl,long nh); |
---|
209 | IMAGE_EXPORT(void) fread_si16vector (char *filename, sint16 *v,long nl,long nh); |
---|
210 | IMAGE_EXPORT(void) fread_ui16vector (char *filename, uint16 *v,long nl,long nh); |
---|
211 | IMAGE_EXPORT(void) fread_si32vector (char *filename, sint32 *v,long nl,long nh); |
---|
212 | IMAGE_EXPORT(void) fread_ui32vector (char *filename, uint32 *v,long nl,long nh); |
---|
213 | IMAGE_EXPORT(void) fread_si64vector (char *filename, sint64 *v,long nl,long nh); |
---|
214 | IMAGE_EXPORT(void) fread_ui64vector (char *filename, uint64 *v,long nl,long nh); |
---|
215 | |
---|
216 | IMAGE_EXPORT(void) fread_f32vector (char *filename, float32 *v,long nl,long nh); |
---|
217 | IMAGE_EXPORT(void) fread_f64vector (char *filename, float64 *v,long nl,long nh); |
---|
218 | |
---|
219 | IMAGE_EXPORT(void) fread_rgb8vector (char *filename, rgb8 *v,long nl,long nh); |
---|
220 | IMAGE_EXPORT(void) fread_rgbx8vector(char *filename, rgbx8 *v,long nl,long nh); |
---|
221 | |
---|
222 | /* |
---|
223 | * --------------------- |
---|
224 | * --- fwrite_vector --- |
---|
225 | * --------------------- |
---|
226 | */ |
---|
227 | IMAGE_EXPORT(void) fwrite_si8vector (sint8 *v,long nl,long nh,char *filename); |
---|
228 | IMAGE_EXPORT(void) fwrite_ui8vector (uint8 *v,long nl,long nh,char *filename); |
---|
229 | IMAGE_EXPORT(void) fwrite_si16vector (sint16 *v,long nl,long nh,char *filename); |
---|
230 | IMAGE_EXPORT(void) fwrite_ui16vector (uint16 *v,long nl,long nh,char *filename); |
---|
231 | IMAGE_EXPORT(void) fwrite_si32vector (sint32 *v,long nl,long nh,char *filename); |
---|
232 | IMAGE_EXPORT(void) fwrite_ui32vector (uint32 *v,long nl,long nh,char *filename); |
---|
233 | IMAGE_EXPORT(void) fwrite_si64vector (sint64 *v,long nl,long nh,char *filename); |
---|
234 | IMAGE_EXPORT(void) fwrite_ui64vector (uint64 *v,long nl,long nh,char *filename); |
---|
235 | |
---|
236 | IMAGE_EXPORT(void) fwrite_f32vector (float32 *v,long nl,long nh,char *filename); |
---|
237 | IMAGE_EXPORT(void) fwrite_f64vector (float64 *v,long nl,long nh,char *filename); |
---|
238 | |
---|
239 | IMAGE_EXPORT(void) fwrite_rgb8vector (rgb8 *v,long nl,long nh,char *filename); |
---|
240 | IMAGE_EXPORT(void) fwrite_rgbx8vector(rgbx8 *v,long nl,long nh,char *filename); |
---|
241 | |
---|
242 | #ifdef __cplusplus |
---|
243 | } |
---|
244 | #endif |
---|
245 | |
---|
246 | #endif // _NR_IO1_H_ |
---|