1 | /* ----------------- */ |
---|
2 | /* --- nrmem2x.h --- */ |
---|
3 | /* ----------------- */ |
---|
4 | |
---|
5 | /* |
---|
6 | * Copyright (c) 2000-2014, Lionel Lacassagne, All rights reserved |
---|
7 | * Univ Paris Sud XI, CNRS |
---|
8 | * |
---|
9 | */ |
---|
10 | |
---|
11 | #ifndef _NRMEM2X_H_ |
---|
12 | #define _NRMEM2X_H_ |
---|
13 | |
---|
14 | #ifdef __cplusplus |
---|
15 | #ifdef PRAGMA_VERBOSE |
---|
16 | #pragma message ("C++") |
---|
17 | #endif |
---|
18 | extern "C" { |
---|
19 | #endif |
---|
20 | |
---|
21 | /* ------------------------------------------ */ |
---|
22 | /* --- ATTENTION ---------------------------- */ |
---|
23 | /* ------------------------------------------ */ |
---|
24 | /* l'utilisation des fonctions endline */ |
---|
25 | /* necessite l'allocation d'une ligne de plus */ |
---|
26 | /* (a cause du m[i+1] */ |
---|
27 | /* ------------------------------------------ */ |
---|
28 | |
---|
29 | IMAGE_EXPORT(void) reset_endline_bmatrix (byte **m, long nrl, long nrh, long ncl, long nch); |
---|
30 | IMAGE_EXPORT(void) reset_endline_i16matrix (int16 **m, long nrl, long nrh, long ncl, long nch); |
---|
31 | IMAGE_EXPORT(void) reset_endline_ui16matrix(uint16 **m, long nrl, long nrh, long ncl, long nch); |
---|
32 | IMAGE_EXPORT(void) reset_endline_imatrix (int **m, long nrl, long nrh, long ncl, long nch); |
---|
33 | IMAGE_EXPORT(void) reset_endline_i32matrix (int32 **m, long nrl, long nrh, long ncl, long nch); |
---|
34 | IMAGE_EXPORT(void) reset_endline_ui32matrix(uint32 **m, long nrl, long nrh, long ncl, long nch); |
---|
35 | IMAGE_EXPORT(void) reset_endline_i64matrix (int64 **m, long nrl, long nrh, long ncl, long nch); |
---|
36 | |
---|
37 | IMAGE_EXPORT(void) endline_bmatrix (byte **m, long i, long l); |
---|
38 | IMAGE_EXPORT(void) endline_i16matrix (int16 **m, long i, long l); |
---|
39 | IMAGE_EXPORT(void) endline_ui16matrix(uint16 **m, long i, long l); |
---|
40 | IMAGE_EXPORT(void) endline_imatrix (int **m, long i, long l); |
---|
41 | IMAGE_EXPORT(void) endline_i32matrix (int32 **m, long i, long l); |
---|
42 | IMAGE_EXPORT(void) endline_ui32matrix(uint32 **m, long i, long l); |
---|
43 | IMAGE_EXPORT(void) endline_i64matrix (int64 **m, long i, long l); |
---|
44 | |
---|
45 | IMAGE_EXPORT(void) endline0_bmatrix (byte **m, long i, long l, long ncl); |
---|
46 | IMAGE_EXPORT(void) endline0_i16matrix (int16 **m, long i, long l, long ncl); |
---|
47 | IMAGE_EXPORT(void) endline0_ui16matrix(uint16 **m, long i, long l, long ncl); |
---|
48 | IMAGE_EXPORT(void) endline0_imatrix (int **m, long i, long l, long ncl); |
---|
49 | IMAGE_EXPORT(void) endline0_i32matrix (int32 **m, long i, long l, long ncl); |
---|
50 | IMAGE_EXPORT(void) endline0_ui32matrix(uint32 **m, long i, long l, long ncl); |
---|
51 | IMAGE_EXPORT(void) endline0_i64matrix (int64 **m, long i, long l, long ncl); |
---|
52 | |
---|
53 | IMAGE_EXPORT(void) endline1_bmatrix (byte **m, long i, long l, long ncl); |
---|
54 | IMAGE_EXPORT(void) endline1_i16matrix (int16 **m, long i, long l, long ncl); |
---|
55 | IMAGE_EXPORT(void) endline1_ui16matrix(uint16 **m, long i, long l, long ncl); |
---|
56 | IMAGE_EXPORT(void) endline1_imatrix (int **m, long i, long l, long ncl); |
---|
57 | IMAGE_EXPORT(void) endline1_i32matrix (int32 **m, long i, long l, long ncl); |
---|
58 | IMAGE_EXPORT(void) endline1_ui32matrix(uint32 **m, long i, long l, long ncl); |
---|
59 | IMAGE_EXPORT(void) endline1_i64matrix (int64 **m, long i, long l, long ncl); |
---|
60 | |
---|
61 | IMAGE_EXPORT(void) resize_si16Pmatrix(si16Point **m, long nrl, long nrh, long ncl, long nch); |
---|
62 | IMAGE_EXPORT(void) resize_ui16Pmatrix(ui16Point **m, long nrl, long nrh, long ncl, long nch); |
---|
63 | IMAGE_EXPORT(void) resize_si32Pmatrix(si32Point **m, long nrl, long nrh, long ncl, long nch); |
---|
64 | IMAGE_EXPORT(void) resize_ui32Pmatrix(ui32Point **m, long nrl, long nrh, long ncl, long nch); |
---|
65 | IMAGE_EXPORT(void) resize_f32Pmatrix(f32Point **m, long nrl, long nrh, long ncl, long nch); |
---|
66 | |
---|
67 | // Triplet Matrix |
---|
68 | IMAGE_EXPORT(void) resize_si16Tmatrix(si16Triplet **m, long nrl, long nrh, long ncl, long nch); |
---|
69 | IMAGE_EXPORT(void) resize_ui16Tmatrix(ui16Triplet **m, long nrl, long nrh, long ncl, long nch); |
---|
70 | IMAGE_EXPORT(void) resize_si32Tmatrix(si32Triplet **m, long nrl, long nrh, long ncl, long nch); |
---|
71 | IMAGE_EXPORT(void) resize_ui32Tmatrix(ui32Triplet **m, long nrl, long nrh, long ncl, long nch); |
---|
72 | IMAGE_EXPORT(void) resize_f32Tmatrix (f32Triplet **m, long nrl, long nrh, long ncl, long nch); |
---|
73 | |
---|
74 | |
---|
75 | |
---|
76 | |
---|
77 | /* |
---|
78 | * -------------- |
---|
79 | * matrix_reverse |
---|
80 | * -------------- |
---|
81 | */ |
---|
82 | |
---|
83 | //IMAGE_EXPORT(void) bmatrix_reverse (byte **m, long nrl, long nrh, long ncl, long nch); |
---|
84 | //IMAGE_EXPORT(void) si16matrix_reverse (sint16 **m, long nrl, long nrh, long ncl, long nch); |
---|
85 | //IMAGE_EXPORT(void) usmatrix_reverse(uint16 **m, long nrl, long nrh, long ncl, long nch); |
---|
86 | |
---|
87 | /* copie */ |
---|
88 | IMAGE_EXPORT(void) copyc_bmatrix(byte **src,long nrl,long nrh,long ncl, long nch, byte **cond, byte c, byte **dst); |
---|
89 | |
---|
90 | IMAGE_EXPORT(void) complete_border_bmatrix (byte **m, long nrl,long nrh,long ncl, long nch, long n); |
---|
91 | IMAGE_EXPORT(void) complete_border1_bmatrix(byte **m, long nrl,long nrh,long ncl, long nch); |
---|
92 | IMAGE_EXPORT(void) complete_border2_bmatrix(byte **m, long nrl,long nrh,long ncl, long nch); |
---|
93 | |
---|
94 | IMAGE_EXPORT(void) copy1c_bmatrix (byte **X, long nc, byte **Y, long nrl, long nrh, long ncl, long nch); |
---|
95 | IMAGE_EXPORT(void) copy1c_si16matrix (sint16 **X, long nc, sint16 **Y, long nrl, long nrh, long ncl, long nch); |
---|
96 | IMAGE_EXPORT(void) copy1c_ui16matrix (uint16 **X, long nc, uint16 **Y, long nrl, long nrh, long ncl, long nch); |
---|
97 | IMAGE_EXPORT(void) copy1c_si32matrix (sint32 **X, long nc, sint32 **Y, long nrl, long nrh, long ncl, long nch); |
---|
98 | IMAGE_EXPORT(void) copy1c_ui32matrix (uint32 **X, long nc, uint32 **Y, long nrl, long nrh, long ncl, long nch); |
---|
99 | IMAGE_EXPORT(void) copy1c_f32matrix (float32 **X, long nc, float32 **Y, long nrl, long nrh, long ncl, long nch); |
---|
100 | IMAGE_EXPORT(void) copy1c_f64matrix (float64 **X, long nc, float64 **Y, long nrl, long nrh, long ncl, long nch); |
---|
101 | IMAGE_EXPORT(void) copy1c_rgb8matrix (rgb8 **X, long nc, rgb8 **Y, long nrl, long nrh, long ncl, long nch); |
---|
102 | IMAGE_EXPORT(void) copy1c_rgbx8matrix(rgbx8 **X, long nc, rgbx8 **Y, long nrl, long nrh, long ncl, long nch); |
---|
103 | |
---|
104 | /* |
---|
105 | * copie dans src->dst si la condition est remplie |
---|
106 | * dst(i,j) = src(i,j) si cond(i,j) == c |
---|
107 | */ |
---|
108 | /* |
---|
109 | IMAGE_EXPORT(void) copy1r_bmatrix (byte **X, long nr, byte **Y, long nrl, long nrh, long ncl, long nch); |
---|
110 | IMAGE_EXPORT(void) copy1r_smatrix (sint16 **X, long nr, sint16 **Y, long nrl, long nrh, long ncl, long nch); |
---|
111 | IMAGE_EXPORT(void) copy1r_usmatrix (uint16 **X, long nr, uint16 **Y, long nrl, long nrh, long ncl, long nch); |
---|
112 | IMAGE_EXPORT(void) copy1r_imatrix (int **X, long nr, int **Y, long nrl, long nrh, long ncl, long nch); |
---|
113 | IMAGE_EXPORT(void) copy1r_uimatrix (uint **X, long nr, uint **Y, long nrl, long nrh, long ncl, long nch); |
---|
114 | IMAGE_EXPORT(void) copy1r_matrix (float **X, long nr, float **Y, long nrl, long nrh, long ncl, long nch); |
---|
115 | IMAGE_EXPORT(void) copy1r_dmatrix (double **X, long nr, double **Y, long nrl, long nrh, long ncl, long nch); |
---|
116 | IMAGE_EXPORT(void) copy1r_rgb8matrix (rgb8 **X, long nr, rgb8 **Y, long nrl, long nrh, long ncl, long nch); |
---|
117 | IMAGE_EXPORT(void) copy1r_rgbx8matrix(rgbx8 **X, long nr, rgbx8 **Y, long nrl, long nrh, long ncl, long nch); |
---|
118 | |
---|
119 | IMAGE_EXPORT(void) copy_bmatrix (byte **m1, long nrl1,long nrh1,long ncl1, long nch1, byte **m2, long nrl2, long nrh2, long ncl2, long nch2); |
---|
120 | IMAGE_EXPORT(void) copy_smatrix (sint16 **m1, long nrl1,long nrh1,long ncl1, long nch1, sint16 **m2, long nrl2, long nrh2, long ncl2, long nch2); |
---|
121 | IMAGE_EXPORT(void) copy_usmatrix (uint16 **m1, long nrl1,long nrh1,long ncl1, long nch1, uint16 **m2, long nrl2, long nrh2, long ncl2, long nch2); |
---|
122 | IMAGE_EXPORT(void) copy_imatrix (int **m1, long nrl1,long nrh1,long ncl1, long nch1, int **m2, long nrl2, long nrh2, long ncl2, long nch2); |
---|
123 | IMAGE_EXPORT(void) copy_uimatrix (uint **m1, long nrl1,long nrh1,long ncl1, long nch1, uint **m2, long nrl2, long nrh2, long ncl2, long nch2); |
---|
124 | IMAGE_EXPORT(void) copy_matrix (float **m1, long nrl1,long nrh1,long ncl1, long nch1, float **m2, long nrl2, long nrh2, long ncl2, long nch2); |
---|
125 | IMAGE_EXPORT(void) copy_dmatrix (double **m1, long nrl1,long nrh1,long ncl1, long nch1, double **m2, long nrl2, long nrh2, long ncl2, long nch2); |
---|
126 | IMAGE_EXPORT(void) copy_rgb8matrix (rgb8 **m1, long nrl1,long nrh1,long ncl1, long nch1, rgb8 **m2, long nrl2, long nrh2, long ncl2, long nch2); |
---|
127 | IMAGE_EXPORT(void) copy_rgbx8matrix(rgbx8 **m1, long nrl1,long nrh1,long ncl1, long nch1, rgbx8 **m2, long nrl2, long nrh2, long ncl2, long nch2); |
---|
128 | |
---|
129 | IMAGE_EXPORT(void) copy_sub_bmatrix(byte **src, long nrl,long nrh,long ncl, long nch, byte **dst); |
---|
130 | |
---|
131 | IMAGE_EXPORT(void) extract_bmatrix (byte **src, long nrl,long nrh,long ncl, long nch, byte **dst); |
---|
132 | IMAGE_EXPORT(void) extract_smatrix (sint16 **src, long nrl,long nrh,long ncl, long nch, sint16 **dst); |
---|
133 | IMAGE_EXPORT(void) extract_usmatrix(uint16 **src, long nrl,long nrh,long ncl, long nch, uint16 **dst); |
---|
134 | IMAGE_EXPORT(void) extract_imatrix (int **src, long nrl,long nrh,long ncl, long nch, int **dst); |
---|
135 | IMAGE_EXPORT(void) extract_uimatrix(uint **src, long nrl,long nrh,long ncl, long nch, uint **dst); |
---|
136 | IMAGE_EXPORT(void) extract_matrix (float **src, long nrl,long nrh,long ncl, long nch, float **dst); |
---|
137 | IMAGE_EXPORT(void) extract_dmatrix (double **src, long nrl,long nrh,long ncl, long nch, double **dst); |
---|
138 | */ |
---|
139 | IMAGE_EXPORT(void) copy_center_bmatrix(byte **src, long nrl0,long nrh0,long ncl0, long nch0, byte **dst, long nrl1,long nrh1,long ncl1, long nch1); |
---|
140 | |
---|
141 | IMAGE_EXPORT(void) copy_sub_imatrix(int **src, long nrl,long nrh,long ncl, long nch, int **dst); |
---|
142 | |
---|
143 | IMAGE_EXPORT(void) copy_sub_imatrix_index(int **src, long nrl,long nrh, long ncl, long nch, int **dst,int *index); |
---|
144 | |
---|
145 | /* --------------------- */ |
---|
146 | /* --- De-Interleave --- */ |
---|
147 | /* --------------------- */ |
---|
148 | |
---|
149 | IMAGE_EXPORT(void) desinterlace_bmatrix (byte **S, long nrl, long nrh, long ncl, long nch, byte **D0, byte **D1); |
---|
150 | IMAGE_EXPORT(void) desinterlace_rgb8matrix(rgb8 **S, long nrl, long nrh, long ncl, long nch, rgb8 **D0, rgb8 **D1); |
---|
151 | |
---|
152 | IMAGE_EXPORT(void) interlace_bmatrix (byte **S0, long nrl, long nrh, long ncl, long nch, byte **S1, byte **D); |
---|
153 | IMAGE_EXPORT(void) interlace_rgb8matrix(rgb8 **S0, long nrl, long nrh, long ncl, long nch, rgb8 **S1, rgb8 **D); |
---|
154 | |
---|
155 | |
---|
156 | #ifdef __cplusplus |
---|
157 | } |
---|
158 | #endif |
---|
159 | |
---|
160 | #else |
---|
161 | //#pragma message(" Warning : attemp to re-include nrmem2x.h") |
---|
162 | #endif /* _NRMEM2X_H_ */ |
---|