File: refgu040.htm

package info (click to toggle)
dx 1%3A4.4.4-4
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 49,864 kB
  • sloc: ansic: 365,482; cpp: 156,594; sh: 13,801; java: 10,641; makefile: 2,373; awk: 444; yacc: 327
file content (167 lines) | stat: -rw-r--r-- 7,970 bytes parent folder | download | duplicates (12)
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3//EN">
<HTML><HEAD>
		<TITLE>User's Reference - Convert</TITLE>
		<META HTTP-EQUIV="keywords" CONTENT="GRAPHICS VISUALIZATION VISUAL PROGRAM DATA
MINING">
	<meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
</HEAD><BODY BGCOLOR="#FFFFFF" link="#00004b" vlink="#4b004b">
		<TABLE width=510 border=0 cellpadding=0 cellspacing=0>
			<TR>
				<TD><IMG src="../images/spacer.gif" width=80 height=1></TD>
				<TD><IMG src="../images/spacer.gif" width=49 height=1></TD>
				<TD><IMG src="../images/spacer.gif" width=24 height=1></TD>
				<TD><IMG src="../images/spacer.gif" width=100 height=1></TD>
				<TD><IMG src="../images/spacer.gif" width=3 height=1></TD>
				<TD><IMG src="../images/spacer.gif" width=127 height=1></TD>
				<TD><IMG src="../images/spacer.gif" width=6 height=1></TD>
				<TD><IMG src="../images/spacer.gif" width=50 height=1></TD>
				<TD><IMG src="../images/spacer.gif" width=71 height=1></TD>
			</TR>
			<TR>
				<TD colspan=9><IMG src="../images/flcgh_01.gif" width=510 height=24 alt="OpenDX - Documentation"></TD>
			</TR>
			<TR>
				<TD colspan=2><A href="../allguide.htm"><IMG src="../images/flcgh_02.gif" width=129 height=25 border="0" alt="Full Contents"></A></TD>
				<TD colspan=3><A href="../qikguide.htm"><IMG src="../images/flcgh_03.gif" width=127 height=25 border="0" alt="QuickStart Guide"></A></TD>
				<TD><A href="../usrguide.htm"><IMG src="../images/flcgh_04.gif" width=127 height=25 border="0" alt="User's Guide"></A></TD>
				<TD colspan=3><B><A href="../refguide.htm"><IMG src="../images/flcgh_05d.gif" width=127 height=25 border="0" alt="User's Reference"></A></B></TD>
			</TR>
			<TR>
				<TD><A href="refgu039.htm"><IMG src="../images/flcgh_06.gif" width=80 height=17 border="0" alt="Previous Page"></A></TD>
				<TD colspan=2><A href="refgu041.htm"><IMG src="../images/flcgh_07.gif" width=73 height=17 border="0" alt="Next Page"></A></TD>
				<TD><A href="../refguide.htm"><IMG src="../images/flcgh_08.gif" width=100 height=17 border="0" alt="Table of Contents"></A></TD>
				<TD colspan=3><A href="refgu009.htm"><IMG src="../images/flcgh_09.gif" width=136 height=17 border="0" alt="Partial Table of Contents"></A></TD>
				<TD><A href="refgu175.htm"><IMG src="../images/flcgh_10.gif" width=50 height=17 border="0" alt="Index"></A></TD>
				<TD><A href="../srchindx.htm"><IMG src="../images/flcgh_11.gif" width=71 height=17 border="0" alt="Search"></A></TD>
			</TR>
		</TABLE>
		<H3><A name="HDRCONVERT" ></A>Convert</H3>
		<A NAME="IDX440"></A><A NAME="IDX441"></A>
<P><STRONG>Category</STRONG>
<P>
<A HREF="refgu008.htm#HDRCATTRN">Transformation</A>
<P><STRONG>Function</STRONG>
<P>
Converts between RGB and HSV color spaces.
<P><STRONG>Syntax</STRONG>
<PRE>
<STRONG>Output</STRONG> = Convert(<STRONG>data, incolorspace, outcolorspace, addpoints</STRONG>);
</PRE>
<P><STRONG>Inputs</STRONG>
<BR>
<TABLE BORDER>
<TR>
<TH ALIGN="LEFT" VALIGN="TOP" WIDTH="20%">Name
</TH><TH ALIGN="LEFT" VALIGN="TOP" WIDTH="20%">Type
</TH><TH ALIGN="LEFT" VALIGN="TOP" WIDTH="20%">Default
</TH><TH ALIGN="LEFT" VALIGN="TOP" WIDTH="40%">Description
</TH></TR><TR>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH="20%"><TT><STRONG>data</STRONG></TT>
</TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="20%">vector list or field
</TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="20%">none
</TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="40%">input colors or color map
</TD></TR><TR>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH="20%"><TT><STRONG>incolorspace</STRONG></TT>
</TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="20%">string
</TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="20%">&quot;hsv&quot;
</TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="40%">color space of input
</TD></TR><TR>
<TD ALIGN="LEFT" VALIGN="TOP"
WIDTH="20%"><TT><STRONG>outcolorspace</STRONG></TT>
</TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="20%">string
</TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="20%">&quot;rgb&quot;
</TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="40%">color space of output
</TD></TR><TR>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH="20%"><TT><STRONG>addpoints</STRONG></TT>
</TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="20%">integer
</TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="20%">input dependent
</TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="40%">add positions to ensure valid
color transformations
</TD></TR></TABLE>
<P><STRONG>Outputs</STRONG>
<BR>
<TABLE BORDER>
<TR>
<TH ALIGN="LEFT" VALIGN="TOP" WIDTH="25%">Name
</TH><TH ALIGN="LEFT" VALIGN="TOP" WIDTH="25%">Type
</TH><TH ALIGN="LEFT" VALIGN="TOP" WIDTH="50%">Description
</TH></TR><TR>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH="25%"><STRONG>output</STRONG>
</TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="25%">vector list or field
</TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="50%">output colors or color map
</TD></TR></TABLE>
<P><STRONG>Functional Details</STRONG>
<P>
<TABLE CELLPADDING="3">
<TR VALIGN="TOP"><TD><P><B><TT><STRONG>data</STRONG></TT>
</B></TD><TD><P>specifies the value(s) to be converted.
If the parameter value is a vector or list of vectors, the output
is a vector or list of vectors.
These must be of 3-vectors, representing hue, saturation, and value
(HSV) or red, green, and blue (RGB).
<P>
If the parameter value is a field, the module converts the "data"
component of that field (which must consist of 3-vectors) from one
color space to the other.
<P>
The range of hues is 0 (red) to 1 (red); 0.3333 = green and
0.6666 = blue.
Values outside this range simply "wrap."
That is, a hue of 0 = a hue of 1 = a hue of 2, and so on.
<P>
The range of saturation is 0 (white) to 1 (pure color).
<P>
The range of value is 0 (black) to 1 (full intensity).
</TD></TR><TR VALIGN="TOP"><TD><P><B><TT><STRONG>incolorspace</STRONG></TT>
</B></TD><TD><P>is the color space of the input (<TT><STRONG>data</STRONG></TT>)
and
must be "rgb" or "hsv."
</TD></TR><TR VALIGN="TOP"><TD><P><B><TT><STRONG>outcolorspace</STRONG></TT>
</B></TD><TD><P>is the color space of the output and must be "rgb" or
"hsv."
</TD></TR><TR VALIGN="TOP"><TD><P><B><TT><STRONG>addpoints</STRONG></TT>
</B></TD><TD><P>specifies whether points are to be added to the resulting
output:
<P>
If <TT><STRONG>data</STRONG></TT> is a color map (i.e., if it has 1-D positions
and 3-D data), the default value (1) specifies that points will be
added to the "positions" component of the map so that
the conversion between color spaces (which is
nonlinear) remains valid.
A parameter value of 0 (zero) specifies that no points are to
be added.
<P>
A parameter value of 1 (one) is valid <I>only</I> if the input
is a color map.
If the input object is <I>not</I> a color map (i.e., if it has
positions of dimensionality greater than 1), the default value
is 0 (zero) and the "data" component is converted as specified by
<TT><STRONG>incolorspace</STRONG></TT> and
<TT><STRONG>outcolorspace</STRONG></TT>
in one-to-one fashion.
</TD></TR></TABLE>
<P><STRONG>Components</STRONG>
<P>
Modifies the "data" component and may modify the "positions"
component.

All other input components are propagated to the output.
<P><STRONG>Example Visual Programs</STRONG>
<PRE>
AlternateVisualizations.net
UsingCompute.net
</PRE>
<P><STRONG>See Also</STRONG>
<P>
&nbsp;<A HREF="refgu033.htm#HDRCOLOR">Color</A>
		<P>
		<HR>
		<DIV align="center">
			<P><A href="../allguide.htm"><IMG src="../images/foot-fc.gif" width="94" height="18" border="0" alt="Full Contents"></A> <A href="../qikguide.htm"><IMG src="../images/foot-qs.gif" width="94" height="18" border="0" alt="QuickStart Guide"></A> <A href="../usrguide.htm"><IMG src="../images/foot-ug.gif" width="94" height="18" border="0" alt="User's Guide"></A> <A href="../refguide.htm"><IMG src="../images/foot-ur.gif" width="94" height="18" border="0" alt="User's Reference"></A></P>
		</DIV>
		<DIV align="center">
			<P><FONT size="-1">[ <A href="http://www.research.ibm.com/dx">OpenDX Home at IBM</A>&nbsp;|&nbsp;<A href="http://www.opendx.org/">OpenDX.org</A>&nbsp;] </FONT></P>
			<P></P>
		</DIV>
		<P></P>
	</BODY></HTML>