1 | /* ---------------- */ |
---|
2 | /* --- nrmem2.h --- */ |
---|
3 | /* ---------------- */ |
---|
4 | |
---|
5 | /* |
---|
6 | * Copyright (c) 2000-2014, Lionel Lacassagne, All rights reserved |
---|
7 | * Univ Paris Sud XI, CNRS |
---|
8 | */ |
---|
9 | |
---|
10 | #ifndef _NRMEM2_H_ |
---|
11 | #define _NRMEM2_H_ |
---|
12 | |
---|
13 | #ifdef __cplusplus |
---|
14 | #ifdef PRAGMA_VERBOSE |
---|
15 | #pragma message ("C++") |
---|
16 | #endif |
---|
17 | extern "C" { |
---|
18 | #endif |
---|
19 | |
---|
20 | |
---|
21 | /* |
---|
22 | * ------------------ |
---|
23 | * --- dup_matrix --- |
---|
24 | * ------------------ |
---|
25 | */ |
---|
26 | |
---|
27 | IMAGE_EXPORT(void) dup_si8matrix (sint8 **X, long nrl,long nrh,long ncl, long nch, sint8 **Y); |
---|
28 | IMAGE_EXPORT(void) dup_ui8matrix (uint8 **X, long nrl,long nrh,long ncl, long nch, uint8 **Y); |
---|
29 | IMAGE_EXPORT(void) dup_si16matrix (sint16 **X, long nrl,long nrh,long ncl, long nch, sint16 **Y); |
---|
30 | IMAGE_EXPORT(void) dup_ui16matrix (uint16 **X, long nrl,long nrh,long ncl, long nch, uint16 **Y); |
---|
31 | IMAGE_EXPORT(void) dup_si32matrix (sint32 **X, long nrl,long nrh,long ncl, long nch, sint32 **Y); |
---|
32 | IMAGE_EXPORT(void) dup_ui32matrix (uint32 **X, long nrl,long nrh,long ncl, long nch, uint32 **Y); |
---|
33 | IMAGE_EXPORT(void) dup_si64matrix (sint64 **X, long nrl,long nrh,long ncl, long nch, sint64 **Y); |
---|
34 | IMAGE_EXPORT(void) dup_ui64matrix (uint64 **X, long nrl,long nrh,long ncl, long nch, uint64 **Y); |
---|
35 | |
---|
36 | IMAGE_EXPORT(void) dup_f32matrix (float32 **X, long nrl,long nrh,long ncl, long nch, float32 **Y); |
---|
37 | IMAGE_EXPORT(void) dup_f64matrix (float64 **X, long nrl,long nrh,long ncl, long nch, float64 **Y); |
---|
38 | |
---|
39 | IMAGE_EXPORT(void) dup_rgb8matrix (rgb8 **X, long nrl,long nrh,long ncl, long nch, rgb8 **Y); |
---|
40 | IMAGE_EXPORT(void) dup_rgbx8matrix (rgbx8 **X, long nrl,long nrh,long ncl, long nch, rgbx8 **Y); |
---|
41 | |
---|
42 | |
---|
43 | /* |
---|
44 | * -------------- |
---|
45 | * --- resize --- |
---|
46 | * -------------- |
---|
47 | */ |
---|
48 | |
---|
49 | IMAGE_EXPORT(void) resize_si8matrix (sint8 **m, long nrl, long nrh, long ncl, long nch); |
---|
50 | IMAGE_EXPORT(void) resize_ui8matrix (uint8 **m, long nrl, long nrh, long ncl, long nch); |
---|
51 | IMAGE_EXPORT(void) resize_si16matrix (sint16 **m, long nrl, long nrh, long ncl, long nch); |
---|
52 | IMAGE_EXPORT(void) resize_ui16matrix (uint16 **m, long nrl, long nrh, long ncl, long nch); |
---|
53 | IMAGE_EXPORT(void) resize_si32matrix (sint32 **m, long nrl, long nrh, long ncl, long nch); |
---|
54 | IMAGE_EXPORT(void) resize_ui32matrix (uint32 **m, long nrl, long nrh, long ncl, long nch); |
---|
55 | |
---|
56 | IMAGE_EXPORT(void) resize_f32matrix (float32 **m, long nrl, long nrh, long ncl, long nch); |
---|
57 | IMAGE_EXPORT(void) resize_f64matrix (float64 **m, long nrl, long nrh, long ncl, long nch); |
---|
58 | |
---|
59 | IMAGE_EXPORT(void) resize_rgb8matrix (rgb8 **m, long nrl, long nrh, long ncl, long nch); |
---|
60 | IMAGE_EXPORT(void) resize_rgbx8matrix(rgbx8 **m, long nrl, long nrh, long ncl, long nch); |
---|
61 | |
---|
62 | |
---|
63 | /* |
---|
64 | * ---------------------- |
---|
65 | * --- convert matrix --- |
---|
66 | * ---------------------- |
---|
67 | */ |
---|
68 | |
---|
69 | /* new versions UP */ |
---|
70 | IMAGE_EXPORT(void) convert_si8matrix_si16matrix(sint8 **X, int nrl, int nrh, int ncl, int nch, sint16 **Y); |
---|
71 | IMAGE_EXPORT(void) convert_si8matrix_si32matrix(sint8 **X, int nrl, int nrh, int ncl, int nch, sint32 **Y); |
---|
72 | IMAGE_EXPORT(void) convert_si8matrix_f32matrix (sint8 **X, int nrl, int nrh, int ncl, int nch, float32 **Y); |
---|
73 | IMAGE_EXPORT(void) convert_si8matrix_f64matrix (sint8 **X, int nrl, int nrh, int ncl, int nch, float64 **Y); |
---|
74 | |
---|
75 | IMAGE_EXPORT(void) convert_ui8matrix_ui32matrix (uint8 **X, int nrl, int nrh, int ncl, int nch, uint32 **Y); |
---|
76 | IMAGE_EXPORT(void) convert_ui8matrix_ui16matrix (uint8 **X, int nrl, int nrh, int ncl, int nch, uint16 **Y); |
---|
77 | IMAGE_EXPORT(void) convert_ui8matrix_f32matrix (uint8 **X, int nrl, int nrh, int ncl, int nch, float32 **Y); |
---|
78 | IMAGE_EXPORT(void) convert_ui8matrix_f64matrix (uint8 **X, int nrl, int nrh, int ncl, int nch, float64 **Y); |
---|
79 | |
---|
80 | IMAGE_EXPORT(void) convert_ui8matrix_rgb8matrix (uint8 **X, int nrl, int nrh, int ncl, int nch, rgb8 **Y); |
---|
81 | IMAGE_EXPORT(void) convert_ui8matrix_rgbx8matrix(uint8 **X, int nrl, int nrh, int ncl, int nch, rgbx8 **Y); |
---|
82 | |
---|
83 | IMAGE_EXPORT(void) convert_si16matrix_si32matrix(sint16 **X, int nrl, int nrh, int ncl, int nch, sint32 **Y); |
---|
84 | IMAGE_EXPORT(void) convert_si16matrix_f32matrix (sint16 **X, int nrl, int nrh, int ncl, int nch, float32 **Y); |
---|
85 | IMAGE_EXPORT(void) convert_si16matrix_f64matrix (sint16 **X, int nrl, int nrh, int ncl, int nch, float64 **Y); |
---|
86 | |
---|
87 | IMAGE_EXPORT(void) convert_ui16matrix_ui32matrix(uint16 **X, int nrl, int nrh, int ncl, int nch, uint32 **Y); |
---|
88 | IMAGE_EXPORT(void) convert_ui16matrix_f32matrix (uint16 **X, int nrl, int nrh, int ncl, int nch, float32 **Y); |
---|
89 | IMAGE_EXPORT(void) convert_ui16matrix_f64matrix (uint16 **X, int nrl, int nrh, int ncl, int nch, float64 **Y); |
---|
90 | |
---|
91 | IMAGE_EXPORT(void) convert_si32matrix_f32matrix (sint32 **X, int nrl, int nrh, int ncl, int nch, float32 **Y); |
---|
92 | IMAGE_EXPORT(void) convert_si32matrix_f64matrix (sint32 **X, int nrl, int nrh, int ncl, int nch, float64 **Y); |
---|
93 | |
---|
94 | IMAGE_EXPORT(void) convert_ui32matrix_f32matrix (uint32 **X, int nrl, int nrh, int ncl, int nch, float32 **Y); |
---|
95 | IMAGE_EXPORT(void) convert_ui32matrix_f64matrix (uint32 **X, int nrl, int nrh, int ncl, int nch, float64 **Y); |
---|
96 | |
---|
97 | |
---|
98 | /* new versions DOWN */ |
---|
99 | IMAGE_EXPORT(void) convert_ui16matrix_ui8matrix(uint16 **X, int nrl, int nrh, int ncl, int nch, uint8 **y); |
---|
100 | IMAGE_EXPORT(void) convert_si16matrix_si8matrix(sint16 **X, int nrl, int nrh, int ncl, int nch, sint8 **y); |
---|
101 | IMAGE_EXPORT(void) convert_ui32matrix_ui8matrix(uint32 **X, int nrl, int nrh, int ncl, int nch, uint8 **y); |
---|
102 | IMAGE_EXPORT(void) convert_si32matrix_si8matrix(sint32 **X, int nrl, int nrh, int ncl, int nch, sint8 **y); |
---|
103 | IMAGE_EXPORT(void) convert_f32matrix_ui8matrix (float32 **X, int nrl, int nrh, int ncl, int nch, uint8 **y); |
---|
104 | IMAGE_EXPORT(void) convert_f32matrix_si8matrix (float32 **X, int nrl, int nrh, int ncl, int nch, sint8 **y); |
---|
105 | |
---|
106 | IMAGE_EXPORT(void) convert_ui32matrix_ui16matrix(uint32 **X, int nrl, int nrh, int ncl, int nch, uint16 **y); |
---|
107 | IMAGE_EXPORT(void) convert_si32matrix_si16matrix(sint32 **X, int nrl, int nrh, int ncl, int nch, sint16 **y); |
---|
108 | IMAGE_EXPORT(void) convert_f32matrix_ui16matrix (float32 **X, int nrl, int nrh, int ncl, int nch, uint16 **y); |
---|
109 | IMAGE_EXPORT(void) convert_f32matrix_si16matrix (float32 **X, int nrl, int nrh, int ncl, int nch, sint16 **y); |
---|
110 | |
---|
111 | IMAGE_EXPORT(void) convert_f32matrix_ui32matrix (float32 **X, int nrl, int nrh, int ncl, int nch, uint32 **y); |
---|
112 | IMAGE_EXPORT(void) convert_f32matrix_si32matrix (float32 **X, int nrl, int nrh, int ncl, int nch, sint32 **y); |
---|
113 | |
---|
114 | /* |
---|
115 | * ---------------------- |
---|
116 | * --- lowpart_matrix --- |
---|
117 | * ---------------------- |
---|
118 | */ |
---|
119 | |
---|
120 | IMAGE_EXPORT(void) lowpart_ui32matrix_ui8matrix (uint32 **X, long nrl,long nrh,long ncl, long nch, uint8 **Y); |
---|
121 | IMAGE_EXPORT(void) lowpart_ui32matrix_ui16matrix(uint32 **X, long nrl,long nrh,long ncl, long nch, uint16 **Y); |
---|
122 | |
---|
123 | /* |
---|
124 | * ------------------- |
---|
125 | * --- split-merge --- |
---|
126 | * ------------------- |
---|
127 | */ |
---|
128 | |
---|
129 | IMAGE_EXPORT(void) split_rgb8matrix(rgb8 **X, long nrl, long nrh, long ncl, long nch, uint8 **R, uint8 **G, uint8 **B); |
---|
130 | IMAGE_EXPORT(void) merge_rgb8matrix(uint8 **R, uint8 **G, uint8 **B, long nrl, long nrh, long ncl, long nch, rgb8 **X); |
---|
131 | |
---|
132 | |
---|
133 | #ifdef __cplusplus |
---|
134 | } |
---|
135 | #endif |
---|
136 | |
---|
137 | #else |
---|
138 | //#pragma message(" Warning : attemp to re-include nrmem2.h") |
---|
139 | #endif /* _NRMEM2_H_ */ |
---|