[772] | 1 | /* ----------------- */ |
---|
| 2 | /* --- nrsort1.h --- */ |
---|
| 3 | /* ----------------- */ |
---|
| 4 | |
---|
| 5 | /* |
---|
| 6 | * Copyright (c) 2000-2014, Lionel Lacassagne, All rights reserved |
---|
| 7 | * Univ Paris Sud XI, CNRS |
---|
| 8 | */ |
---|
| 9 | |
---|
| 10 | #ifndef _NRSORT1_H_ |
---|
| 11 | #define _NRSORT1_H_ |
---|
| 12 | |
---|
| 13 | #ifdef __cplusplus |
---|
| 14 | #ifdef PRAGMA_VERBOSE |
---|
| 15 | #pragma message ("C++") |
---|
| 16 | #endif |
---|
| 17 | extern "C" { |
---|
| 18 | #endif |
---|
| 19 | |
---|
| 20 | #ifdef PRAGMA_VERBOSE |
---|
| 21 | //#pragma message("- include nrsort1.h") |
---|
| 22 | #endif |
---|
| 23 | |
---|
| 24 | IMAGE_EXPORT(void) extractnz_boundaries_ui8vector (uint8 *v, long nl, long nh, long *nlnz, long *nhnz); |
---|
| 25 | IMAGE_EXPORT(void) extractnz_boundaries_si16vector(sint16 *v, long nl, long nh, long *nlnz, long *nhnz); |
---|
| 26 | IMAGE_EXPORT(void) extractnz_boundaries_ui16vector(uint16 *v, long nl, long nh, long *nlnz, long *nhnz); |
---|
| 27 | IMAGE_EXPORT(void) extractnz_boundaries_si32vector(sint32 *v, long nl, long nh, long *nlnz, long *nhnz); |
---|
| 28 | IMAGE_EXPORT(void) extractnz_boundaries_ui32vector(uint32 *v, long nl, long nh, long *nlnz, long *nhnz); |
---|
| 29 | IMAGE_EXPORT(void) extractnz_boundaries_f32vector (float32 *v, long nl, long nh, long *nlnz, long *nhnz, float32 epsillon); |
---|
| 30 | IMAGE_EXPORT(void) extractnz_boundaries_f64vector (float64 *v, long nl, long nh, long *nlnz, long *nhnz, float64 epsillon); |
---|
| 31 | |
---|
| 32 | IMAGE_EXPORT(void) sort_index_dvector_selection (double *key, long nl, long nh, int *index); |
---|
| 33 | |
---|
| 34 | IMAGE_EXPORT(void) sort_index_ivector_selection_min (int *key, long nl, long nh, int *index); |
---|
| 35 | IMAGE_EXPORT(void) sort_index_ivector_selection_max (int *key, long nl, long nh, int *index); |
---|
| 36 | IMAGE_EXPORT(void) sort_index_ivector_selection_kmin(int *key, long nl, long nh, int *index, int k); |
---|
| 37 | IMAGE_EXPORT(void) sort_index_ivector_selection_kmax(int *key, long nl, long nh, int *index, int k); |
---|
| 38 | |
---|
| 39 | IMAGE_EXPORT(void) sort_index_vector_selection_min (float *key, long nl, long nh, int *index); |
---|
| 40 | IMAGE_EXPORT(void) sort_index_vector_selection_max (float *key, long nl, long nh, int *index); |
---|
| 41 | IMAGE_EXPORT(void) sort_index_vector_selection_kmin(float *key, long nl, long nh, int *index, int k); |
---|
| 42 | IMAGE_EXPORT(void) sort_index_vector_selection_kmax(float *key, long nl, long nh, int *index, int k); |
---|
| 43 | |
---|
| 44 | /* |
---|
| 45 | * ATTENTION le tableau index DOIT etre initialise (et alloue) |
---|
| 46 | */ |
---|
| 47 | |
---|
| 48 | IMAGE_EXPORT(void) sort_bvector_selection_min(byte *v, long nl, long nh); |
---|
| 49 | |
---|
| 50 | /* ======================================================================== */ |
---|
| 51 | /* == Select = order/rank filter = median ================================= */ |
---|
| 52 | /* ======================================================================== */ |
---|
| 53 | |
---|
| 54 | IMAGE_EXPORT(byte) select_bvector (byte *v, long nl, long nh, long k); |
---|
| 55 | IMAGE_EXPORT(rgb8) select_rgb8vector(rgb8 *v, long nl, long nh, long k); |
---|
| 56 | |
---|
| 57 | #ifdef __cplusplus |
---|
| 58 | } |
---|
| 59 | #endif |
---|
| 60 | |
---|
| 61 | #endif /* _NRSORT1_H_ */ |
---|