-
Notifications
You must be signed in to change notification settings - Fork 1
/
pix_threshold_depth.h
127 lines (92 loc) · 3.67 KB
/
pix_threshold_depth.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
/*-----------------------------------------------------------------
LOG
GEM - Graphics Environment for Multimedia
Clamp pixel values to a threshold
Copyright (c) 1997-1998 Mark Danks. [email protected]
Copyright (c) Günther Geiger. [email protected]
Copyright (c) 2001-2011 IOhannes m zmölnig. forum::für::umläute. IEM. [email protected]
Copyright (c) 2002 James Tittle & Chris Clepper
For information on usage and redistribution, and for a DISCLAIMER OF ALL
WARRANTIES, see the file, "GEM.LICENSE.TERMS" in this distribution.
-----------------------------------------------------------------*/
#ifndef _INCLUDE__GEM_PIXES_pix_threshold_depth_H_
#define _INCLUDE__GEM_PIXES_pix_threshold_depth_H_
#include "Base/GemPixObj.h"
/*-----------------------------------------------------------------
-------------------------------------------------------------------
CLASS
pix_threshold_depth
Clamp pixel values to a threshold
KEYWORDS
pix
DESCRIPTION
Inlet for a list - "vec_thresh"
Inlet for a float - "ft1"
"vec_thresh" - The threshold vector
"ft1" - Set all thresholds to one value
-----------------------------------------------------------------*/
#ifdef _WIN32
class GEM_EXPORT pix_threshold_depth : public GemPixObj
#else
class GEM_EXTERN pix_threshold_depth : public GemPixObj
#endif
{
CPPEXTERN_HEADER(pix_threshold_depth, GemPixObj);
public:
//////////
// Constructor
pix_threshold_depth(t_floatarg min_z, t_floatarg max_z);
protected:
//////////
// Destructor
virtual ~pix_threshold_depth();
//////////
// Do the processing
virtual void processRGBAImage(imageStruct &image);
virtual void processYUVImage(imageStruct &image);
//////////
//////////
// Set the new threshold value
void floatHiThreshMess(float hi_thresh);
void floatLoThreshMess(float lo_thresh);
void floatWhiteningMess(float whitening);
void floatTrimMess(float trim);
void floatInvertMess(float arg);
void floatUsercoloringMess(float arg);
//////////
// The new color
//unsigned char m_thresh[4];
// unsigned char m_Y;
// distance thresholds - min < passing < max
float m_hi_thresh;
float m_lo_thresh;
// if true set passing color to 255 255 255 255
bool m_whitening;
// if true trim x & y
bool m_trim;
// if true invert colors/alpha value
bool m_invert;
// if true let users through
bool m_usercoloring;
// used for trimming picture
float m_x_min;
float m_x_max;
float m_y_min;
float m_y_max;
bool m_active;
private:
//////////
// Static member functions
static void floatHiThreshMessCallback(void *data, t_floatarg hi_thresh);
static void floatLoThreshMessCallback(void *data, t_floatarg lo_thresh);
static void floatXMinMessCallback(void *data, t_floatarg x_min);
static void floatXMaxMessCallback(void *data, t_floatarg x_max);
static void floatYMinMessCallback(void *data, t_floatarg y_min);
static void floatYMaxMessCallback(void *data, t_floatarg y_max);
static void floatWhiteningMessCallback(void *data, t_floatarg arg);
static void floatTrimMessCallback(void *data, t_floatarg arg);
static void floatInvertMessCallback(void *data, t_floatarg arg);
static void floatUsercoloringMessCallback(void *data, t_floatarg arg);
static void activeMessCallback(void *data, t_floatarg value);
};
#endif // for header file