1 |
gross |
606 |
\chapter{The module \pyvisi} |
2 |
jongui |
879 |
\label{PYVISI CHAP} |
3 |
|
|
|
4 |
gross |
606 |
\declaremodule{extension}{pyvisi} |
5 |
jongui |
879 |
\modulesynopsis{Python visualization interface} |
6 |
gross |
606 |
|
7 |
jongui |
879 |
\pyvisi provides an easy to use interface to the \VTK visualization |
8 |
jongui |
886 |
tool. \pyvisi provides the following modules: |
9 |
gross |
606 |
|
10 |
jongui |
879 |
\begin{itemize} |
11 |
|
|
\item \Scene: Shows a scene in which components are to be displayed. |
12 |
jongui |
886 |
\item \Image: Shows an image. |
13 |
|
|
\item \Text: Shows some 2D text. |
14 |
jongui |
879 |
\item \DataCollector: Deals with data for visualization. |
15 |
|
|
\item \Camera: Controls the camera manipulation. |
16 |
jongui |
886 |
\item \Light: Controls the light manipulation. |
17 |
jongui |
879 |
\item \Map: Shows a scalar field by color on the domain surface. |
18 |
|
|
\item \MapOnPlane: Shows a scalar field by color on a given plane. |
19 |
|
|
\item \MapOnClip: Shows a scalar field by color on a given clip. |
20 |
jongui |
886 |
\item \MapOnScalarClip: Shows a scalar field by color on a give scalar clip. |
21 |
jongui |
879 |
\item \Arrows: Shows a vector field by arrows. |
22 |
|
|
\item \ArrowsOnPlane: Shows a vector field by arrows on a given plane. |
23 |
|
|
\item \ArrowsOnClip: Shows a vector field by arrows on a given clip. |
24 |
|
|
\item \IsoSurface: Shows a scalar field for a given value by |
25 |
|
|
an isosurface. |
26 |
|
|
\item \IsoSurfaceOnPlane: Shows a scalar field for a given value by |
27 |
|
|
an isosurfaceon a given plane. |
28 |
|
|
\item \IsoSurfaceOnClip: Shows a scalar field for a given vlaue by |
29 |
|
|
an isosurface on a given clip. |
30 |
|
|
\item \Contour: Shows a scalar field by contour surfaces. |
31 |
|
|
\item \ContourOnPlane: Shows a scalar field by contour surfaces on |
32 |
|
|
a given plane. |
33 |
|
|
\item \ContourOnClip: Shows a scalar field by contour surfaces on |
34 |
|
|
a given clip. |
35 |
|
|
\item \TensorC: Shows a tensor field by ellipsoids. |
36 |
|
|
\item \TensorOnPlane: Shows a tensor field by ellipsoids on |
37 |
|
|
a given plane. |
38 |
|
|
\item \TensorOnClip: Shows a tensor field by ellipsoids on a given clip. |
39 |
|
|
\item \StreamLines: Shows the path of particles in a vector field. |
40 |
|
|
\item \Carpet: Shows a scalar field as plane deformated along |
41 |
|
|
the plane normal. |
42 |
|
|
\item \Position: Defines the x,y and z coordinates rendered object. |
43 |
|
|
\item \Transform: Defines the orientation of rendered object. |
44 |
|
|
\item \Style: Defines the style of text. |
45 |
|
|
\item \BlueToRed: Defines a map spectrum from blue to red. |
46 |
|
|
\item \RedToBlue: Defines a map spectrum from red to blue. |
47 |
jongui |
886 |
\item \Plane: Defines the cutting/clipping of rendered objects. |
48 |
jongui |
879 |
\end{itemize} |
49 |
gross |
606 |
|
50 |
jongui |
879 |
\section{\Scene class} |
51 |
|
|
\begin{classdesc}{Scene}{renderer, x_size = 500, y_size = 500} |
52 |
|
|
A \Scene object creates a window onto which objects are to be displayed. |
53 |
|
|
\end{classdesc} |
54 |
gross |
606 |
|
55 |
jongui |
879 |
The following are the methods available: |
56 |
|
|
\begin{methoddesc}[Scene]{saveImage}{image_name} |
57 |
|
|
Save the rendered object as an image off-screen. |
58 |
|
|
\end{methoddesc} |
59 |
gross |
606 |
|
60 |
jongui |
879 |
\begin{methoddesc}[Scene]{render}{} |
61 |
|
|
Render the object on-screen. |
62 |
|
|
\end{methoddesc} |
63 |
gross |
606 |
|
64 |
jongui |
879 |
The following is a sample code using the \Scene class: |
65 |
|
|
\verbatiminput{../examples/driverscene.py} |
66 |
gross |
606 |
|
67 |
jongui |
886 |
\section{\Image class} |
68 |
|
|
\begin{classdesc}{Image}{scene, format} |
69 |
|
|
An \Image object shows an image. |
70 |
|
|
\end{classdesc} |
71 |
|
|
|
72 |
|
|
The following is the method available: |
73 |
|
|
\begin{methoddesc}[Image]{setFileName}{file_name} |
74 |
|
|
Set the file name. |
75 |
|
|
\end{methoddesc} |
76 |
|
|
|
77 |
|
|
The following is a sample code using the \Image class. |
78 |
|
|
\fig{fig:image.1} shows the corresponding output. |
79 |
|
|
\verbatiminput{../examples/driverimage.py} |
80 |
|
|
|
81 |
|
|
\begin{figure}[ht] |
82 |
|
|
\begin{center} |
83 |
|
|
\includegraphics[width=40mm]{figures/Image} |
84 |
|
|
\end{center} |
85 |
|
|
\caption{Image} |
86 |
|
|
\label{fig:image.1} |
87 |
|
|
\end{figure} |
88 |
|
|
|
89 |
|
|
\section{\Text class} |
90 |
|
|
\begin{classdesc}{Text}{scene} |
91 |
|
|
A \Text object shows 2D text. |
92 |
|
|
\end{classdesc} |
93 |
|
|
|
94 |
|
|
The following are the methods available: |
95 |
|
|
\begin{methoddesc}[Text]{setText}{text} |
96 |
|
|
Set the text. |
97 |
|
|
\end{methoddesc} |
98 |
|
|
|
99 |
|
|
\begin{methoddesc}[Text]{setPosition}{x_coor, y_coor} |
100 |
|
|
Set the display position of the text. |
101 |
|
|
\end{methoddesc} |
102 |
|
|
|
103 |
|
|
\begin{methoddesc}[Text]{setStyle}{style} |
104 |
|
|
Set the style of the text. |
105 |
|
|
\end{methoddesc} |
106 |
|
|
|
107 |
|
|
The following is a sample code using the \Text class. |
108 |
|
|
\fig{fig:text.1} shows the corresponding output. |
109 |
|
|
\verbatiminput{../examples/drivertext.py} |
110 |
|
|
|
111 |
|
|
\begin{figure}[ht] |
112 |
|
|
\begin{center} |
113 |
|
|
\includegraphics[width=40mm]{figures/Text} |
114 |
|
|
\end{center} |
115 |
|
|
\caption{2D text} |
116 |
|
|
\label{fig:text.1} |
117 |
|
|
\end{figure} |
118 |
|
|
|
119 |
jongui |
879 |
\section{\DataCollector class} |
120 |
|
|
\begin{classdesc}{DataCollector}{scene, outline = True, cube_axes = False} |
121 |
|
|
A \DataCollector object deals with the data for visualization. |
122 |
|
|
\end{classdesc} |
123 |
gross |
606 |
|
124 |
jongui |
879 |
The following are the methods available: |
125 |
|
|
\begin{methoddesc}[DataCollector]{setFileName}{file_name} |
126 |
|
|
Set the file name from which data is to be read. |
127 |
|
|
\end{methoddesc} |
128 |
gross |
606 |
|
129 |
jongui |
879 |
The following is a sample code using the \DataCollector class. |
130 |
|
|
\fig{fig:datacollector.1} shows the corresponding output. |
131 |
|
|
\verbatiminput{../examples/driverdatacollector.py} |
132 |
gross |
606 |
|
133 |
jongui |
879 |
\begin{figure}[ht] |
134 |
|
|
\begin{center} |
135 |
|
|
\includegraphics[width=40mm]{figures/DataCollector} |
136 |
|
|
\end{center} |
137 |
|
|
\caption{Datacollector generating an outline with cube axes.} |
138 |
|
|
\label{fig:datacollector.1} |
139 |
|
|
\end{figure} |
140 |
gross |
606 |
|
141 |
jongui |
879 |
\section{\Camera class} |
142 |
|
|
\begin{classdesc}{Camera}{scene, data_collector} |
143 |
|
|
A \Camera object controls the camera's settings. |
144 |
|
|
\end{classdesc} |
145 |
gross |
606 |
|
146 |
jongui |
879 |
The following are some of the methods available: |
147 |
|
|
\begin{methoddesc}[Camera]{setFocalPoint}{position} |
148 |
|
|
Set the focal point of the camera. |
149 |
|
|
\end{methoddesc} |
150 |
gross |
606 |
|
151 |
jongui |
879 |
\begin{methoddesc}[Camera]{setPosition}{position} |
152 |
|
|
Set the position of the camera. |
153 |
|
|
\end{methoddesc} |
154 |
gross |
606 |
|
155 |
jongui |
879 |
\begin{methoddesc}[Camera]{azimuth}{angle} |
156 |
|
|
Rotate the camera to the left and right. |
157 |
|
|
\end{methoddesc} |
158 |
gross |
606 |
|
159 |
jongui |
879 |
\begin{methoddesc}[Camera]{elevation}{angle} |
160 |
|
|
Rotate the camera to the top and bottom. |
161 |
|
|
\end{methoddesc} |
162 |
gross |
606 |
|
163 |
jongui |
879 |
\begin{methoddesc}[Camera]{roll}{angle} |
164 |
|
|
Roll the camera to the left and right. |
165 |
|
|
\end{methoddesc} |
166 |
gross |
606 |
|
167 |
jongui |
879 |
\begin{methoddesc}[Camera]{backView}{} |
168 |
|
|
View the back of the rendered object. |
169 |
|
|
\end{methoddesc} |
170 |
gross |
606 |
|
171 |
jongui |
879 |
\begin{methoddesc}[Camera]{topView}{} |
172 |
|
|
View the top of the rendered object. |
173 |
|
|
\end{methoddesc} |
174 |
gross |
606 |
|
175 |
jongui |
879 |
\begin{methoddesc}[Camera]{bottomView}{} |
176 |
|
|
View the bottom of the rendered object. |
177 |
|
|
\end{methoddesc} |
178 |
gross |
606 |
|
179 |
jongui |
879 |
\begin{methoddesc}[Camera]{leftView}{} |
180 |
|
|
View the left side of the rendered object. |
181 |
|
|
\end{methoddesc} |
182 |
gross |
606 |
|
183 |
jongui |
879 |
\begin{methoddesc}[Camera]{rightView}{} |
184 |
|
|
View the right side of the rendered object. |
185 |
|
|
\end{methoddesc} |
186 |
gross |
606 |
|
187 |
jongui |
882 |
\begin{methoddesc}[Camera]{isometricView}{} |
188 |
|
|
View the isometric side of the rendered object. |
189 |
|
|
\end{methoddesc} |
190 |
|
|
|
191 |
jongui |
879 |
The following is a sample code using the \Camera class. |
192 |
|
|
\fig{fig:camera.1} shows the corresponding output. |
193 |
|
|
\verbatiminput{../examples/drivercamera.py} |
194 |
gross |
606 |
|
195 |
jongui |
879 |
\begin{figure}[ht] |
196 |
|
|
\begin{center} |
197 |
|
|
\includegraphics[width=30mm]{figures/Camera} |
198 |
|
|
\end{center} |
199 |
|
|
\caption{Camera manipulation} |
200 |
|
|
\label{fig:camera.1} |
201 |
|
|
\end{figure} |
202 |
gross |
606 |
|
203 |
jongui |
886 |
\section{\Light class} |
204 |
|
|
\begin{classdesc}{Light}{scene, data_collector} |
205 |
|
|
A \Light object controls the light's settings. |
206 |
|
|
\end{classdesc} |
207 |
|
|
|
208 |
|
|
The following are the methods available: |
209 |
|
|
\begin{methoddesc}[Light]{setColor}{color} |
210 |
|
|
Set the color of the light. |
211 |
|
|
\end{methoddesc} |
212 |
|
|
|
213 |
|
|
\begin{methoddesc}[Light]{setFocalPoint}{position} |
214 |
|
|
Set the focal point of the light. |
215 |
|
|
\end{methoddesc} |
216 |
|
|
|
217 |
|
|
\begin{methoddesc}[Light]{setPosition}{position} |
218 |
|
|
Set the position of the light. |
219 |
|
|
\end{methoddesc} |
220 |
|
|
|
221 |
|
|
\begin{methoddesc}[Light]{setIntensity}{intesity} |
222 |
|
|
Set the intensity (brightness) of the light. |
223 |
|
|
\end{methoddesc} |
224 |
|
|
|
225 |
|
|
The following is a sample code using the \Light class. |
226 |
|
|
\fig{fig:light.1} shows the corresponding output. |
227 |
|
|
\verbatiminput{../examples/driverlight.py} |
228 |
|
|
|
229 |
|
|
\begin{figure}[ht] |
230 |
|
|
\begin{center} |
231 |
|
|
\includegraphics[width=40mm]{figures/Light} |
232 |
|
|
\end{center} |
233 |
|
|
\caption{Light} |
234 |
|
|
\label{fig:light.1} |
235 |
|
|
\end{figure} |
236 |
|
|
|
237 |
jongui |
879 |
\section{\Map class} |
238 |
|
|
\begin{classdesc}{Map}{scene, data_collector, lut = None} |
239 |
|
|
A \Map object shows a scalar field by color on the domain surface. |
240 |
|
|
\end{classdesc} |
241 |
gross |
606 |
|
242 |
jongui |
879 |
The following is a sample code using the \Map class. |
243 |
|
|
\fig{fig:map.1} shows the corresponding output. |
244 |
|
|
\verbatiminput{../examples/drivermap.py} |
245 |
gross |
606 |
|
246 |
jongui |
879 |
\begin{figure}[ht] |
247 |
|
|
\begin{center} |
248 |
|
|
\includegraphics[width=40mm]{figures/Map} |
249 |
|
|
\end{center} |
250 |
|
|
\caption{Surface map} |
251 |
|
|
\label{fig:map.1} |
252 |
|
|
\end{figure} |
253 |
gross |
606 |
|
254 |
jongui |
879 |
\section{\MapOnPlane class} |
255 |
|
|
\begin{classdesc}{MapOnPlane}{scene, data_collector, transform, lut = None} |
256 |
|
|
A \MapOnPlane object show a scalar field by color on a given plane. |
257 |
|
|
\end{classdesc} |
258 |
gross |
606 |
|
259 |
jongui |
879 |
The following is a sample code using the \MapOnPlane class. |
260 |
|
|
\fig{fig:maponplane.1} shows the corresponding output. |
261 |
|
|
\verbatiminput{../examples/drivermaponplane.py} |
262 |
gross |
606 |
|
263 |
jongui |
879 |
\begin{figure}[ht] |
264 |
|
|
\begin{center} |
265 |
|
|
\includegraphics[width=40mm]{figures/MapOnPlane} |
266 |
|
|
\end{center} |
267 |
|
|
\caption{Surface map on a plane} |
268 |
|
|
\label{fig:maponplane.1} |
269 |
|
|
\end{figure} |
270 |
gross |
606 |
|
271 |
jongui |
879 |
\section{\MapOnClip class} |
272 |
|
|
\begin{classdesc}{MapOnClip}{scene, data_collector, transform, lut = None} |
273 |
|
|
A \MapOnClip object show a scalar field by color on a given clip. |
274 |
|
|
\end{classdesc} |
275 |
gross |
606 |
|
276 |
jongui |
879 |
The following is a sample code using the \MapOnClip class. |
277 |
|
|
\fig{fig:maponclip.1} shows the corresponding output. |
278 |
|
|
\verbatiminput{../examples/drivermaponclip.py} |
279 |
gross |
606 |
|
280 |
jongui |
879 |
\begin{figure}[ht] |
281 |
|
|
\begin{center} |
282 |
|
|
\includegraphics[width=40mm]{figures/MapOnClip} |
283 |
|
|
\end{center} |
284 |
|
|
\caption{Surface map on a clip} |
285 |
|
|
\label{fig:maponclip.1} |
286 |
|
|
\end{figure} |
287 |
gross |
606 |
|
288 |
jongui |
886 |
\section{\MapOnScalarClip class} |
289 |
|
|
\begin{classdesc}{MapOnScalarClip}{scene, data_collector, lut = None} |
290 |
|
|
A \MapOnScalarClip object show a scalar field by color on a given scalar clip. |
291 |
|
|
\end{classdesc} |
292 |
|
|
|
293 |
|
|
The following is a sample code using the \MapOnScalarClip class. |
294 |
|
|
\fig{fig:maponscalarclip.1} shows the corresponding output. |
295 |
|
|
\verbatiminput{../examples/drivermaponscalarclip.py} |
296 |
|
|
|
297 |
|
|
\begin{figure}[ht] |
298 |
|
|
\begin{center} |
299 |
|
|
\includegraphics[width=40mm]{figures/MapOnScalarClip} |
300 |
|
|
\end{center} |
301 |
|
|
\caption{Surface map on a scalar clip} |
302 |
|
|
\label{fig:maponscalarclip.1} |
303 |
|
|
\end{figure} |
304 |
|
|
|
305 |
jongui |
879 |
\section{\Arrows class} |
306 |
|
|
\begin{classdesc}{Arrows}{scene, data_collector, lut = None} |
307 |
|
|
A \Arrows object shows a vector field by arrows. |
308 |
|
|
\end{classdesc} |
309 |
gross |
606 |
|
310 |
jongui |
879 |
The following are the methods available: |
311 |
|
|
\begin{methoddesc}[Arrows]{setVectorMode}{vector_mode} |
312 |
|
|
Set the arrows vector mode. |
313 |
|
|
\end{methoddesc} |
314 |
gross |
606 |
|
315 |
jongui |
879 |
\begin{methoddesc}[Arrows]{setScaleMode}{scale_mode} |
316 |
|
|
Set the arrows scale mode. |
317 |
|
|
\end{methoddesc} |
318 |
gross |
606 |
|
319 |
jongui |
879 |
\begin{methoddesc}[Arrows]{setScaleFactor}{scale_factor} |
320 |
|
|
Set the arrows scale factor. |
321 |
|
|
\end{methoddesc} |
322 |
gross |
606 |
|
323 |
jongui |
879 |
\begin{methoddesc}[Arrows]{setColorMode}{color_mode} |
324 |
|
|
Set the arrows color mode. |
325 |
|
|
\end{methoddesc} |
326 |
gross |
606 |
|
327 |
jongui |
879 |
The following is a sample code using the \Arrows class. |
328 |
|
|
\fig{fig:arrows.1} shows the corresponding output. |
329 |
|
|
\verbatiminput{../examples/driverarrows.py} |
330 |
gross |
606 |
|
331 |
jongui |
879 |
\begin{figure}[ht] |
332 |
|
|
\begin{center} |
333 |
|
|
\includegraphics[width=40mm]{figures/Arrows} |
334 |
|
|
\end{center} |
335 |
|
|
\caption{Arrows} |
336 |
|
|
\label{fig:arrows.1} |
337 |
|
|
\end{figure} |
338 |
gross |
606 |
|
339 |
jongui |
879 |
\section{\ArrowsOnPlane class} |
340 |
|
|
\begin{classdesc}{ArrowsOnPlane}{scene, data_collector, transform, lut = None} |
341 |
|
|
A \ArrowsOnPlane object shows a vector field by arrows on a given plane. |
342 |
|
|
\end{classdesc} |
343 |
gross |
606 |
|
344 |
jongui |
879 |
The following is a sample code using the \ArrowsOnPlane class. |
345 |
|
|
\fig{fig:arrowsonplane.1} shows the corresponding output. |
346 |
|
|
\verbatiminput{../examples/driverarrowsonplane.py} |
347 |
gross |
606 |
|
348 |
jongui |
879 |
\begin{figure}[ht] |
349 |
|
|
\begin{center} |
350 |
|
|
\includegraphics[width=40mm]{figures/ArrowsOnPlane} |
351 |
|
|
\end{center} |
352 |
|
|
\caption{Arrows on a plane} |
353 |
|
|
\label{fig:arrowsonplane.1} |
354 |
|
|
\end{figure} |
355 |
gross |
606 |
|
356 |
jongui |
879 |
\section{\ArrowsOnClip class} |
357 |
|
|
\begin{classdesc}{ArrowsOnClip}{scene, data_collector, transform, lut = None} |
358 |
|
|
A \ArrowsOnClip object shows a vector field by arrows on a given clip. |
359 |
|
|
\end{classdesc} |
360 |
gross |
606 |
|
361 |
jongui |
879 |
The following is a sample code using the \ArrowsOnClip class. |
362 |
|
|
\fig{fig:arrowsonclip.1} shows the corresponding output. |
363 |
|
|
\verbatiminput{../examples/driverarrowsonclip.py} |
364 |
gross |
606 |
|
365 |
jongui |
879 |
\begin{figure}[ht] |
366 |
|
|
\begin{center} |
367 |
|
|
\includegraphics[width=40mm]{figures/ArrowsOnClip} |
368 |
|
|
\end{center} |
369 |
|
|
\caption{Arrows on a clip} |
370 |
|
|
\label{fig:arrowsonclip.1} |
371 |
|
|
\end{figure} |
372 |
gross |
606 |
|
373 |
|
|
|
374 |
jongui |
879 |
\section{\IsoSurface class} |
375 |
|
|
\begin{classdesc}{IsoSurface}{scene, data_collector, lut = None} |
376 |
|
|
An \IsoSurface object shows a scalar field for a given value by an isosurface. |
377 |
|
|
\end{classdesc} |
378 |
gross |
606 |
|
379 |
jongui |
879 |
The following is the method available: |
380 |
gross |
606 |
|
381 |
jongui |
879 |
\begin{methoddesc}[IsoSurface]{setValue}{contour_number, value} |
382 |
|
|
Set the contour number and value. |
383 |
|
|
\end{methoddesc} |
384 |
gross |
606 |
|
385 |
jongui |
879 |
The following is a sample code using the \IsoSurface class. |
386 |
|
|
\fig{fig:isosurface.1} shows the corresponding output. |
387 |
|
|
\verbatiminput{../examples/driverisosurface.py} |
388 |
gross |
606 |
|
389 |
jongui |
879 |
\begin{figure}[ht] |
390 |
|
|
\begin{center} |
391 |
|
|
\includegraphics[width=40mm]{figures/IsoSurface} |
392 |
|
|
\end{center} |
393 |
|
|
\caption{IsoSurface} |
394 |
|
|
\label{fig:isosurface.1} |
395 |
|
|
\end{figure} |
396 |
gross |
606 |
|
397 |
jongui |
879 |
\section{\IsoSurfaceOnPlane class} |
398 |
|
|
\begin{classdesc}{IsoSurfaceOnPlane}{scene, data_collector, transform, |
399 |
|
|
lut = None} |
400 |
|
|
An \IsoSurfaceOnPlane object shows a scalar field for a given value |
401 |
|
|
by an isosurface on a given plane. |
402 |
|
|
\end{classdesc} |
403 |
gross |
606 |
|
404 |
jongui |
879 |
The following is a sample code using the \IsoSurfaceOnPlane class. |
405 |
|
|
\fig{fig:isosurfaceonplane.1} shows the corresponding output. |
406 |
|
|
\verbatiminput{../examples/driverisosurfaceonplane.py} |
407 |
gross |
606 |
|
408 |
jongui |
879 |
\begin{figure}[ht] |
409 |
|
|
\begin{center} |
410 |
|
|
\includegraphics[width=40mm]{figures/IsoSurfaceOnPlane} |
411 |
|
|
\end{center} |
412 |
|
|
\caption{IsoSurface on a plane} |
413 |
|
|
\label{fig:isosurfaceonplane.1} |
414 |
|
|
\end{figure} |
415 |
gross |
606 |
|
416 |
jongui |
879 |
\section{\IsoSurfaceOnClip class} |
417 |
|
|
\begin{classdesc}{IsoSurfaceOnClip}{scene, data_collector, transform, |
418 |
|
|
lut = None} |
419 |
|
|
An \IsoSurfaceOnClip object shows a scalar field for a given value |
420 |
|
|
by an isosurface on a given clip. |
421 |
|
|
\end{classdesc} |
422 |
gross |
606 |
|
423 |
jongui |
879 |
The following is a sample code using the \IsoSurfaceOnClip class. |
424 |
|
|
\fig{fig:isosurfaceonclip.1} shows the corresponding output. |
425 |
|
|
\verbatiminput{../examples/driverisosurfaceonclip.py} |
426 |
gross |
606 |
|
427 |
jongui |
879 |
\begin{figure}[ht] |
428 |
|
|
\begin{center} |
429 |
|
|
\includegraphics[width=40mm]{figures/IsoSurfaceOnClip} |
430 |
|
|
\end{center} |
431 |
|
|
\caption{IsoSurface on a clip} |
432 |
|
|
\label{fig:isosurfaceonclip.1} |
433 |
|
|
\end{figure} |
434 |
gross |
606 |
|
435 |
jongui |
879 |
\section{\Contour class} |
436 |
|
|
\begin{classdesc}{Contour}{scene, data_collector, lut = None} |
437 |
|
|
A \Contour object shows a scalar field contour surfaces. |
438 |
|
|
\end{classdesc} |
439 |
gross |
606 |
|
440 |
jongui |
879 |
The following is the method available: |
441 |
|
|
\begin{methoddesc}[Contour]{generateValues}{number_contours, min_range, |
442 |
|
|
max_range} |
443 |
|
|
Generate the specified number of contours within the specified range. |
444 |
|
|
\end{methoddesc} |
445 |
gross |
606 |
|
446 |
jongui |
879 |
The following is a sample code using the \Contour class. |
447 |
|
|
\fig{fig:contour.1} shows the corresponding output. |
448 |
|
|
\verbatiminput{../examples/drivercontour.py} |
449 |
gross |
606 |
|
450 |
jongui |
879 |
\begin{figure}[ht] |
451 |
|
|
\begin{center} |
452 |
|
|
\includegraphics[width=40mm]{figures/Contour} |
453 |
|
|
\end{center} |
454 |
|
|
\caption{Contour} |
455 |
|
|
\label{fig:contour.1} |
456 |
|
|
\end{figure} |
457 |
gross |
606 |
|
458 |
jongui |
879 |
\section{\ContourOnPlane class} |
459 |
|
|
\begin{classdesc}{ContourOnPlane}{scene, data_collector, transform, lut = None} |
460 |
|
|
A \ContourOnPlane object shows a scalar field contour surfaces on a given plane. |
461 |
|
|
\end{classdesc} |
462 |
gross |
606 |
|
463 |
jongui |
879 |
The following is a sample code using the \ContourOnPlane class. |
464 |
|
|
\fig{fig:contouronplane.1} shows the corresponding output. |
465 |
|
|
\verbatiminput{../examples/drivercontouronplane.py} |
466 |
gross |
606 |
|
467 |
jongui |
879 |
\begin{figure}[ht] |
468 |
|
|
\begin{center} |
469 |
|
|
\includegraphics[width=40mm]{figures/ContourOnPlane} |
470 |
|
|
\end{center} |
471 |
|
|
\caption{Contour on a plane} |
472 |
|
|
\label{fig:contouronplane.1} |
473 |
|
|
\end{figure} |
474 |
gross |
606 |
|
475 |
jongui |
879 |
\section{\ContourOnClip class} |
476 |
|
|
\begin{classdesc}{ContourOnClip}{scene, data_collector, transform, lut = None} |
477 |
|
|
A \ContourOnClip object shows a scalar field contour surfaces on a given clip. |
478 |
|
|
\end{classdesc} |
479 |
gross |
606 |
|
480 |
jongui |
879 |
The following is a sample code using the \ContourOnClip class. |
481 |
|
|
\fig{fig:contouronclip.1} shows the corresponding output. |
482 |
|
|
\verbatiminput{../examples/drivercontouronclip.py} |
483 |
gross |
606 |
|
484 |
jongui |
879 |
\begin{figure}[ht] |
485 |
|
|
\begin{center} |
486 |
|
|
\includegraphics[width=40mm]{figures/ContourOnClip} |
487 |
|
|
\end{center} |
488 |
|
|
\caption{Contour on a clip} |
489 |
|
|
\label{fig:contouronclip.1} |
490 |
|
|
\end{figure} |
491 |
gross |
606 |
|
492 |
jongui |
879 |
\section{\TensorC class} |
493 |
|
|
\begin{classdesc}{Tensor}{scene, data_collector, lut = None} |
494 |
|
|
A \TensorC object shows a tensor field by ellipsoids. |
495 |
|
|
\end{classdesc} |
496 |
gross |
606 |
|
497 |
jongui |
879 |
The following are the methods available: |
498 |
|
|
\begin{methoddesc}[Tensor]{setThetaResolution}{resolution} |
499 |
|
|
Set the number of points in the longitude direction. |
500 |
|
|
\end{methoddesc} |
501 |
gross |
606 |
|
502 |
jongui |
879 |
\begin{methoddesc}[Tensor]{setPhiResolution}{resolution} |
503 |
|
|
Set the number of points in the latitude direction. |
504 |
|
|
\end{methoddesc} |
505 |
gross |
606 |
|
506 |
jongui |
879 |
\begin{methoddesc}[Tensor]{setScaleFactor}{scale_factor} |
507 |
|
|
Set the tensor scale factor. |
508 |
|
|
\end{methoddesc} |
509 |
gross |
606 |
|
510 |
jongui |
879 |
\begin{methoddesc}[Tensor]{setMaxScaleFactor}{max_scale_factor} |
511 |
|
|
Set the maximum allowable scale factor. |
512 |
|
|
\end{methoddesc} |
513 |
gross |
606 |
|
514 |
jongui |
879 |
The following is a sample code using the \TensorC class. |
515 |
|
|
\fig{fig:tensor.1} shows the corresponding output. |
516 |
|
|
\verbatiminput{../examples/drivertensor.py} |
517 |
gross |
606 |
|
518 |
jongui |
879 |
\begin{figure}[ht] |
519 |
|
|
\begin{center} |
520 |
|
|
\includegraphics[width=40mm]{figures/Tensor} |
521 |
|
|
\end{center} |
522 |
|
|
\caption{Tensor} |
523 |
|
|
\label{fig:tensor.1} |
524 |
|
|
\end{figure} |
525 |
gross |
606 |
|
526 |
jongui |
879 |
\section{\TensorOnPlane class} |
527 |
|
|
\begin{classdesc}{TensorOnPlane}{scene, data_collector, transform, lut = None} |
528 |
|
|
A \TensorOnPlane object shows a tensor field by ellipsoids on a given plane. |
529 |
|
|
\end{classdesc} |
530 |
gross |
606 |
|
531 |
jongui |
879 |
The following is a sample code using the \TensorOnPlane class. |
532 |
|
|
\fig{fig:tensoronplane.1} shows the corresponding output. |
533 |
|
|
\verbatiminput{../examples/drivertensoronplane.py} |
534 |
gross |
606 |
|
535 |
jongui |
879 |
\begin{figure}[ht] |
536 |
|
|
\begin{center} |
537 |
|
|
\includegraphics[width=40mm]{figures/TensorOnPlane} |
538 |
|
|
\end{center} |
539 |
|
|
\caption{Tensor on a plane} |
540 |
|
|
\label{fig:tensoronplane.1} |
541 |
|
|
\end{figure} |
542 |
gross |
606 |
|
543 |
jongui |
879 |
\section{\TensorOnClip class} |
544 |
|
|
\begin{classdesc}{TensorOnClip}{scene, data_collector, transform, lut = None} |
545 |
|
|
A \TensorOnClip object shows a tensor field by ellipsoids on a given clip. |
546 |
|
|
\end{classdesc} |
547 |
gross |
606 |
|
548 |
jongui |
879 |
The following is a sample code using the \TensorOnClip class. |
549 |
|
|
\fig{fig:tensoronclip.1} shows the corresponding output. |
550 |
|
|
\verbatiminput{../examples/drivertensoronclip.py} |
551 |
gross |
606 |
|
552 |
jongui |
879 |
\begin{figure}[ht] |
553 |
|
|
\begin{center} |
554 |
|
|
\includegraphics[width=40mm]{figures/TensorOnClip} |
555 |
|
|
\end{center} |
556 |
|
|
\caption{Tensor on a clip} |
557 |
|
|
\label{fig:tensoronclip.1} |
558 |
|
|
\end{figure} |
559 |
gross |
606 |
|
560 |
jongui |
879 |
\section{\StreamLines class} |
561 |
|
|
\begin{classdesc}{StreamLines}{scene, data_collector, lut = None} |
562 |
|
|
A \StreamLines object show the path of particles (within a specified cloud |
563 |
|
|
of points) in a vector field. |
564 |
|
|
\end{classdesc} |
565 |
gross |
606 |
|
566 |
jongui |
879 |
The following are the methods available: |
567 |
|
|
\begin{methoddesc}[StreamLines]{setCloudRadius}{radius} |
568 |
|
|
Set the radius for the cloud of points. |
569 |
|
|
\end{methoddesc} |
570 |
gross |
606 |
|
571 |
jongui |
879 |
\begin{methoddesc}[StreamLines]{setCenter}{position} |
572 |
|
|
Set the center for the cloud of points. |
573 |
|
|
\end{methoddesc} |
574 |
gross |
606 |
|
575 |
jongui |
879 |
\begin{methoddesc}[StreamLines]{setNumberOfPoints}{points} |
576 |
|
|
Set the number of points to generate for the cloud of points. |
577 |
|
|
\end{methoddesc} |
578 |
gross |
606 |
|
579 |
jongui |
879 |
\begin{methoddesc}[StreamLines]{setMaximumPropagationTime}{time} |
580 |
|
|
Set the maximum length for the streamlines in unit of time. |
581 |
|
|
\end{methoddesc} |
582 |
gross |
606 |
|
583 |
jongui |
879 |
\begin{methoddesc}[StreamLines]{setStreamLinesSize}{stream_lines_size} |
584 |
|
|
Set the size of the steamlines. |
585 |
|
|
\end{methoddesc} |
586 |
gross |
606 |
|
587 |
jongui |
879 |
\begin{methoddesc}[StreamLines]{setAccuracy}{accuracy} |
588 |
|
|
Set the accuracy for the streamlines. |
589 |
|
|
\end{methoddesc} |
590 |
gross |
606 |
|
591 |
jongui |
879 |
\begin{methoddesc}[StreamLines]{setIntegrationToBothDirections}{} |
592 |
|
|
Set the integration to occur in both directions. |
593 |
|
|
\end{methoddesc} |
594 |
gross |
606 |
|
595 |
jongui |
879 |
\begin{methoddesc}[StreamLines]{setTubeRadius}{radius} |
596 |
|
|
Set the minimum radius of the tube. |
597 |
|
|
\end{methoddesc} |
598 |
gross |
606 |
|
599 |
jongui |
879 |
\begin{methoddesc}[StreamLines]{setNumberOfSides}{sides} |
600 |
|
|
Set the number of sides for the tube. |
601 |
|
|
\end{methoddesc} |
602 |
gross |
606 |
|
603 |
jongui |
879 |
\begin{methoddesc}[StreamLines]{setVaryRadiusByVector}{} |
604 |
|
|
Set the variation of the tube radius with vector data. |
605 |
|
|
\end{methoddesc} |
606 |
gross |
606 |
|
607 |
jongui |
879 |
The following is a sample code using the \StreamLines class. |
608 |
|
|
\fig{fig:streamlines.1} shows the corresponding output. |
609 |
|
|
\verbatiminput{../examples/driverstreamlines.py} |
610 |
gross |
606 |
|
611 |
jongui |
879 |
\begin{figure}[ht] |
612 |
|
|
\begin{center} |
613 |
|
|
\includegraphics[width=40mm]{figures/StreamLines} |
614 |
|
|
\end{center} |
615 |
|
|
\caption{StreamLines} |
616 |
|
|
\label{fig:streamlines.1} |
617 |
|
|
\end{figure} |
618 |
gross |
606 |
|
619 |
jongui |
879 |
\section{\Carpet class} |
620 |
|
|
\begin{classdesc}{Carpet}{scene, data_collector, transform, lut = None, |
621 |
|
|
deform = None} |
622 |
jongui |
886 |
A \Carpet object shows a scalar/vector field as a plane deformated along |
623 |
|
|
the plane normal. |
624 |
jongui |
879 |
\end{classdesc} |
625 |
gross |
606 |
|
626 |
jongui |
879 |
The following is the method available: |
627 |
|
|
\begin{methoddesc}[Carpet]{setScaleFactor}{scale_factor} |
628 |
|
|
Set the displancement scale factor. |
629 |
|
|
\end{methoddesc} |
630 |
gross |
606 |
|
631 |
jongui |
879 |
The following is a sample code using the \Carpet class. |
632 |
|
|
\fig{fig:carpet.1} shows the corresponding output. |
633 |
|
|
\verbatiminput{../examples/drivercarpet.py} |
634 |
gross |
606 |
|
635 |
jongui |
879 |
\begin{figure}[ht] |
636 |
|
|
\begin{center} |
637 |
jongui |
889 |
\includegraphics[width=50mm]{figures/Carpet} |
638 |
jongui |
879 |
\end{center} |
639 |
|
|
\caption{Carpet} |
640 |
|
|
\label{fig:carpet.1} |
641 |
|
|
\end{figure} |
642 |
gross |
606 |
|
643 |
|
|
|
644 |
jongui |
879 |
\section{\Position class} |
645 |
|
|
\begin{classdesc}{Position}{x_coor, y_coor, z_coor} |
646 |
|
|
A \Position object defines the x, y and z coordinates of rendered object. |
647 |
|
|
\end{classdesc} |
648 |
gross |
606 |
|
649 |
jongui |
879 |
\section{\Transform class} |
650 |
|
|
\begin{classdesc}{Transform}{} |
651 |
|
|
A \Transform object defines the orientation of rendered object. |
652 |
|
|
\end{classdesc} |
653 |
gross |
606 |
|
654 |
jongui |
879 |
The following are some of the methods available: |
655 |
|
|
\begin{methoddesc}[Transform]{translate}{x_offset, y_offset, z_offset} |
656 |
|
|
Translate the rendered object along the x, y and z-axes. |
657 |
|
|
\end{methoddesc} |
658 |
gross |
606 |
|
659 |
jongui |
879 |
\begin{methoddesc}[Transform]{rotateX}{angle} |
660 |
|
|
Rotate the rendered object along the x-axis. |
661 |
|
|
\end{methoddesc} |
662 |
gross |
606 |
|
663 |
jongui |
879 |
\begin{methoddesc}[Transform]{rotateY}{angle} |
664 |
|
|
Rotate the rendered object along the y-axis. |
665 |
|
|
\end{methoddesc} |
666 |
gross |
606 |
|
667 |
jongui |
879 |
\begin{methoddesc}[Transform]{rotateZ}{angle} |
668 |
|
|
Rotate the rendered object along the z-axis. |
669 |
|
|
\end{methoddesc} |
670 |
gross |
606 |
|
671 |
jongui |
879 |
\begin{methoddesc}[Transform]{xyPlane}{offset = 0} |
672 |
|
|
Set the plane orthogonal to the z-axis. |
673 |
|
|
\end{methoddesc} |
674 |
gross |
606 |
|
675 |
jongui |
879 |
\begin{methoddesc}[Transform]{yzPlane}{offset = 0} |
676 |
|
|
Set the plane orthogonal to the x-axis. |
677 |
|
|
\end{methoddesc} |
678 |
gross |
606 |
|
679 |
jongui |
879 |
\begin{methoddesc}[Transform]{xzPlane}{offset = 0} |
680 |
|
|
Set the plane orthogonal to the y-axis. |
681 |
|
|
\end{methoddesc} |
682 |
gross |
606 |
|
683 |
jongui |
879 |
\section{\Style class} |
684 |
|
|
\begin{classdesc}{Style}{} |
685 |
|
|
A \Style object defines the style of text. |
686 |
|
|
\end{classdesc} |
687 |
gross |
606 |
|
688 |
jongui |
879 |
The following are the methods available: |
689 |
|
|
\begin{methoddesc}[Style]{setFontFamily}{family} |
690 |
|
|
Set the font family (i.e. Times) |
691 |
|
|
\end{methoddesc} |
692 |
gross |
606 |
|
693 |
jongui |
879 |
\begin{methoddesc}[Style]{boldOn}{} |
694 |
|
|
Bold the text. |
695 |
|
|
\end{methoddesc} |
696 |
gross |
606 |
|
697 |
jongui |
879 |
\begin{methoddesc}[Style]{italicOn}{} |
698 |
|
|
Italize the text. |
699 |
|
|
\end{methoddesc} |
700 |
gross |
606 |
|
701 |
jongui |
879 |
\begin{methoddesc}[Style]{shadowOn}{} |
702 |
|
|
Apply shadows on the text. |
703 |
|
|
\end{methoddesc} |
704 |
gross |
606 |
|
705 |
jongui |
879 |
\begin{methoddesc}[Style]{setColor}{} |
706 |
|
|
Set the text color. |
707 |
|
|
\end{methoddesc} |
708 |
gross |
606 |
|
709 |
jongui |
879 |
\section{\BlueToRed class} |
710 |
|
|
\begin{classdesc}{BlueToRed}{} |
711 |
|
|
A \BlueToRed object defines a map spectrum from blue to red. |
712 |
|
|
\end{classdesc} |
713 |
gross |
606 |
|
714 |
jongui |
879 |
\section{\RedToBlue class} |
715 |
|
|
\begin{classdesc}{RedToBlue}{} |
716 |
|
|
A \RedToBlue object defines a map spectrum from red to blue. |
717 |
|
|
\end{classdesc} |
718 |
gross |
606 |
|
719 |
jongui |
886 |
\section{\Plane class} |
720 |
|
|
The following are the methods available: |
721 |
|
|
\begin{methoddesc}[Plane]{setPlaneOrigin}{position} |
722 |
|
|
Set the plane origin |
723 |
|
|
\end{methoddesc} |
724 |
gross |
606 |
|
725 |
jongui |
886 |
\begin{methoddesc}[Plane]{setPlaneNormal}{position} |
726 |
|
|
Set the plane normal |
727 |
|
|
\end{methoddesc} |
728 |
|
|
|
729 |
|
|
\begin{methoddesc}[Plane]{setValue}{clipping_value} |
730 |
|
|
Set the clipping value |
731 |
|
|
\end{methoddesc} |
732 |
|
|
|
733 |
|
|
\begin{methoddesc}[Plane]{setInsideOutOn}{} |
734 |
|
|
Set the clipping to inside out |
735 |
|
|
\end{methoddesc} |
736 |
|
|
|
737 |
|
|
\begin{methoddesc}[Plane]{setInsideOutOff}{} |
738 |
|
|
Disable the inside out clipping |
739 |
|
|
\end{methoddesc} |
740 |
|
|
|
741 |
|
|
\section{Additional Notes} |
742 |
|
|
The following is a sample code rendering multiple planes. |
743 |
|
|
\fig{fig:multipleplanes.1} shows the corresponding output. |
744 |
|
|
\verbatiminput{../examples/drivermultipleplanes.py} |
745 |
|
|
|
746 |
|
|
\begin{figure}[ht] |
747 |
|
|
\begin{center} |
748 |
|
|
\includegraphics[width=60mm]{figures/MultiplePlanes} |
749 |
|
|
\end{center} |
750 |
|
|
\caption{Multiple planes} |
751 |
|
|
\label{fig:multipleplanes.1} |
752 |
|
|
\end{figure} |
753 |
|
|
|
754 |
|
|
The following is a sample code rendering multiple cuts. |
755 |
|
|
\verbatiminput{../examples/drivermultiplecuts.py} |
756 |
|
|
|
757 |
|
|
|
758 |
|
|
The following is a sample code rendering multiple reads from multiple files. |
759 |
|
|
\verbatiminput{../examples/drivermultiplereads.py} |
760 |
|
|
|