[772] | 1 | /* --------------- */ |
---|
| 2 | /* --- nrio1.c --- */ |
---|
| 3 | /* --------------- */ |
---|
| 4 | |
---|
| 5 | /* |
---|
| 6 | * Copyright (c) 2000-2014, Lionel Lacassagne, All rights reserved |
---|
| 7 | * Univ Paris Sud XI, CNRS |
---|
| 8 | * |
---|
| 9 | * Distributed under the Boost Software License, Version 1.0 |
---|
| 10 | * see accompanying file LICENSE.txt or copy it at |
---|
| 11 | * http://www.boost.org/LICENSE_1_0.txt |
---|
| 12 | */ |
---|
| 13 | |
---|
| 14 | #include <stdio.h> |
---|
| 15 | #include <stddef.h> |
---|
| 16 | #include <stdlib.h> |
---|
| 17 | |
---|
| 18 | #include "nrc_os_config.h" |
---|
| 19 | #include "mypredef.h" |
---|
| 20 | #include "nrtype.h" |
---|
| 21 | #include "nrdef.h" |
---|
| 22 | #include "nrmacro.h" |
---|
| 23 | #include "nrkernel.h" |
---|
| 24 | |
---|
| 25 | #include "nralloc1.h" |
---|
| 26 | #include "nrio0.h" |
---|
| 27 | #include "nrio1.h" |
---|
| 28 | |
---|
| 29 | /* |
---|
| 30 | * ---------------------- |
---|
| 31 | * --- display_vector --- |
---|
| 32 | * ---------------------- |
---|
| 33 | */ |
---|
| 34 | |
---|
| 35 | /* ------------------------------------------------------------------------------- */ |
---|
| 36 | IMAGE_EXPORT(void) display_bvector(byte *v,long nl,long nh, char *format, char *name) |
---|
| 37 | /* ------------------------------------------------------------------------------- */ |
---|
| 38 | { |
---|
| 39 | long i; |
---|
| 40 | |
---|
| 41 | if(name != NULL) printf("%s", name); |
---|
| 42 | |
---|
| 43 | for(i=nl; i<=nh; i++) { |
---|
| 44 | printf(format, v[i]); |
---|
| 45 | } |
---|
| 46 | printf("\n"); |
---|
| 47 | } |
---|
| 48 | /* ---------------------------------------------------------------------------------- */ |
---|
| 49 | IMAGE_EXPORT(void) display_si8vector(sint8 *v,long nl,long nh, char *format, char *name) |
---|
| 50 | /* ---------------------------------------------------------------------------------- */ |
---|
| 51 | { |
---|
| 52 | long i; |
---|
| 53 | |
---|
| 54 | if(name != NULL) printf("%s", name); |
---|
| 55 | |
---|
| 56 | for(i=nl; i<=nh; i++) { |
---|
| 57 | printf(format, v[i]); |
---|
| 58 | } |
---|
| 59 | printf("\n"); |
---|
| 60 | } |
---|
| 61 | /* ---------------------------------------------------------------------------------- */ |
---|
| 62 | IMAGE_EXPORT(void) display_ui8vector(uint8 *v,long nl,long nh, char *format, char *name) |
---|
| 63 | /* ---------------------------------------------------------------------------------- */ |
---|
| 64 | { |
---|
| 65 | long i; |
---|
| 66 | |
---|
| 67 | if(name != NULL) printf("%s", name); |
---|
| 68 | |
---|
| 69 | for(i=nl; i<=nh; i++) { |
---|
| 70 | printf(format, v[i]); |
---|
| 71 | } |
---|
| 72 | printf("\n"); |
---|
| 73 | } |
---|
| 74 | /* ------------------------------------------------------------------------------------ */ |
---|
| 75 | IMAGE_EXPORT(void) display_si16vector(sint16 *v,long nl,long nh, char *format, char *name) |
---|
| 76 | /* ------------------------------------------------------------------------------------ */ |
---|
| 77 | { |
---|
| 78 | long i; |
---|
| 79 | |
---|
| 80 | if(name != NULL) printf("%s", name); |
---|
| 81 | |
---|
| 82 | for(i=nl; i<=nh; i++) { |
---|
| 83 | printf(format, v[i]); |
---|
| 84 | } |
---|
| 85 | printf("\n"); |
---|
| 86 | } |
---|
| 87 | /* ------------------------------------------------------------------------------------- */ |
---|
| 88 | IMAGE_EXPORT(void) display_ui16vector(uint16 *v,long nl,long nh, char *format, char *name) |
---|
| 89 | /* ------------------------------------------------------------------------------------- */ |
---|
| 90 | { |
---|
| 91 | long i; |
---|
| 92 | |
---|
| 93 | if(name != NULL) printf("%s", name); |
---|
| 94 | |
---|
| 95 | for(i=nl; i<=nh; i++) { |
---|
| 96 | printf(format, v[i]); |
---|
| 97 | } |
---|
| 98 | printf("\n"); |
---|
| 99 | } |
---|
| 100 | /* ------------------------------------------------------------------------------------ */ |
---|
| 101 | IMAGE_EXPORT(void) display_si32vector(sint32 *v,long nl,long nh, char *format, char *name) |
---|
| 102 | /* ------------------------------------------------------------------------------------ */ |
---|
| 103 | { |
---|
| 104 | long i; |
---|
| 105 | |
---|
| 106 | if(name != NULL) printf("%s", name); |
---|
| 107 | |
---|
| 108 | for(i=nl; i<=nh; i++) { |
---|
| 109 | printf(format, v[i]); |
---|
| 110 | } |
---|
| 111 | printf("\n"); |
---|
| 112 | } |
---|
| 113 | /* ------------------------------------------------------------------------------------ */ |
---|
| 114 | IMAGE_EXPORT(void) display_ui32vector(uint32 *v,long nl,long nh, char *format, char *name) |
---|
| 115 | /* ------------------------------------------------------------------------------------ */ |
---|
| 116 | { |
---|
| 117 | long i; |
---|
| 118 | |
---|
| 119 | if(name != NULL) printf("%s", name); |
---|
| 120 | |
---|
| 121 | for(i=nl; i<=nh; i++) { |
---|
| 122 | printf(format, v[i]); |
---|
| 123 | } |
---|
| 124 | printf("\n"); |
---|
| 125 | } |
---|
| 126 | /* ------------------------------------------------------------------------------------ */ |
---|
| 127 | IMAGE_EXPORT(void) display_si64vector(sint64 *v,long nl,long nh, char *format, char *name) |
---|
| 128 | /* ------------------------------------------------------------------------------------ */ |
---|
| 129 | { |
---|
| 130 | long i; |
---|
| 131 | |
---|
| 132 | if(name != NULL) printf("%s", name); |
---|
| 133 | |
---|
| 134 | for(i=nl; i<=nh; i++) { |
---|
| 135 | printf(format, v[i]); |
---|
| 136 | } |
---|
| 137 | printf("\n"); |
---|
| 138 | } |
---|
| 139 | /* ------------------------------------------------------------------------------------ */ |
---|
| 140 | IMAGE_EXPORT(void) display_ui64vector(uint64 *v,long nl,long nh, char *format, char *name) |
---|
| 141 | /* ------------------------------------------------------------------------------------ */ |
---|
| 142 | { |
---|
| 143 | long i; |
---|
| 144 | |
---|
| 145 | if(name != NULL) printf("%s", name); |
---|
| 146 | |
---|
| 147 | for(i=nl; i<=nh; i++) { |
---|
| 148 | printf(format, v[i]); |
---|
| 149 | } |
---|
| 150 | printf("\n"); |
---|
| 151 | } |
---|
| 152 | /* ------------------------------------------------------------------------------------ */ |
---|
| 153 | IMAGE_EXPORT(void) display_f32vector(float32 *v,long nl,long nh, char *format, char *name) |
---|
| 154 | /* ------------------------------------------------------------------------------------ */ |
---|
| 155 | { |
---|
| 156 | long i; |
---|
| 157 | |
---|
| 158 | if(name != NULL) printf("%s", name); |
---|
| 159 | |
---|
| 160 | for(i=nl; i<=nh; i++) { |
---|
| 161 | printf(format, v[i]); |
---|
| 162 | } |
---|
| 163 | printf("\n"); |
---|
| 164 | } |
---|
| 165 | /* ------------------------------------------------------------------------------------ */ |
---|
| 166 | IMAGE_EXPORT(void) display_f64vector(float64 *v,long nl,long nh, char *format, char *name) |
---|
| 167 | /* ------------------------------------------------------------------------------------ */ |
---|
| 168 | { |
---|
| 169 | long i; |
---|
| 170 | |
---|
| 171 | if(name != NULL) printf("%s", name); |
---|
| 172 | |
---|
| 173 | for(i=nl; i<=nh; i++) { |
---|
| 174 | printf(format, v[i]); |
---|
| 175 | } |
---|
| 176 | printf("\n"); |
---|
| 177 | } |
---|
| 178 | /* ---------------------------------------------------------------------------------- */ |
---|
| 179 | IMAGE_EXPORT(void) display_rgb8vector(rgb8 *v,long nl,long nh, char *format, char *name) |
---|
| 180 | /* ---------------------------------------------------------------------------------- */ |
---|
| 181 | { |
---|
| 182 | long i; |
---|
| 183 | |
---|
| 184 | if(name != NULL) printf("%s", name); |
---|
| 185 | |
---|
| 186 | for(i=nl; i<=nh; i++) { |
---|
| 187 | printf(format, v[i]); |
---|
| 188 | } |
---|
| 189 | printf("\n"); |
---|
| 190 | } |
---|
| 191 | /* ------------------------------------------------------------------------------------ */ |
---|
| 192 | IMAGE_EXPORT(void) display_rgbx8vector(rgbx8 *v,long nl,long nh, char *format, char *name) |
---|
| 193 | /* ------------------------------------------------------------------------------------ */ |
---|
| 194 | { |
---|
| 195 | long i; |
---|
| 196 | |
---|
| 197 | if(name != NULL) printf("%s", name); |
---|
| 198 | |
---|
| 199 | for(i=nl; i<=nh; i++) { |
---|
| 200 | printf(format, v[i]); |
---|
| 201 | } |
---|
| 202 | printf("\n"); |
---|
| 203 | } |
---|
| 204 | |
---|
| 205 | /* |
---|
| 206 | * ----------------------------- |
---|
| 207 | * --- display_vector_number --- |
---|
| 208 | * ----------------------------- |
---|
| 209 | */ |
---|
| 210 | |
---|
| 211 | /* -------------------------------------------------------------------------------------- */ |
---|
| 212 | IMAGE_EXPORT(void) display_bvector_number(byte *v,long nl,long nh, char *format, char *name) |
---|
| 213 | /* -------------------------------------------------------------------------------------- */ |
---|
| 214 | { |
---|
| 215 | long i; |
---|
| 216 | |
---|
| 217 | if(name != NULL) printf("%s\n", name); |
---|
| 218 | |
---|
| 219 | for(i=nl; i<=nh; i++) { |
---|
| 220 | printf(format, i); |
---|
| 221 | } |
---|
| 222 | printf("\n"); |
---|
| 223 | |
---|
| 224 | for(i=nl; i<=nh; i++) { |
---|
| 225 | printf(format, v[i]); |
---|
| 226 | } |
---|
| 227 | printf("\n"); |
---|
| 228 | } |
---|
| 229 | /* ----------------------------------------------------------------------------------------- */ |
---|
| 230 | IMAGE_EXPORT(void) display_si8vector_number(sint8 *v,long nl,long nh, char *format, char *name) |
---|
| 231 | /* ----------------------------------------------------------------------------------------- */ |
---|
| 232 | { |
---|
| 233 | long i; |
---|
| 234 | |
---|
| 235 | if(name != NULL) printf(name); |
---|
| 236 | for(i=nl; i<=nh; i++) { |
---|
| 237 | printf(format, i); |
---|
| 238 | } |
---|
| 239 | printf("\n"); |
---|
| 240 | |
---|
| 241 | for(i=nl; i<=nh; i++) { |
---|
| 242 | printf(format, v[i]); |
---|
| 243 | } |
---|
| 244 | printf("\n"); |
---|
| 245 | } |
---|
| 246 | /* ----------------------------------------------------------------------------------------- */ |
---|
| 247 | IMAGE_EXPORT(void) display_ui8vector_number(uint8 *v,long nl,long nh, char *format, char *name) |
---|
| 248 | /* ----------------------------------------------------------------------------------------- */ |
---|
| 249 | { |
---|
| 250 | long i; |
---|
| 251 | |
---|
| 252 | if(name != NULL) printf(name); |
---|
| 253 | for(i=nl; i<=nh; i++) { |
---|
| 254 | printf(format, i); |
---|
| 255 | } |
---|
| 256 | printf("\n"); |
---|
| 257 | |
---|
| 258 | for(i=nl; i<=nh; i++) { |
---|
| 259 | printf(format, v[i]); |
---|
| 260 | } |
---|
| 261 | printf("\n"); |
---|
| 262 | } |
---|
| 263 | /* ------------------------------------------------------------------------------------------- */ |
---|
| 264 | IMAGE_EXPORT(void) display_si16vector_number(sint16 *v,long nl,long nh, char *format, char *name) |
---|
| 265 | /* ------------------------------------------------------------------------------------------- */ |
---|
| 266 | { |
---|
| 267 | long i; |
---|
| 268 | |
---|
| 269 | if(name != NULL) printf(name); |
---|
| 270 | for(i=nl; i<=nh; i++) { |
---|
| 271 | printf(format, i); |
---|
| 272 | } |
---|
| 273 | printf("\n"); |
---|
| 274 | |
---|
| 275 | for(i=nl; i<=nh; i++) { |
---|
| 276 | printf(format, v[i]); |
---|
| 277 | } |
---|
| 278 | printf("\n"); |
---|
| 279 | } |
---|
| 280 | /* ------------------------------------------------------------------------------------------- */ |
---|
| 281 | IMAGE_EXPORT(void) display_ui16vector_number(uint16 *v,long nl,long nh, char *format, char *name) |
---|
| 282 | /* ------------------------------------------------------------------------------------------- */ |
---|
| 283 | { |
---|
| 284 | long i; |
---|
| 285 | |
---|
| 286 | if(name != NULL) printf(name); |
---|
| 287 | for(i=nl; i<=nh; i++) { |
---|
| 288 | printf(format, i); |
---|
| 289 | } |
---|
| 290 | printf("\n"); |
---|
| 291 | |
---|
| 292 | for(i=nl; i<=nh; i++) { |
---|
| 293 | printf(format, v[i]); |
---|
| 294 | } |
---|
| 295 | printf("\n"); |
---|
| 296 | } |
---|
| 297 | /* ------------------------------------------------------------------------------------------- */ |
---|
| 298 | IMAGE_EXPORT(void) display_si32vector_number(sint32 *v,long nl,long nh, char *format, char *name) |
---|
| 299 | /* ------------------------------------------------------------------------------------------- */ |
---|
| 300 | { |
---|
| 301 | long i; |
---|
| 302 | |
---|
| 303 | if(name != NULL) printf("%s\n", name); |
---|
| 304 | |
---|
| 305 | for(i=nl; i<=nh; i++) { |
---|
| 306 | printf(format, i); |
---|
| 307 | } |
---|
| 308 | printf("\n"); |
---|
| 309 | |
---|
| 310 | for(i=nl; i<=nh; i++) { |
---|
| 311 | printf(format, v[i]); |
---|
| 312 | } |
---|
| 313 | printf("\n"); |
---|
| 314 | } |
---|
| 315 | /* ------------------------------------------------------------------------------------------- */ |
---|
| 316 | IMAGE_EXPORT(void) display_ui32vector_number(uint32 *v,long nl,long nh, char *format, char *name) |
---|
| 317 | /* ------------------------------------------------------------------------------------------- */ |
---|
| 318 | { |
---|
| 319 | long i; |
---|
| 320 | |
---|
| 321 | if(name != NULL) printf("%s\n", name); |
---|
| 322 | |
---|
| 323 | for(i=nl; i<=nh; i++) { |
---|
| 324 | printf(format, i); |
---|
| 325 | } |
---|
| 326 | printf("\n"); |
---|
| 327 | |
---|
| 328 | for(i=nl; i<=nh; i++) { |
---|
| 329 | printf(format, v[i]); |
---|
| 330 | } |
---|
| 331 | printf("\n"); |
---|
| 332 | } |
---|
| 333 | /* ------------------------------------------------------------------------------------------- */ |
---|
| 334 | IMAGE_EXPORT(void) display_si64vector_number(sint64 *v,long nl,long nh, char *format, char *name) |
---|
| 335 | /* ------------------------------------------------------------------------------------------- */ |
---|
| 336 | { |
---|
| 337 | long i; |
---|
| 338 | |
---|
| 339 | if(name != NULL) printf("%s\n", name); |
---|
| 340 | |
---|
| 341 | for(i=nl; i<=nh; i++) { |
---|
| 342 | printf(format, i); |
---|
| 343 | } |
---|
| 344 | printf("\n"); |
---|
| 345 | |
---|
| 346 | for(i=nl; i<=nh; i++) { |
---|
| 347 | printf(format, v[i]); |
---|
| 348 | } |
---|
| 349 | printf("\n"); |
---|
| 350 | } |
---|
| 351 | /* ------------------------------------------------------------------------------------------- */ |
---|
| 352 | IMAGE_EXPORT(void) display_ui64vector_number(uint64 *v,long nl,long nh, char *format, char *name) |
---|
| 353 | /* ------------------------------------------------------------------------------------------- */ |
---|
| 354 | { |
---|
| 355 | long i; |
---|
| 356 | |
---|
| 357 | if(name != NULL) printf("%s\n", name); |
---|
| 358 | |
---|
| 359 | for(i=nl; i<=nh; i++) { |
---|
| 360 | printf(format, i); |
---|
| 361 | } |
---|
| 362 | printf("\n"); |
---|
| 363 | |
---|
| 364 | for(i=nl; i<=nh; i++) { |
---|
| 365 | printf(format, v[i]); |
---|
| 366 | } |
---|
| 367 | printf("\n"); |
---|
| 368 | } |
---|
| 369 | /* ------------------------------------------------------------------------------------------- */ |
---|
| 370 | IMAGE_EXPORT(void) display_f32vector_number(float32 *v,long nl,long nh, char *format, char *name) |
---|
| 371 | /* ------------------------------------------------------------------------------------------- */ |
---|
| 372 | { |
---|
| 373 | long i; |
---|
| 374 | |
---|
| 375 | if(name != NULL) printf("%s\n", name); |
---|
| 376 | |
---|
| 377 | for(i=nl; i<=nh; i++) { |
---|
| 378 | printf(format, i); |
---|
| 379 | } |
---|
| 380 | printf("\n"); |
---|
| 381 | |
---|
| 382 | for(i=nl; i<=nh; i++) { |
---|
| 383 | printf(format, v[i]); |
---|
| 384 | } |
---|
| 385 | printf("\n"); |
---|
| 386 | } |
---|
| 387 | /* ------------------------------------------------------------------------------------------- */ |
---|
| 388 | IMAGE_EXPORT(void) display_f64vector_number(float64 *v,long nl,long nh, char *format, char *name) |
---|
| 389 | /* ------------------------------------------------------------------------------------------- */ |
---|
| 390 | { |
---|
| 391 | long i; |
---|
| 392 | |
---|
| 393 | if(name != NULL) printf("%s\n", name); |
---|
| 394 | |
---|
| 395 | for(i=nl; i<=nh; i++) { |
---|
| 396 | printf(format, i); |
---|
| 397 | } |
---|
| 398 | printf("\n"); |
---|
| 399 | |
---|
| 400 | for(i=nl; i<=nh; i++) { |
---|
| 401 | printf(format, v[i]); |
---|
| 402 | } |
---|
| 403 | printf("\n"); |
---|
| 404 | } |
---|
| 405 | /* ----------------------------------------------------------------------------------------- */ |
---|
| 406 | IMAGE_EXPORT(void) display_rgb8vector_number(rgb8 *v,long nl,long nh, char *format, char *name) |
---|
| 407 | /* ----------------------------------------------------------------------------------------- */ |
---|
| 408 | { |
---|
| 409 | long i; |
---|
| 410 | |
---|
| 411 | if(name != NULL) printf("%s\n", name); |
---|
| 412 | |
---|
| 413 | for(i=nl; i<=nh; i++) { |
---|
| 414 | printf(format, i); |
---|
| 415 | } |
---|
| 416 | printf("\n"); |
---|
| 417 | |
---|
| 418 | for(i=nl; i<=nh; i++) { |
---|
| 419 | printf(format, v[i]); |
---|
| 420 | } |
---|
| 421 | printf("\n"); |
---|
| 422 | } |
---|
| 423 | /* ------------------------------------------------------------------------------------------- */ |
---|
| 424 | IMAGE_EXPORT(void) display_rgbx8vector_number(rgbx8 *v,long nl,long nh, char *format, char *name) |
---|
| 425 | /* ------------------------------------------------------------------------------------------- */ |
---|
| 426 | { |
---|
| 427 | long i; |
---|
| 428 | |
---|
| 429 | if(name != NULL) printf("%s\n", name); |
---|
| 430 | |
---|
| 431 | for(i=nl; i<=nh; i++) { |
---|
| 432 | printf(format, i); |
---|
| 433 | } |
---|
| 434 | printf("\n"); |
---|
| 435 | |
---|
| 436 | for(i=nl; i<=nh; i++) { |
---|
| 437 | printf(format, v[i]); |
---|
| 438 | } |
---|
| 439 | printf("\n"); |
---|
| 440 | } |
---|
| 441 | /* |
---|
| 442 | * ------------------------ |
---|
| 443 | * --- display_vector_T --- |
---|
| 444 | * ------------------------ |
---|
| 445 | */ |
---|
| 446 | |
---|
| 447 | /* ----------------------------------------------------------------------------------- */ |
---|
| 448 | IMAGE_EXPORT(void) display_si8vector_T(sint8 *v,int i0, int i1, char *format, char *name) |
---|
| 449 | /* ----------------------------------------------------------------------------------- */ |
---|
| 450 | { |
---|
| 451 | int i; |
---|
| 452 | |
---|
| 453 | if(name != NULL) printf(name); |
---|
| 454 | |
---|
| 455 | for(i=i0; i<=i1; i++) { |
---|
| 456 | printf(format, v[i]); |
---|
| 457 | printf("\n"); |
---|
| 458 | } |
---|
| 459 | } |
---|
| 460 | /* ----------------------------------------------------------------------------------- */ |
---|
| 461 | IMAGE_EXPORT(void) display_ui8vector_T(uint8 *v,int i0, int i1, char *format, char *name) |
---|
| 462 | /* ----------------------------------------------------------------------------------- */ |
---|
| 463 | { |
---|
| 464 | int i; |
---|
| 465 | |
---|
| 466 | if(name != NULL) printf(name); |
---|
| 467 | |
---|
| 468 | for(i=i0; i<=i1; i++) { |
---|
| 469 | printf(format, v[i]); |
---|
| 470 | printf("\n"); |
---|
| 471 | } |
---|
| 472 | } |
---|
| 473 | /* ------------------------------------------------------------------------------------- */ |
---|
| 474 | IMAGE_EXPORT(void) display_si16vector_T(sint16 *v,int i0, int i1, char *format, char *name) |
---|
| 475 | /* ------------------------------------------------------------------------------------- */ |
---|
| 476 | { |
---|
| 477 | int i; |
---|
| 478 | |
---|
| 479 | if(name != NULL) printf(name); |
---|
| 480 | |
---|
| 481 | for(i=i0; i<=i1; i++) { |
---|
| 482 | printf(format, v[i]); |
---|
| 483 | printf("\n"); |
---|
| 484 | } |
---|
| 485 | } |
---|
| 486 | /* ------------------------------------------------------------------------------------- */ |
---|
| 487 | IMAGE_EXPORT(void) display_ui16vector_T(uint16 *v,int i0, int i1, char *format, char *name) |
---|
| 488 | /* ------------------------------------------------------------------------------------- */ |
---|
| 489 | { |
---|
| 490 | int i; |
---|
| 491 | |
---|
| 492 | if(name != NULL) printf(name); |
---|
| 493 | |
---|
| 494 | for(i=i0; i<=i1; i++) { |
---|
| 495 | printf(format, v[i]); |
---|
| 496 | printf("\n"); |
---|
| 497 | } |
---|
| 498 | } |
---|
| 499 | /* ------------------------------------------------------------------------------------- */ |
---|
| 500 | IMAGE_EXPORT(void) display_si32vector_T(sint32 *v,int i0, int i1, char *format, char *name) |
---|
| 501 | /* ------------------------------------------------------------------------------------- */ |
---|
| 502 | { |
---|
| 503 | int i; |
---|
| 504 | |
---|
| 505 | if(name != NULL) printf(name); |
---|
| 506 | |
---|
| 507 | for(i=i0; i<=i1; i++) { |
---|
| 508 | printf(format, v[i]); |
---|
| 509 | printf("\n"); |
---|
| 510 | } |
---|
| 511 | } |
---|
| 512 | /* ------------------------------------------------------------------------------------- */ |
---|
| 513 | IMAGE_EXPORT(void) display_ui32vector_T(uint32 *v,int i0, int i1, char *format, char *name) |
---|
| 514 | /* ------------------------------------------------------------------------------------- */ |
---|
| 515 | { |
---|
| 516 | int i; |
---|
| 517 | |
---|
| 518 | if(name != NULL) printf(name); |
---|
| 519 | |
---|
| 520 | for(i=i0; i<=i1; i++) { |
---|
| 521 | printf(format, v[i]); |
---|
| 522 | printf("\n"); |
---|
| 523 | } |
---|
| 524 | } |
---|
| 525 | /* ------------------------------------------------------------------------------------- */ |
---|
| 526 | IMAGE_EXPORT(void) display_si64vector_T(sint64 *v,int i0, int i1, char *format, char *name) |
---|
| 527 | /* ------------------------------------------------------------------------------------- */ |
---|
| 528 | { |
---|
| 529 | int i; |
---|
| 530 | |
---|
| 531 | if(name != NULL) printf(name); |
---|
| 532 | |
---|
| 533 | for(i=i0; i<=i1; i++) { |
---|
| 534 | printf(format, v[i]); |
---|
| 535 | printf("\n"); |
---|
| 536 | } |
---|
| 537 | } |
---|
| 538 | /* ------------------------------------------------------------------------------------- */ |
---|
| 539 | IMAGE_EXPORT(void) display_ui64vector_T(uint64 *v,int i0, int i1, char *format, char *name) |
---|
| 540 | /* ------------------------------------------------------------------------------------- */ |
---|
| 541 | { |
---|
| 542 | int i; |
---|
| 543 | |
---|
| 544 | if(name != NULL) printf(name); |
---|
| 545 | |
---|
| 546 | for(i=i0; i<=i1; i++) { |
---|
| 547 | printf(format, v[i]); |
---|
| 548 | printf("\n"); |
---|
| 549 | } |
---|
| 550 | } |
---|
| 551 | /* ------------------------------------------------------------------------------------- */ |
---|
| 552 | IMAGE_EXPORT(void) display_f32vector_T(float32 *v,int i0, int i1, char *format, char *name) |
---|
| 553 | /* ------------------------------------------------------------------------------------- */ |
---|
| 554 | { |
---|
| 555 | int i; |
---|
| 556 | |
---|
| 557 | if(name != NULL) printf(name); |
---|
| 558 | |
---|
| 559 | for(i=i0; i<=i1; i++) { |
---|
| 560 | printf(format, v[i]); |
---|
| 561 | printf("\n"); |
---|
| 562 | } |
---|
| 563 | } |
---|
| 564 | /* ------------------------------------------------------------------------------------- */ |
---|
| 565 | IMAGE_EXPORT(void) display_f64vector_T(float64 *v,int i0, int i1, char *format, char *name) |
---|
| 566 | /* ------------------------------------------------------------------------------------- */ |
---|
| 567 | { |
---|
| 568 | int i; |
---|
| 569 | |
---|
| 570 | if(name != NULL) printf(name); |
---|
| 571 | |
---|
| 572 | for(i=i0; i<=i1; i++) { |
---|
| 573 | printf(format, v[i]); |
---|
| 574 | printf("\n"); |
---|
| 575 | } |
---|
| 576 | } |
---|
| 577 | /* ----------------------------------------------------------------------------------- */ |
---|
| 578 | IMAGE_EXPORT(void) display_rgb8vector_T(rgb8 *v,int i0, int i1, char *format, char *name) |
---|
| 579 | /* ----------------------------------------------------------------------------------- */ |
---|
| 580 | { |
---|
| 581 | int i; |
---|
| 582 | |
---|
| 583 | if(name != NULL) printf(name); |
---|
| 584 | |
---|
| 585 | for(i=i0; i<=i1; i++) { |
---|
| 586 | printf(format, v[i]); |
---|
| 587 | printf("\n"); |
---|
| 588 | } |
---|
| 589 | } |
---|
| 590 | /* ------------------------------------------------------------------------------------- */ |
---|
| 591 | IMAGE_EXPORT(void) display_rgbx8vector_T(rgbx8 *v,int i0, int i1, char *format, char *name) |
---|
| 592 | /* ------------------------------------------------------------------------------------- */ |
---|
| 593 | { |
---|
| 594 | int i; |
---|
| 595 | |
---|
| 596 | if(name != NULL) printf(name); |
---|
| 597 | |
---|
| 598 | for(i=i0; i<=i1; i++) { |
---|
| 599 | printf(format, v[i]); |
---|
| 600 | printf("\n"); |
---|
| 601 | } |
---|
| 602 | } |
---|
| 603 | |
---|
| 604 | /* |
---|
| 605 | * ------------------------------- |
---|
| 606 | * --- display_vector_number_T --- |
---|
| 607 | * ------------------------------- |
---|
| 608 | */ |
---|
| 609 | |
---|
| 610 | /* ------------------------------------------------------------------------------------------ */ |
---|
| 611 | IMAGE_EXPORT(void) display_si8vector_number_T(sint8 *v,int i0, int i1, char *format, char *name) |
---|
| 612 | /* ------------------------------------------------------------------------------------------ */ |
---|
| 613 | { |
---|
| 614 | int i; |
---|
| 615 | |
---|
| 616 | if(name != NULL) printf(name); |
---|
| 617 | |
---|
| 618 | for(i=i0; i<=i1; i++) { |
---|
| 619 | printf("%8d ", i); |
---|
| 620 | printf(format, v[i]); |
---|
| 621 | printf("\n"); |
---|
| 622 | } |
---|
| 623 | } |
---|
| 624 | /* ------------------------------------------------------------------------------------------ */ |
---|
| 625 | IMAGE_EXPORT(void) display_ui8vector_number_T(uint8 *v,int i0, int i1, char *format, char *name) |
---|
| 626 | /* ------------------------------------------------------------------------------------------ */ |
---|
| 627 | { |
---|
| 628 | int i; |
---|
| 629 | |
---|
| 630 | if(name != NULL) printf(name); |
---|
| 631 | |
---|
| 632 | for(i=i0; i<=i1; i++) { |
---|
| 633 | printf("%8d ", i); |
---|
| 634 | printf(format, v[i]); |
---|
| 635 | printf("\n"); |
---|
| 636 | } |
---|
| 637 | } |
---|
| 638 | /* -------------------------------------------------------------------------------------------- */ |
---|
| 639 | IMAGE_EXPORT(void) display_si16vector_number_T(sint16 *v,int i0, int i1, char *format, char *name) |
---|
| 640 | /* -------------------------------------------------------------------------------------------- */ |
---|
| 641 | { |
---|
| 642 | int i; |
---|
| 643 | |
---|
| 644 | if(name != NULL) printf(name); |
---|
| 645 | |
---|
| 646 | for(i=i0; i<=i1; i++) { |
---|
| 647 | printf("%8d ", i); |
---|
| 648 | printf(format, v[i]); |
---|
| 649 | printf("\n"); |
---|
| 650 | } |
---|
| 651 | } |
---|
| 652 | /* -------------------------------------------------------------------------------------------- */ |
---|
| 653 | IMAGE_EXPORT(void) display_ui16vector_number_T(uint16 *v,int i0, int i1, char *format, char *name) |
---|
| 654 | /* -------------------------------------------------------------------------------------------- */ |
---|
| 655 | { |
---|
| 656 | int i; |
---|
| 657 | |
---|
| 658 | if(name != NULL) printf(name); |
---|
| 659 | |
---|
| 660 | for(i=i0; i<=i1; i++) { |
---|
| 661 | printf("%8d ", i); |
---|
| 662 | printf(format, v[i]); |
---|
| 663 | printf("\n"); |
---|
| 664 | } |
---|
| 665 | } |
---|
| 666 | /* -------------------------------------------------------------------------------------------- */ |
---|
| 667 | IMAGE_EXPORT(void) display_si32vector_number_T(sint32 *v,int i0, int i1, char *format, char *name) |
---|
| 668 | /* -------------------------------------------------------------------------------------------- */ |
---|
| 669 | { |
---|
| 670 | int i; |
---|
| 671 | |
---|
| 672 | if(name != NULL) printf(name); |
---|
| 673 | |
---|
| 674 | for(i=i0; i<=i1; i++) { |
---|
| 675 | printf("%8d ", i); |
---|
| 676 | printf(format, v[i]); |
---|
| 677 | printf("\n"); |
---|
| 678 | } |
---|
| 679 | } |
---|
| 680 | /* -------------------------------------------------------------------------------------------- */ |
---|
| 681 | IMAGE_EXPORT(void) display_ui32vector_number_T(uint32 *v,int i0, int i1, char *format, char *name) |
---|
| 682 | /* -------------------------------------------------------------------------------------------- */ |
---|
| 683 | { |
---|
| 684 | int i; |
---|
| 685 | |
---|
| 686 | if(name != NULL) printf(name); |
---|
| 687 | |
---|
| 688 | for(i=i0; i<=i1; i++) { |
---|
| 689 | printf("%8d ", i); |
---|
| 690 | printf(format, v[i]); |
---|
| 691 | printf("\n"); |
---|
| 692 | } |
---|
| 693 | } |
---|
| 694 | /* -------------------------------------------------------------------------------------------- */ |
---|
| 695 | IMAGE_EXPORT(void) display_si64vector_number_T(sint64 *v,int i0, int i1, char *format, char *name) |
---|
| 696 | /* -------------------------------------------------------------------------------------------- */ |
---|
| 697 | { |
---|
| 698 | int i; |
---|
| 699 | |
---|
| 700 | if(name != NULL) printf(name); |
---|
| 701 | |
---|
| 702 | for(i=i0; i<=i1; i++) { |
---|
| 703 | printf("%8d ", i); |
---|
| 704 | printf(format, v[i]); |
---|
| 705 | printf("\n"); |
---|
| 706 | } |
---|
| 707 | } |
---|
| 708 | /* -------------------------------------------------------------------------------------------- */ |
---|
| 709 | IMAGE_EXPORT(void) display_ui64vector_number_T(uint64 *v,int i0, int i1, char *format, char *name) |
---|
| 710 | /* -------------------------------------------------------------------------------------------- */ |
---|
| 711 | { |
---|
| 712 | int i; |
---|
| 713 | |
---|
| 714 | if(name != NULL) printf(name); |
---|
| 715 | |
---|
| 716 | for(i=i0; i<=i1; i++) { |
---|
| 717 | printf("%8d ", i); |
---|
| 718 | printf(format, v[i]); |
---|
| 719 | printf("\n"); |
---|
| 720 | } |
---|
| 721 | } |
---|
| 722 | /* -------------------------------------------------------------------------------------------- */ |
---|
| 723 | IMAGE_EXPORT(void) display_f32vector_number_T(float32 *v,int i0, int i1, char *format, char *name) |
---|
| 724 | /* -------------------------------------------------------------------------------------------- */ |
---|
| 725 | { |
---|
| 726 | int i; |
---|
| 727 | |
---|
| 728 | if(name != NULL) printf(name); |
---|
| 729 | |
---|
| 730 | for(i=i0; i<=i1; i++) { |
---|
| 731 | printf("%8d ", i); |
---|
| 732 | printf(format, v[i]); |
---|
| 733 | printf("\n"); |
---|
| 734 | } |
---|
| 735 | } |
---|
| 736 | /* -------------------------------------------------------------------------------------------- */ |
---|
| 737 | IMAGE_EXPORT(void) display_f64vector_number_T(float64 *v,int i0, int i1, char *format, char *name) |
---|
| 738 | /* -------------------------------------------------------------------------------------------- */ |
---|
| 739 | { |
---|
| 740 | int i; |
---|
| 741 | |
---|
| 742 | if(name != NULL) printf(name); |
---|
| 743 | |
---|
| 744 | for(i=i0; i<=i1; i++) { |
---|
| 745 | printf("%8d ", i); |
---|
| 746 | printf(format, v[i]); |
---|
| 747 | printf("\n"); |
---|
| 748 | } |
---|
| 749 | } |
---|
| 750 | /* ------------------------------------------------------------------------------------------ */ |
---|
| 751 | IMAGE_EXPORT(void) display_rgb8vector_number_T(rgb8 *v,int i0, int i1, char *format, char *name) |
---|
| 752 | /* ------------------------------------------------------------------------------------------ */ |
---|
| 753 | { |
---|
| 754 | int i; |
---|
| 755 | |
---|
| 756 | if(name != NULL) printf(name); |
---|
| 757 | |
---|
| 758 | for(i=i0; i<=i1; i++) { |
---|
| 759 | printf("%8d ", i); |
---|
| 760 | printf(format, v[i]); |
---|
| 761 | printf("\n"); |
---|
| 762 | } |
---|
| 763 | } |
---|
| 764 | /* -------------------------------------------------------------------------------------------- */ |
---|
| 765 | IMAGE_EXPORT(void) display_rgbx8vector_number_T(rgbx8 *v,int i0, int i1, char *format, char *name) |
---|
| 766 | /* -------------------------------------------------------------------------------------------- */ |
---|
| 767 | { |
---|
| 768 | int i; |
---|
| 769 | |
---|
| 770 | if(name != NULL) printf(name); |
---|
| 771 | |
---|
| 772 | for(i=i0; i<=i1; i++) { |
---|
| 773 | printf("%8d ", i); |
---|
| 774 | printf(format, v[i]); |
---|
| 775 | printf("\n"); |
---|
| 776 | } |
---|
| 777 | } |
---|
| 778 | |
---|
| 779 | /* |
---|
| 780 | * ------------------------------- |
---|
| 781 | * --- display_vector_positive --- |
---|
| 782 | * ------------------------------- |
---|
| 783 | */ |
---|
| 784 | |
---|
| 785 | // ------------------------------------------------------------------------------- |
---|
| 786 | void display_ui8vector_positive(uint8 *v, int j0, int j1, int iformat, char *name) |
---|
| 787 | // ------------------------------------------------------------------------------- |
---|
| 788 | { |
---|
| 789 | int j; |
---|
| 790 | char *format, *str; |
---|
| 791 | |
---|
| 792 | select_display_positive_parameters(iformat, &format, &str); |
---|
| 793 | |
---|
| 794 | if(name != NULL) printf(name); |
---|
| 795 | |
---|
| 796 | for(j=j0; j<=j1; j++) { |
---|
| 797 | if(v[j]) { |
---|
| 798 | printf(format, v[j]); |
---|
| 799 | } else { |
---|
| 800 | printf("%s", str); |
---|
| 801 | } |
---|
| 802 | } |
---|
| 803 | printf("\n"); |
---|
| 804 | } |
---|
| 805 | |
---|
| 806 | // --------------------------------------------------------------------------------- |
---|
| 807 | void display_ui16vector_positive(uint16 *v, int j0, int j1, int iformat, char *name) |
---|
| 808 | // --------------------------------------------------------------------------------- |
---|
| 809 | { |
---|
| 810 | int j; |
---|
| 811 | char *format, *str; |
---|
| 812 | |
---|
| 813 | select_display_positive_parameters(iformat, &format, &str); |
---|
| 814 | |
---|
| 815 | if(name != NULL) printf(name); |
---|
| 816 | |
---|
| 817 | for(j=j0; j<=j1; j++) { |
---|
| 818 | if(v[j]) { |
---|
| 819 | printf(format, v[j]); |
---|
| 820 | } else { |
---|
| 821 | printf("%s", str); |
---|
| 822 | } |
---|
| 823 | } |
---|
| 824 | printf("\n"); |
---|
| 825 | } |
---|
| 826 | // --------------------------------------------------------------------------------- |
---|
| 827 | void display_ui32vector_positive(uint32 *v, int j0, int j1, int iformat, char *name) |
---|
| 828 | // --------------------------------------------------------------------------------- |
---|
| 829 | { |
---|
| 830 | int j; |
---|
| 831 | char *format, *str; |
---|
| 832 | |
---|
| 833 | select_display_positive_parameters(iformat, &format, &str); |
---|
| 834 | |
---|
| 835 | if(name != NULL) printf(name); |
---|
| 836 | |
---|
| 837 | for(j=j0; j<=j1; j++) { |
---|
| 838 | if(v[j]) { |
---|
| 839 | printf(format, v[j]); |
---|
| 840 | } else { |
---|
| 841 | printf("%s", str); |
---|
| 842 | } |
---|
| 843 | } |
---|
| 844 | printf("\n"); |
---|
| 845 | } |
---|