-
Notifications
You must be signed in to change notification settings - Fork 1
/
pycdl.html
219 lines (172 loc) · 13.6 KB
/
pycdl.html
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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: package pycdl</title>
<meta charset="utf-8">
</head><body bgcolor="#f0f0f8">
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>pycdl</strong></big></big> (version 0.5.3)</font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/simon/thera/pycdl/pycdl/__init__.py">/home/simon/thera/pycdl/pycdl/__init__.py</a></font></td></tr></table>
<p><tt>Python <a href="#CDL">CDL</a> parsing library</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Package Contents</strong></big></font></td></tr>
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top></td><td width="25%" valign=top></td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="pycdl.html#CDL">CDL</a>
</font></dt><dt><font face="helvetica, arial"><a href="pycdl.html#ColorCorrection">ColorCorrection</a>
</font></dt><dt><font face="helvetica, arial"><a href="pycdl.html#ColorDecision">ColorDecision</a>
</font></dt></dl>
</dd>
</dl>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="CDL">class <strong>CDL</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>The <a href="#CDL">CDL</a><br>
<br>
Holds :class:`.<a href="#ColorDecision">ColorDecision</a>` instances. It can be indexed to reach each<br>
of the :class: `.<a href="#ColorDecision">ColorDecision</a>` s like::<br>
<br>
>>> cdl = <a href="#CDL">CDL</a>(flavour=<a href="#CDL">CDL</a>.XML_CDL)<br>
>>> cdl.<a href="#CDL-append">append</a>(<a href="#ColorDecision">ColorDecision</a>(color_decision_node))<br>
>>> cdl[0]<br>
<br>
:param str flavour: Optional cdl flavour definition defaults to XML, other<br>
flavours to be added later.<br>
`flavour` can be skipped<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="CDL-__getitem__"><strong>__getitem__</strong></a>(self, item)</dt><dd><tt>returns <a href="#ColorDecision">ColorDecision</a> by index</tt></dd></dl>
<dl><dt><a name="CDL-__init__"><strong>__init__</strong></a>(self, flavour<font color="#909090">='xml_cdl'</font>, filename<font color="#909090">=None</font>, timebase<font color="#909090">='24'</font>)</dt></dl>
<dl><dt><a name="CDL-__len__"><strong>__len__</strong></a>(self)</dt><dd><tt>gets length of color decisions for iterating over color decisions</tt></dd></dl>
<dl><dt><a name="CDL-__repr__"><strong>__repr__</strong></a>(self)</dt><dd><tt>returns string representation of <a href="#CDL">CDL</a></tt></dd></dl>
<dl><dt><a name="CDL-append"><strong>append</strong></a>(self, color_item)</dt></dl>
<dl><dt><a name="CDL-edls_enabled"><strong>edls_enabled</strong></a>(self)</dt></dl>
<dl><dt><a name="CDL-first_color_item"><strong>first_color_item</strong></a>(self)</dt><dd><tt>returns the first color item in the list, simple function,<br>
throws exception if no color item</tt></dd></dl>
<dl><dt><a name="CDL-get_color_items"><strong>get_color_items</strong></a>(self)</dt></dl>
<dl><dt><a name="CDL-get_dom"><strong>get_dom</strong></a>(self, cdl_string)</dt></dl>
<dl><dt><a name="CDL-get_item_type"><strong>get_item_type</strong></a>(self)</dt></dl>
<dl><dt><a name="CDL-load"><strong>load</strong></a>(self, filename)</dt><dd><tt>Loads <a href="#CDL">CDL</a> from filename, passes to the read function for loading</tt></dd></dl>
<dl><dt><a name="CDL-loads"><strong>loads</strong></a>(self, cdl_string)</dt><dd><tt>Loads <a href="#CDL">CDL</a> from string, depending on the flavour definition it passes<br>
to the processing function</tt></dd></dl>
<dl><dt><a name="CDL-parse_edl"><strong>parse_edl</strong></a>(self, cdl_string)</dt></dl>
<dl><dt><a name="CDL-parse_xml"><strong>parse_xml</strong></a>(self, cdl_string)</dt><dd><tt>Parse <a href="#CDL">CDL</a> XML string into <a href="#ColorDecision">ColorDecision</a> objects</tt></dd></dl>
<dl><dt><a name="CDL-read"><strong>read</strong></a>(self, filehandle)</dt><dd><tt>Reads <a href="#CDL">CDL</a> from Filehandle, passed to loads for processing</tt></dd></dl>
<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list of weak references to the object (if defined)</tt></dd>
</dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>COLOR_CORRECTION</strong> = 'COLOR_CORRECTION'</dl>
<dl><dt><strong>COLOR_DECISION</strong> = 'COLOR_DECISION'</dl>
<dl><dt><strong>EDL_CDL</strong> = 'edl_cdl'</dl>
<dl><dt><strong>XML_CDL</strong> = 'xml_cdl'</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="ColorCorrection">class <strong>ColorCorrection</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>An individual color correction <a href="__builtin__.html#object">object</a><br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="ColorCorrection-__init__"><strong>__init__</strong></a>(self, color_correction_node<font color="#909090">=None</font>, cdl_edl_strings<font color="#909090">=None</font>, source_file<font color="#909090">=None</font>)</dt><dd><tt>initialise <a href="__builtin__.html#object">object</a> with a color correction dom <a href="__builtin__.html#object">object</a>, optional</tt></dd></dl>
<dl><dt><a name="ColorCorrection-__repr__"><strong>__repr__</strong></a>(self)</dt><dd><tt>Returns a string representation of the color correction</tt></dd></dl>
<dl><dt><a name="ColorCorrection-get_correction_id"><strong>get_correction_id</strong></a>(self)</dt></dl>
<dl><dt><a name="ColorCorrection-load_dom"><strong>load_dom</strong></a>(self, correction_dom)</dt><dd><tt>Load the color correction from a dom node passed to it. Does not throw<br>
exception but logs parsing errors to the<br>
ERROR log output</tt></dd></dl>
<dl><dt><a name="ColorCorrection-process_edl_string"><strong>process_edl_string</strong></a>(self, s)</dt></dl>
<dl><dt><a name="ColorCorrection-set_correction_id"><strong>set_correction_id</strong></a>(self, correction_id)</dt></dl>
<dl><dt><a name="ColorCorrection-to_JSON"><strong>to_JSON</strong></a>(self)</dt></dl>
<hr>
Static methods defined here:<br>
<dl><dt><a name="ColorCorrection-get_attribute_value_by_name"><strong>get_attribute_value_by_name</strong></a>(node, attribute_name)</dt></dl>
<dl><dt><a name="ColorCorrection-get_float_from_node"><strong>get_float_from_node</strong></a>(node)</dt><dd><tt>Returns the floating point number contained within the node passed to it</tt></dd></dl>
<dl><dt><a name="ColorCorrection-get_float_tuple_from_node"><strong>get_float_tuple_from_node</strong></a>(node)</dt><dd><tt>Returns the floating point numbers as a list contained within the node<br>
passed to it</tt></dd></dl>
<dl><dt><a name="ColorCorrection-get_float_tuple_from_text"><strong>get_float_tuple_from_text</strong></a>(text_string)</dt><dd><tt>Returns the floating point numbers as a list contained within the text<br>
passed to it</tt></dd></dl>
<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list of weak references to the object (if defined)</tt></dd>
</dl>
<dl><dt><strong>correction_id</strong></dt>
</dl>
<dl><dt><strong>filename</strong></dt>
</dl>
<dl><dt><strong>offset</strong></dt>
</dl>
<dl><dt><strong>power</strong></dt>
</dl>
<dl><dt><strong>saturation</strong></dt>
</dl>
<dl><dt><strong>slope</strong></dt>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="ColorDecision">class <strong>ColorDecision</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>A singular color decision can contain multiple color corrections<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="ColorDecision-__getitem__"><strong>__getitem__</strong></a>(self, item)</dt><dd><tt>Returns color correction <a href="__builtin__.html#object">object</a> based on index</tt></dd></dl>
<dl><dt><a name="ColorDecision-__init__"><strong>__init__</strong></a>(self, color_decision_node<font color="#909090">=None</font>, decision_id<font color="#909090">=None</font>, source_file<font color="#909090">=None</font>)</dt><dd><tt>initialise <a href="__builtin__.html#object">object</a> with a color decision dom <a href="__builtin__.html#object">object</a>, optional</tt></dd></dl>
<dl><dt><a name="ColorDecision-__len__"><strong>__len__</strong></a>(self)</dt><dd><tt>Returns number of color corrections available</tt></dd></dl>
<dl><dt><a name="ColorDecision-__repr__"><strong>__repr__</strong></a>(self)</dt><dd><tt>Rteurns a string representation of the color decision</tt></dd></dl>
<dl><dt><a name="ColorDecision-append"><strong>append</strong></a>(self, color_correction)</dt></dl>
<dl><dt><a name="ColorDecision-first_correction"><strong>first_correction</strong></a>(self)</dt><dd><tt>Returns the first available correction in the system throws exception<br>
if none available</tt></dd></dl>
<dl><dt><a name="ColorDecision-get_corrections"><strong>get_corrections</strong></a>(self)</dt></dl>
<dl><dt><a name="ColorDecision-load_dom"><strong>load_dom</strong></a>(self, decision_dom)</dt><dd><tt>Load the color decision from a dom node passed to it.</tt></dd></dl>
<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list of weak references to the object (if defined)</tt></dd>
</dl>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
<td width="100%"><strong>__author__</strong> = 'simon'<br>
<strong>__version__</strong> = '0.5.3'<br>
<strong>allow_edls</strong> = True</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#7799ee">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Author</strong></big></font></td></tr>
<tr><td bgcolor="#7799ee"><tt> </tt></td><td> </td>
<td width="100%">simon</td></tr></table>
</body></html>