1 |
\chapter{The module \pyvisi} |
\chapter{The module \pyvisi} |
2 |
\label{PYVISI CHAP} |
\label{PYVISI CHAP} |
3 |
|
|
4 |
\declaremodule{extension}{pyvisi} |
\section{Introduction} |
|
\modulesynopsis{Python visualization interface} |
|
5 |
|
|
6 |
\pyvisi provides an easy to use interface to the \VTK visualization |
\pyvisi provides an easy to use interface to the \VTK visualization |
7 |
tool. \pyvisi provides the following modules: |
tool. |
8 |
|
|
9 |
\begin{itemize} |
\section{Rendering} |
10 |
\item \Scene: Shows a scene in which components are to be displayed. |
same word on rendering, off-line, on-line, how to rotate, zoom, close the window, ... |
11 |
\item \Image: Shows an image. |
|
12 |
\item \Text: Shows some 2D text. |
\section{How to Make a Movie} |
13 |
\item \DataCollector: Deals with data for visualization. |
|
14 |
\item \Camera: Controls the camera manipulation. |
\section{\pyvisi Classes} |
15 |
\item \Light: Controls the light manipulation. |
\declaremodule{extension}{esys.pyvisi} |
16 |
\item \Map: Shows a scalar field by color on the domain surface. |
\modulesynopsis{A simple Python visualization interface for \VTK} |
17 |
\item \MapOnPlane: Shows a scalar field by color on a given plane. |
|
18 |
\item \MapOnClip: Shows a scalar field by color on a given clip. |
In this section we give a brief overview over the important classes and their methods. Please |
19 |
\item \MapOnScalarClip: Shows a scalar field by color on a give scalar clip. |
check the \ReferenceGuide on details. |
20 |
\item \Arrows: Shows a vector field by arrows. |
%===================================================================================== |
21 |
\item \ArrowsOnPlane: Shows a vector field by arrows on a given plane. |
\subsection{Scene Classes} |
22 |
\item \ArrowsOnClip: Shows a vector field by arrows on a given clip. |
\begin{classdesc}{Scene}{} |
23 |
\item \IsoSurface: Shows a scalar field for a given value by |
Displays a scene in which objects are to be rendered on. |
|
an isosurface. |
|
|
\item \IsoSurfaceOnPlane: Shows a scalar field for a given value by |
|
|
an isosurfaceon a given plane. |
|
|
\item \IsoSurfaceOnClip: Shows a scalar field for a given vlaue by |
|
|
an isosurface on a given clip. |
|
|
\item \Contour: Shows a scalar field by contour surfaces. |
|
|
\item \ContourOnPlane: Shows a scalar field by contour surfaces on |
|
|
a given plane. |
|
|
\item \ContourOnClip: Shows a scalar field by contour surfaces on |
|
|
a given clip. |
|
|
\item \TensorC: Shows a tensor field by ellipsoids. |
|
|
\item \TensorOnPlane: Shows a tensor field by ellipsoids on |
|
|
a given plane. |
|
|
\item \TensorOnClip: Shows a tensor field by ellipsoids on a given clip. |
|
|
\item \StreamLines: Shows the path of particles in a vector field. |
|
|
\item \Carpet: Shows a scalar field as plane deformated along |
|
|
the plane normal. |
|
|
\item \Position: Defines the x,y and z coordinates rendered object. |
|
|
\item \Transform: Defines the orientation of rendered object. |
|
|
\item \Style: Defines the style of text. |
|
|
\item \BlueToRed: Defines a map spectrum from blue to red. |
|
|
\item \RedToBlue: Defines a map spectrum from red to blue. |
|
|
\item \Plane: Defines the cutting/clipping of rendered objects. |
|
|
\end{itemize} |
|
|
|
|
|
\section{\Scene class} |
|
|
\begin{classdesc}{Scene}{renderer, x_size = 500, y_size = 500} |
|
|
A \Scene object creates a window onto which objects are to be displayed. |
|
|
\end{classdesc} |
|
|
|
|
|
The following are the methods available: |
|
|
\begin{methoddesc}[Scene]{saveImage}{image_name} |
|
|
Save the rendered object as an image off-screen. |
|
|
\end{methoddesc} |
|
|
|
|
|
\begin{methoddesc}[Scene]{render}{} |
|
|
Render the object on-screen. |
|
|
\end{methoddesc} |
|
|
|
|
|
The following is a sample code using the \Scene class: |
|
|
\verbatiminput{../examples/driverscene.py} |
|
|
|
|
|
\section{\Image class} |
|
|
\begin{classdesc}{Image}{scene, format} |
|
|
An \Image object shows an image. |
|
|
\end{classdesc} |
|
|
|
|
|
The following is the method available: |
|
|
\begin{methoddesc}[Image]{setFileName}{file_name} |
|
|
Set the file name. |
|
|
\end{methoddesc} |
|
|
|
|
|
The following is a sample code using the \Image class. |
|
|
\fig{fig:image.1} shows the corresponding output. |
|
|
\verbatiminput{../examples/driverimage.py} |
|
|
|
|
|
\begin{figure}[ht] |
|
|
\begin{center} |
|
|
\includegraphics[width=40mm]{figures/Image} |
|
|
\end{center} |
|
|
\caption{Image} |
|
|
\label{fig:image.1} |
|
|
\end{figure} |
|
|
|
|
|
\section{\Text class} |
|
|
\begin{classdesc}{Text}{scene} |
|
|
A \Text object shows 2D text. |
|
|
\end{classdesc} |
|
|
|
|
|
The following are the methods available: |
|
|
\begin{methoddesc}[Text]{setText}{text} |
|
|
Set the text. |
|
|
\end{methoddesc} |
|
|
|
|
|
\begin{methoddesc}[Text]{setPosition}{x_coor, y_coor} |
|
|
Set the display position of the text. |
|
|
\end{methoddesc} |
|
|
|
|
|
\begin{methoddesc}[Text]{setStyle}{style} |
|
|
Set the style of the text. |
|
|
\end{methoddesc} |
|
|
|
|
|
The following is a sample code using the \Text class. |
|
|
\fig{fig:text.1} shows the corresponding output. |
|
|
\verbatiminput{../examples/drivertext.py} |
|
|
|
|
|
\begin{figure}[ht] |
|
|
\begin{center} |
|
|
\includegraphics[width=40mm]{figures/Text} |
|
|
\end{center} |
|
|
\caption{2D text} |
|
|
\label{fig:text.1} |
|
|
\end{figure} |
|
|
|
|
|
\section{\DataCollector class} |
|
|
\begin{classdesc}{DataCollector}{scene, outline = True, cube_axes = False} |
|
|
A \DataCollector object deals with the data for visualization. |
|
|
\end{classdesc} |
|
|
|
|
|
The following are the methods available: |
|
|
\begin{methoddesc}[DataCollector]{setFileName}{file_name} |
|
|
Set the file name from which data is to be read. |
|
|
\end{methoddesc} |
|
|
|
|
|
The following is a sample code using the \DataCollector class. |
|
|
\fig{fig:datacollector.1} shows the corresponding output. |
|
|
\verbatiminput{../examples/driverdatacollector.py} |
|
|
|
|
|
\begin{figure}[ht] |
|
|
\begin{center} |
|
|
\includegraphics[width=40mm]{figures/DataCollector} |
|
|
\end{center} |
|
|
\caption{Datacollector generating an outline with cube axes.} |
|
|
\label{fig:datacollector.1} |
|
|
\end{figure} |
|
|
|
|
|
\section{\Camera class} |
|
|
\begin{classdesc}{Camera}{scene, data_collector} |
|
|
A \Camera object controls the camera's settings. |
|
|
\end{classdesc} |
|
|
|
|
|
The following are some of the methods available: |
|
|
\begin{methoddesc}[Camera]{setFocalPoint}{position} |
|
|
Set the focal point of the camera. |
|
|
\end{methoddesc} |
|
|
|
|
|
\begin{methoddesc}[Camera]{setPosition}{position} |
|
|
Set the position of the camera. |
|
|
\end{methoddesc} |
|
|
|
|
|
\begin{methoddesc}[Camera]{azimuth}{angle} |
|
|
Rotate the camera to the left and right. |
|
|
\end{methoddesc} |
|
|
|
|
|
\begin{methoddesc}[Camera]{elevation}{angle} |
|
|
Rotate the camera to the top and bottom. |
|
|
\end{methoddesc} |
|
|
|
|
|
\begin{methoddesc}[Camera]{roll}{angle} |
|
|
Roll the camera to the left and right. |
|
|
\end{methoddesc} |
|
|
|
|
|
\begin{methoddesc}[Camera]{backView}{} |
|
|
View the back of the rendered object. |
|
|
\end{methoddesc} |
|
|
|
|
|
\begin{methoddesc}[Camera]{topView}{} |
|
|
View the top of the rendered object. |
|
|
\end{methoddesc} |
|
|
|
|
|
\begin{methoddesc}[Camera]{bottomView}{} |
|
|
View the bottom of the rendered object. |
|
|
\end{methoddesc} |
|
|
|
|
|
\begin{methoddesc}[Camera]{leftView}{} |
|
|
View the left side of the rendered object. |
|
|
\end{methoddesc} |
|
|
|
|
|
\begin{methoddesc}[Camera]{rightView}{} |
|
|
View the right side of the rendered object. |
|
|
\end{methoddesc} |
|
|
|
|
|
\begin{methoddesc}[Camera]{isometricView}{} |
|
|
View the isometric side of the rendered object. |
|
|
\end{methoddesc} |
|
|
|
|
|
The following is a sample code using the \Camera class. |
|
|
\fig{fig:camera.1} shows the corresponding output. |
|
|
\verbatiminput{../examples/drivercamera.py} |
|
|
|
|
|
\begin{figure}[ht] |
|
|
\begin{center} |
|
|
\includegraphics[width=30mm]{figures/Camera} |
|
|
\end{center} |
|
|
\caption{Camera manipulation} |
|
|
\label{fig:camera.1} |
|
|
\end{figure} |
|
|
|
|
|
\section{\Light class} |
|
|
\begin{classdesc}{Light}{scene, data_collector} |
|
|
A \Light object controls the light's settings. |
|
|
\end{classdesc} |
|
|
|
|
|
The following are the methods available: |
|
|
\begin{methoddesc}[Light]{setColor}{color} |
|
|
Set the color of the light. |
|
|
\end{methoddesc} |
|
|
|
|
|
\begin{methoddesc}[Light]{setFocalPoint}{position} |
|
|
Set the focal point of the light. |
|
|
\end{methoddesc} |
|
|
|
|
|
\begin{methoddesc}[Light]{setPosition}{position} |
|
|
Set the position of the light. |
|
|
\end{methoddesc} |
|
|
|
|
|
\begin{methoddesc}[Light]{setIntensity}{intesity} |
|
|
Set the intensity (brightness) of the light. |
|
|
\end{methoddesc} |
|
|
|
|
|
The following is a sample code using the \Light class. |
|
|
\fig{fig:light.1} shows the corresponding output. |
|
|
\verbatiminput{../examples/driverlight.py} |
|
|
|
|
|
\begin{figure}[ht] |
|
|
\begin{center} |
|
|
\includegraphics[width=40mm]{figures/Light} |
|
|
\end{center} |
|
|
\caption{Light} |
|
|
\label{fig:light.1} |
|
|
\end{figure} |
|
|
|
|
|
\section{\Map class} |
|
|
\begin{classdesc}{Map}{scene, data_collector, lut = None} |
|
|
A \Map object shows a scalar field by color on the domain surface. |
|
|
\end{classdesc} |
|
|
|
|
|
The following is a sample code using the \Map class. |
|
|
\fig{fig:map.1} shows the corresponding output. |
|
|
\verbatiminput{../examples/drivermap.py} |
|
|
|
|
|
\begin{figure}[ht] |
|
|
\begin{center} |
|
|
\includegraphics[width=40mm]{figures/Map} |
|
|
\end{center} |
|
|
\caption{Surface map} |
|
|
\label{fig:map.1} |
|
|
\end{figure} |
|
|
|
|
|
\section{\MapOnPlane class} |
|
|
\begin{classdesc}{MapOnPlane}{scene, data_collector, transform, lut = None} |
|
|
A \MapOnPlane object show a scalar field by color on a given plane. |
|
|
\end{classdesc} |
|
|
|
|
|
The following is a sample code using the \MapOnPlane class. |
|
|
\fig{fig:maponplane.1} shows the corresponding output. |
|
|
\verbatiminput{../examples/drivermaponplane.py} |
|
|
|
|
|
\begin{figure}[ht] |
|
|
\begin{center} |
|
|
\includegraphics[width=40mm]{figures/MapOnPlane} |
|
|
\end{center} |
|
|
\caption{Surface map on a plane} |
|
|
\label{fig:maponplane.1} |
|
|
\end{figure} |
|
|
|
|
|
\section{\MapOnClip class} |
|
|
\begin{classdesc}{MapOnClip}{scene, data_collector, transform, lut = None} |
|
|
A \MapOnClip object show a scalar field by color on a given clip. |
|
|
\end{classdesc} |
|
|
|
|
|
The following is a sample code using the \MapOnClip class. |
|
|
\fig{fig:maponclip.1} shows the corresponding output. |
|
|
\verbatiminput{../examples/drivermaponclip.py} |
|
|
|
|
|
\begin{figure}[ht] |
|
|
\begin{center} |
|
|
\includegraphics[width=40mm]{figures/MapOnClip} |
|
|
\end{center} |
|
|
\caption{Surface map on a clip} |
|
|
\label{fig:maponclip.1} |
|
|
\end{figure} |
|
|
|
|
|
\section{\MapOnScalarClip class} |
|
|
\begin{classdesc}{MapOnScalarClip}{scene, data_collector, lut = None} |
|
|
A \MapOnScalarClip object show a scalar field by color on a given scalar clip. |
|
|
\end{classdesc} |
|
|
|
|
|
The following is a sample code using the \MapOnScalarClip class. |
|
|
\fig{fig:maponscalarclip.1} shows the corresponding output. |
|
|
\verbatiminput{../examples/drivermaponscalarclip.py} |
|
|
|
|
|
\begin{figure}[ht] |
|
|
\begin{center} |
|
|
\includegraphics[width=40mm]{figures/MapOnScalarClip} |
|
|
\end{center} |
|
|
\caption{Surface map on a scalar clip} |
|
|
\label{fig:maponscalarclip.1} |
|
|
\end{figure} |
|
|
|
|
|
\section{\Arrows class} |
|
|
\begin{classdesc}{Arrows}{scene, data_collector, lut = None} |
|
|
A \Arrows object shows a vector field by arrows. |
|
|
\end{classdesc} |
|
|
|
|
|
The following are the methods available: |
|
|
\begin{methoddesc}[Arrows]{setVectorMode}{vector_mode} |
|
|
Set the arrows vector mode. |
|
|
\end{methoddesc} |
|
|
|
|
|
\begin{methoddesc}[Arrows]{setScaleMode}{scale_mode} |
|
|
Set the arrows scale mode. |
|
|
\end{methoddesc} |
|
|
|
|
|
\begin{methoddesc}[Arrows]{setScaleFactor}{scale_factor} |
|
|
Set the arrows scale factor. |
|
|
\end{methoddesc} |
|
|
|
|
|
\begin{methoddesc}[Arrows]{setColorMode}{color_mode} |
|
|
Set the arrows color mode. |
|
|
\end{methoddesc} |
|
|
|
|
|
The following is a sample code using the \Arrows class. |
|
|
\fig{fig:arrows.1} shows the corresponding output. |
|
|
\verbatiminput{../examples/driverarrows.py} |
|
|
|
|
|
\begin{figure}[ht] |
|
|
\begin{center} |
|
|
\includegraphics[width=40mm]{figures/Arrows} |
|
|
\end{center} |
|
|
\caption{Arrows} |
|
|
\label{fig:arrows.1} |
|
|
\end{figure} |
|
|
|
|
|
\section{\ArrowsOnPlane class} |
|
|
\begin{classdesc}{ArrowsOnPlane}{scene, data_collector, transform, lut = None} |
|
|
A \ArrowsOnPlane object shows a vector field by arrows on a given plane. |
|
|
\end{classdesc} |
|
|
|
|
|
The following is a sample code using the \ArrowsOnPlane class. |
|
|
\fig{fig:arrowsonplane.1} shows the corresponding output. |
|
|
\verbatiminput{../examples/driverarrowsonplane.py} |
|
|
|
|
|
\begin{figure}[ht] |
|
|
\begin{center} |
|
|
\includegraphics[width=40mm]{figures/ArrowsOnPlane} |
|
|
\end{center} |
|
|
\caption{Arrows on a plane} |
|
|
\label{fig:arrowsonplane.1} |
|
|
\end{figure} |
|
|
|
|
|
\section{\ArrowsOnClip class} |
|
|
\begin{classdesc}{ArrowsOnClip}{scene, data_collector, transform, lut = None} |
|
|
A \ArrowsOnClip object shows a vector field by arrows on a given clip. |
|
|
\end{classdesc} |
|
|
|
|
|
The following is a sample code using the \ArrowsOnClip class. |
|
|
\fig{fig:arrowsonclip.1} shows the corresponding output. |
|
|
\verbatiminput{../examples/driverarrowsonclip.py} |
|
|
|
|
|
\begin{figure}[ht] |
|
|
\begin{center} |
|
|
\includegraphics[width=40mm]{figures/ArrowsOnClip} |
|
|
\end{center} |
|
|
\caption{Arrows on a clip} |
|
|
\label{fig:arrowsonclip.1} |
|
|
\end{figure} |
|
|
|
|
|
|
|
|
\section{\IsoSurface class} |
|
|
\begin{classdesc}{IsoSurface}{scene, data_collector, lut = None} |
|
|
An \IsoSurface object shows a scalar field for a given value by an isosurface. |
|
|
\end{classdesc} |
|
|
|
|
|
The following is the method available: |
|
|
|
|
|
\begin{methoddesc}[IsoSurface]{setValue}{contour_number, value} |
|
|
Set the contour number and value. |
|
|
\end{methoddesc} |
|
|
|
|
|
The following is a sample code using the \IsoSurface class. |
|
|
\fig{fig:isosurface.1} shows the corresponding output. |
|
|
\verbatiminput{../examples/driverisosurface.py} |
|
|
|
|
|
\begin{figure}[ht] |
|
|
\begin{center} |
|
|
\includegraphics[width=40mm]{figures/IsoSurface} |
|
|
\end{center} |
|
|
\caption{IsoSurface} |
|
|
\label{fig:isosurface.1} |
|
|
\end{figure} |
|
|
|
|
|
\section{\IsoSurfaceOnPlane class} |
|
|
\begin{classdesc}{IsoSurfaceOnPlane}{scene, data_collector, transform, |
|
|
lut = None} |
|
|
An \IsoSurfaceOnPlane object shows a scalar field for a given value |
|
|
by an isosurface on a given plane. |
|
|
\end{classdesc} |
|
|
|
|
|
The following is a sample code using the \IsoSurfaceOnPlane class. |
|
|
\fig{fig:isosurfaceonplane.1} shows the corresponding output. |
|
|
\verbatiminput{../examples/driverisosurfaceonplane.py} |
|
|
|
|
|
\begin{figure}[ht] |
|
|
\begin{center} |
|
|
\includegraphics[width=40mm]{figures/IsoSurfaceOnPlane} |
|
|
\end{center} |
|
|
\caption{IsoSurface on a plane} |
|
|
\label{fig:isosurfaceonplane.1} |
|
|
\end{figure} |
|
|
|
|
|
\section{\IsoSurfaceOnClip class} |
|
|
\begin{classdesc}{IsoSurfaceOnClip}{scene, data_collector, transform, |
|
|
lut = None} |
|
|
An \IsoSurfaceOnClip object shows a scalar field for a given value |
|
|
by an isosurface on a given clip. |
|
|
\end{classdesc} |
|
|
|
|
|
The following is a sample code using the \IsoSurfaceOnClip class. |
|
|
\fig{fig:isosurfaceonclip.1} shows the corresponding output. |
|
|
\verbatiminput{../examples/driverisosurfaceonclip.py} |
|
|
|
|
|
\begin{figure}[ht] |
|
|
\begin{center} |
|
|
\includegraphics[width=40mm]{figures/IsoSurfaceOnClip} |
|
|
\end{center} |
|
|
\caption{IsoSurface on a clip} |
|
|
\label{fig:isosurfaceonclip.1} |
|
|
\end{figure} |
|
|
|
|
|
\section{\Contour class} |
|
|
\begin{classdesc}{Contour}{scene, data_collector, lut = None} |
|
|
A \Contour object shows a scalar field contour surfaces. |
|
|
\end{classdesc} |
|
|
|
|
|
The following is the method available: |
|
|
\begin{methoddesc}[Contour]{generateValues}{number_contours, min_range, |
|
|
max_range} |
|
|
Generate the specified number of contours within the specified range. |
|
|
\end{methoddesc} |
|
|
|
|
|
The following is a sample code using the \Contour class. |
|
|
\fig{fig:contour.1} shows the corresponding output. |
|
|
\verbatiminput{../examples/drivercontour.py} |
|
|
|
|
|
\begin{figure}[ht] |
|
|
\begin{center} |
|
|
\includegraphics[width=40mm]{figures/Contour} |
|
|
\end{center} |
|
|
\caption{Contour} |
|
|
\label{fig:contour.1} |
|
|
\end{figure} |
|
|
|
|
|
\section{\ContourOnPlane class} |
|
|
\begin{classdesc}{ContourOnPlane}{scene, data_collector, transform, lut = None} |
|
|
A \ContourOnPlane object shows a scalar field contour surfaces on a given plane. |
|
|
\end{classdesc} |
|
|
|
|
|
The following is a sample code using the \ContourOnPlane class. |
|
|
\fig{fig:contouronplane.1} shows the corresponding output. |
|
|
\verbatiminput{../examples/drivercontouronplane.py} |
|
|
|
|
|
\begin{figure}[ht] |
|
|
\begin{center} |
|
|
\includegraphics[width=40mm]{figures/ContourOnPlane} |
|
|
\end{center} |
|
|
\caption{Contour on a plane} |
|
|
\label{fig:contouronplane.1} |
|
|
\end{figure} |
|
|
|
|
|
\section{\ContourOnClip class} |
|
|
\begin{classdesc}{ContourOnClip}{scene, data_collector, transform, lut = None} |
|
|
A \ContourOnClip object shows a scalar field contour surfaces on a given clip. |
|
|
\end{classdesc} |
|
|
|
|
|
The following is a sample code using the \ContourOnClip class. |
|
|
\fig{fig:contouronclip.1} shows the corresponding output. |
|
|
\verbatiminput{../examples/drivercontouronclip.py} |
|
|
|
|
|
\begin{figure}[ht] |
|
|
\begin{center} |
|
|
\includegraphics[width=40mm]{figures/ContourOnClip} |
|
|
\end{center} |
|
|
\caption{Contour on a clip} |
|
|
\label{fig:contouronclip.1} |
|
|
\end{figure} |
|
|
|
|
|
\section{\TensorC class} |
|
|
\begin{classdesc}{Tensor}{scene, data_collector, lut = None} |
|
|
A \TensorC object shows a tensor field by ellipsoids. |
|
|
\end{classdesc} |
|
|
|
|
|
The following are the methods available: |
|
|
\begin{methoddesc}[Tensor]{setThetaResolution}{resolution} |
|
|
Set the number of points in the longitude direction. |
|
|
\end{methoddesc} |
|
|
|
|
|
\begin{methoddesc}[Tensor]{setPhiResolution}{resolution} |
|
|
Set the number of points in the latitude direction. |
|
|
\end{methoddesc} |
|
|
|
|
|
\begin{methoddesc}[Tensor]{setScaleFactor}{scale_factor} |
|
|
Set the tensor scale factor. |
|
|
\end{methoddesc} |
|
|
|
|
|
\begin{methoddesc}[Tensor]{setMaxScaleFactor}{max_scale_factor} |
|
|
Set the maximum allowable scale factor. |
|
|
\end{methoddesc} |
|
|
|
|
|
The following is a sample code using the \TensorC class. |
|
|
\fig{fig:tensor.1} shows the corresponding output. |
|
|
\verbatiminput{../examples/drivertensor.py} |
|
|
|
|
|
\begin{figure}[ht] |
|
|
\begin{center} |
|
|
\includegraphics[width=40mm]{figures/Tensor} |
|
|
\end{center} |
|
|
\caption{Tensor} |
|
|
\label{fig:tensor.1} |
|
|
\end{figure} |
|
|
|
|
|
\section{\TensorOnPlane class} |
|
|
\begin{classdesc}{TensorOnPlane}{scene, data_collector, transform, lut = None} |
|
|
A \TensorOnPlane object shows a tensor field by ellipsoids on a given plane. |
|
|
\end{classdesc} |
|
|
|
|
|
The following is a sample code using the \TensorOnPlane class. |
|
|
\fig{fig:tensoronplane.1} shows the corresponding output. |
|
|
\verbatiminput{../examples/drivertensoronplane.py} |
|
|
|
|
|
\begin{figure}[ht] |
|
|
\begin{center} |
|
|
\includegraphics[width=40mm]{figures/TensorOnPlane} |
|
|
\end{center} |
|
|
\caption{Tensor on a plane} |
|
|
\label{fig:tensoronplane.1} |
|
|
\end{figure} |
|
|
|
|
|
\section{\TensorOnClip class} |
|
|
\begin{classdesc}{TensorOnClip}{scene, data_collector, transform, lut = None} |
|
|
A \TensorOnClip object shows a tensor field by ellipsoids on a given clip. |
|
|
\end{classdesc} |
|
|
|
|
|
The following is a sample code using the \TensorOnClip class. |
|
|
\fig{fig:tensoronclip.1} shows the corresponding output. |
|
|
\verbatiminput{../examples/drivertensoronclip.py} |
|
|
|
|
|
\begin{figure}[ht] |
|
|
\begin{center} |
|
|
\includegraphics[width=40mm]{figures/TensorOnClip} |
|
|
\end{center} |
|
|
\caption{Tensor on a clip} |
|
|
\label{fig:tensoronclip.1} |
|
|
\end{figure} |
|
|
|
|
|
\section{\StreamLines class} |
|
|
\begin{classdesc}{StreamLines}{scene, data_collector, lut = None} |
|
|
A \StreamLines object show the path of particles (within a specified cloud |
|
|
of points) in a vector field. |
|
|
\end{classdesc} |
|
|
|
|
|
The following are the methods available: |
|
|
\begin{methoddesc}[StreamLines]{setCloudRadius}{radius} |
|
|
Set the radius for the cloud of points. |
|
|
\end{methoddesc} |
|
|
|
|
|
\begin{methoddesc}[StreamLines]{setCenter}{position} |
|
|
Set the center for the cloud of points. |
|
|
\end{methoddesc} |
|
|
|
|
|
\begin{methoddesc}[StreamLines]{setNumberOfPoints}{points} |
|
|
Set the number of points to generate for the cloud of points. |
|
|
\end{methoddesc} |
|
|
|
|
|
\begin{methoddesc}[StreamLines]{setMaximumPropagationTime}{time} |
|
|
Set the maximum length for the streamlines in unit of time. |
|
|
\end{methoddesc} |
|
|
|
|
|
\begin{methoddesc}[StreamLines]{setStreamLinesSize}{stream_lines_size} |
|
|
Set the size of the steamlines. |
|
|
\end{methoddesc} |
|
|
|
|
|
\begin{methoddesc}[StreamLines]{setAccuracy}{accuracy} |
|
|
Set the accuracy for the streamlines. |
|
|
\end{methoddesc} |
|
|
|
|
|
\begin{methoddesc}[StreamLines]{setIntegrationToBothDirections}{} |
|
|
Set the integration to occur in both directions. |
|
|
\end{methoddesc} |
|
|
|
|
|
\begin{methoddesc}[StreamLines]{setTubeRadius}{radius} |
|
|
Set the minimum radius of the tube. |
|
|
\end{methoddesc} |
|
|
|
|
|
\begin{methoddesc}[StreamLines]{setNumberOfSides}{sides} |
|
|
Set the number of sides for the tube. |
|
|
\end{methoddesc} |
|
|
|
|
|
\begin{methoddesc}[StreamLines]{setVaryRadiusByVector}{} |
|
|
Set the variation of the tube radius with vector data. |
|
|
\end{methoddesc} |
|
|
|
|
|
The following is a sample code using the \StreamLines class. |
|
|
\fig{fig:streamlines.1} shows the corresponding output. |
|
|
\verbatiminput{../examples/driverstreamlines.py} |
|
|
|
|
|
\begin{figure}[ht] |
|
|
\begin{center} |
|
|
\includegraphics[width=40mm]{figures/StreamLines} |
|
|
\end{center} |
|
|
\caption{StreamLines} |
|
|
\label{fig:streamlines.1} |
|
|
\end{figure} |
|
|
|
|
|
\section{\Carpet class} |
|
|
\begin{classdesc}{Carpet}{scene, data_collector, transform, lut = None, |
|
|
deform = None} |
|
|
A \Carpet object shows a scalar/vector field as a plane deformated along |
|
|
the plane normal. |
|
24 |
\end{classdesc} |
\end{classdesc} |
25 |
|
|
26 |
The following is the method available: |
\begin{classdesc}{Camera}{} |
27 |
\begin{methoddesc}[Carpet]{setScaleFactor}{scale_factor} |
Controls the camera manipulation. |
|
Set the displancement scale factor. |
|
|
\end{methoddesc} |
|
|
|
|
|
The following is a sample code using the \Carpet class. |
|
|
\fig{fig:carpet.1} shows the corresponding output. |
|
|
\verbatiminput{../examples/drivercarpet.py} |
|
|
|
|
|
\begin{figure}[ht] |
|
|
\begin{center} |
|
|
\includegraphics[width=50mm]{figures/Carpet} |
|
|
\end{center} |
|
|
\caption{Carpet} |
|
|
\label{fig:carpet.1} |
|
|
\end{figure} |
|
|
|
|
|
|
|
|
\section{\Position class} |
|
|
\begin{classdesc}{Position}{x_coor, y_coor, z_coor} |
|
|
A \Position object defines the x, y and z coordinates of rendered object. |
|
28 |
\end{classdesc} |
\end{classdesc} |
29 |
|
|
30 |
\section{\Transform class} |
\begin{classdesc}{Light}{} |
31 |
\begin{classdesc}{Transform}{} |
Controls the light manipulation. |
|
A \Transform object defines the orientation of rendered object. |
|
32 |
\end{classdesc} |
\end{classdesc} |
33 |
|
|
34 |
The following are some of the methods available: |
%============================================================================================================ |
35 |
\begin{methoddesc}[Transform]{translate}{x_offset, y_offset, z_offset} |
\subsection{Input Classes} |
|
Translate the rendered object along the x, y and z-axes. |
|
|
\end{methoddesc} |
|
36 |
|
|
37 |
\begin{methoddesc}[Transform]{rotateX}{angle} |
\begin{classdesc}{Image}{} |
38 |
Rotate the rendered object along the x-axis. |
Displays an image. |
39 |
\end{methoddesc} |
\end{classdesc} |
40 |
|
|
41 |
|
\begin{classdesc}{Text}{} |
42 |
|
Shows some 2D text. |
43 |
|
\end{classdesc} |
44 |
|
|
45 |
\begin{methoddesc}[Transform]{rotateY}{angle} |
\begin{classdesc}{DataCollector}{} |
46 |
Rotate the rendered object along the y-axis. |
Deals with the source of data for visualization. |
47 |
\end{methoddesc} |
\end{classdesc} |
48 |
|
|
49 |
\begin{methoddesc}[Transform]{rotateZ}{angle} |
%============================================================================================================ |
50 |
Rotate the rendered object along the z-axis. |
\subsection{Data Visualization} |
51 |
\end{methoddesc} |
\begin{classdesc}{Map}{} |
52 |
|
Displays a scalar field using a domain surface. |
53 |
|
\end{classdesc} |
54 |
|
|
55 |
\begin{methoddesc}[Transform]{xyPlane}{offset = 0} |
\begin{classdesc}{MapOnPlaneCut}{} |
56 |
Set the plane orthogonal to the z-axis. |
Displays a scalar field using a domain surface cut on a plane. |
57 |
\end{methoddesc} |
\end{classdesc} |
58 |
|
|
59 |
\begin{methoddesc}[Transform]{yzPlane}{offset = 0} |
\begin{classdesc}{MapOnPlaneClip}{} |
60 |
Set the plane orthogonal to the x-axis. |
Displays a scalar field using a domain surface clipped |
61 |
\end{methoddesc} |
on a plane. |
62 |
|
\end{classdesc} |
63 |
|
|
64 |
\begin{methoddesc}[Transform]{xzPlane}{offset = 0} |
\begin{classdesc}{MapOnScalarClip}{} |
65 |
Set the plane orthogonal to the y-axis. |
Displays a scalar field using a domain surface clipped |
66 |
\end{methoddesc} |
using a scalar value. |
67 |
|
\end{classdesc} |
68 |
|
|
69 |
\section{\Style class} |
\begin{classdesc}{Velocity}{} |
70 |
\begin{classdesc}{Style}{} |
Displays a vector field using arrows. |
|
A \Style object defines the style of text. |
|
71 |
\end{classdesc} |
\end{classdesc} |
72 |
|
|
73 |
The following are the methods available: |
\begin{classdesc}{VelocityOnPlaneCut}{} |
74 |
\begin{methoddesc}[Style]{setFontFamily}{family} |
Displays a vector field using arrows cut on a plane. |
75 |
Set the font family (i.e. Times) |
\end{classdesc} |
|
\end{methoddesc} |
|
76 |
|
|
77 |
\begin{methoddesc}[Style]{boldOn}{} |
\begin{classdesc}{VelocityOnPlaneClip}{} |
78 |
Bold the text. |
Displays a vector field using arrows clipped on a |
79 |
\end{methoddesc} |
plane. |
80 |
|
\end{classdesc} |
81 |
|
|
82 |
\begin{methoddesc}[Style]{italicOn}{} |
\begin{classdesc}{Ellipsoid}{} |
83 |
Italize the text. |
Displays a tensor field using spheres. |
84 |
\end{methoddesc} |
\end{classdesc} |
85 |
|
|
86 |
\begin{methoddesc}[Style]{shadowOn}{} |
\begin{classdesc}{EllipsoidOnPlaneCut}{} |
87 |
Apply shadows on the text. |
Displays a tensor field using spheres cut on a |
88 |
\end{methoddesc} |
plane. |
89 |
|
\end{classdesc} |
90 |
|
|
91 |
\begin{methoddesc}[Style]{setColor}{} |
\begin{classdesc}{EllipsoidOnPlaneClip}{} |
92 |
Set the text color. |
Displays a tensor field using spheres clipped |
93 |
\end{methoddesc} |
on a plane. |
94 |
|
\end{classdesc} |
95 |
|
|
96 |
\section{\BlueToRed class} |
|
97 |
\begin{classdesc}{BlueToRed}{} |
\begin{classdesc}{Contour}{} |
98 |
A \BlueToRed object defines a map spectrum from blue to red. |
Shows a scalar field by contour surfaces. |
99 |
\end{classdesc} |
\end{classdesc} |
100 |
|
|
101 |
\section{\RedToBlue class} |
\begin{classdesc}{ContourOnPlane}{} |
102 |
\begin{classdesc}{RedToBlue}{} |
Shows a scalar field by contour surfaces on |
103 |
A \RedToBlue object defines a map spectrum from red to blue. |
a given plane. |
104 |
|
\end{classdesc} |
105 |
|
|
106 |
|
\begin{classdesc}{ContourOnClip}{} |
107 |
|
Shows a scalar field by contour surfaces on |
108 |
|
a given clip. |
109 |
|
\end{classdesc} |
110 |
|
|
111 |
|
\begin{classdesc}{IsoSurface}{} |
112 |
|
Shows a scalar field for a given value by |
113 |
|
an isosurface. |
114 |
|
\end{classdesc} |
115 |
|
|
116 |
|
\begin{classdesc}{IsoSurfaceOnPlane}{} |
117 |
|
Shows a scalar field for a given value by |
118 |
|
an isosurfaceon a given plane. |
119 |
|
\end{classdesc} |
120 |
|
|
121 |
|
\begin{classdesc}{IsoSurfaceOnClip}{} |
122 |
|
Shows a scalar field for a given vlaue by |
123 |
|
an isosurface on a given clip. |
124 |
|
\end{classdesc} |
125 |
|
|
126 |
|
\begin{classdesc}{StreamLines}{} |
127 |
|
Shows the path of particles in a vector field. |
128 |
|
\end{classdesc} |
129 |
|
|
130 |
|
\begin{classdesc}{Carpet}{} |
131 |
|
Shows a scalar field as plane deformated along |
132 |
|
the plane normal. |
133 |
|
\end{classdesc} |
134 |
|
|
135 |
|
\section{Geometry} |
136 |
|
\begin{classdesc}{Position}{} |
137 |
|
Defines the x,y and z coordinates rendered object. |
138 |
|
\end{classdesc} |
139 |
|
|
140 |
|
\begin{classdesc}{Transform}{} |
141 |
|
Defines the orientation of rendered object. |
142 |
\end{classdesc} |
\end{classdesc} |
143 |
|
|
144 |
\section{\Plane class} |
\begin{classdesc}{Plane}{} |
145 |
The following are the methods available: |
Defines the cutting/clipping of rendered objects. |
146 |
\begin{methoddesc}[Plane]{setPlaneOrigin}{position} |
\end{classdesc} |
|
Set the plane origin |
|
|
\end{methoddesc} |
|
|
|
|
|
\begin{methoddesc}[Plane]{setPlaneNormal}{position} |
|
|
Set the plane normal |
|
|
\end{methoddesc} |
|
|
|
|
|
\begin{methoddesc}[Plane]{setValue}{clipping_value} |
|
|
Set the clipping value |
|
|
\end{methoddesc} |
|
|
|
|
|
\begin{methoddesc}[Plane]{setInsideOutOn}{} |
|
|
Set the clipping to inside out |
|
|
\end{methoddesc} |
|
|
|
|
|
\begin{methoddesc}[Plane]{setInsideOutOff}{} |
|
|
Disable the inside out clipping |
|
|
\end{methoddesc} |
|
|
|
|
|
\section{Additional Notes} |
|
|
The following is a sample code rendering multiple planes. |
|
|
\fig{fig:multipleplanes.1} shows the corresponding output. |
|
|
\verbatiminput{../examples/drivermultipleplanes.py} |
|
|
|
|
|
\begin{figure}[ht] |
|
|
\begin{center} |
|
|
\includegraphics[width=60mm]{figures/MultiplePlanes} |
|
|
\end{center} |
|
|
\caption{Multiple planes} |
|
|
\label{fig:multipleplanes.1} |
|
|
\end{figure} |
|
147 |
|
|
|
The following is a sample code rendering multiple cuts. |
|
|
\verbatiminput{../examples/drivermultiplecuts.py} |
|
148 |
|
|
149 |
|
\subsection{Beautification} |
150 |
|
\begin{classdesc}{Style}{} |
151 |
|
Defines the style of text. |
152 |
|
\end{classdesc} |
153 |
|
|
154 |
|
\begin{classdesc}{BlueToRed}{} |
155 |
|
Defines a map spectrum from blue to red. |
156 |
|
\end{classdesc} |
157 |
|
|
158 |
|
\begin{classdesc}{RedToBlue}{} |
159 |
|
Defines a map spectrum from red to blue. |
160 |
|
\end{classdesc} |
161 |
|
|
|
The following is a sample code rendering multiple reads from multiple files. |
|
|
\verbatiminput{../examples/drivermultiplereads.py} |
|
162 |
|
|