/[escript]/trunk/doc/user/pyvisi.tex
ViewVC logotype

Annotation of /trunk/doc/user/pyvisi.tex

Parent Directory Parent Directory | Revision Log Revision Log


Revision 625 - (hide annotations)
Thu Mar 23 00:41:25 2006 UTC (14 years, 6 months ago) by gross
File MIME type: application/x-tex
File size: 26938 byte(s)
some updates and linearPDE.tex switched off
1 gross 625 %
2     % Copyright © 2006 by ACcESS MNRF
3     % \url{http://www.access.edu.au
4     % Primary Business: Queensland, Australia.
5     % Licensed under the Open Software License version 3.0
6     % http://www.opensource.org/license/osl-3.0.php
7     %
8 gross 606 \chapter{The module \pyvisi}
9     \declaremodule{extension}{pyvisi}
10     \modulesynopsis{visualization interface}
11    
12     The idea behind is to provide an easy to use interface and unified to a variety of
13     visualization tools like \VTK, \OpenDX and \GnuPlot.
14    
15     The following script illustartes the usage of \pyvisi together with the
16     \VTK library:
17     \begin{python}
18     from esys.pyvisi import * # base level visualisation stuff
19     from esys.pyvisi.renderers.vtk import * # vtk renderer module
20     from esys.escript import *
21     from esys.finley import Brick
22     # now make some data of some kind
23     domain = Brick(3,5,7) # a Finley domain
24     vectorData = domain.getX() # get vector data from the domain nodes
25     # define the scene object
26     scene = Scene()
27     # create an ArrowPlot object
28     plot = ArrowPlot(scene)
29     # add the plot to the scene
30     scene.add(plot)
31     # assign some data to the plot
32     plot.setData(vectorData)
33     # render the scene
34     scene.render()
35     # saving a scene
36     scene.save(file="example.jpg", format="jpeg")
37     \begin{python}
38     A \Scene is a container for all of the kinds of things you want to put into your plot,
39     for instance, images, domaines, arrow plots, contour plots, spheres etc.
40     The renderer is specified in the scene initialisation. In fact the
41     \code{from esys.pyvisi.renderers.vtk import *} provides the specific implementation for
42     \VTK
43    
44    
45     \begin{verbose}
46     class ArrowPlot3D(Plot):
47     """
48     Arrow field plot in three dimensions
49     """
50     def __init__(self, scene):
51     """
52     Initialisation of the ArrowPlot3D class
53    
54     @param scene: The Scene to render the plot in
55     @type scene: Scene object
56     def setData(self, *dataList, **options):
57     """
58     Set data to the plot
59    
60     @param dataList: List of data to set to the plot
61     @type dataList: tuple
62    
63     @param options: Dictionary of extra options
64     @type options: dict
65    
66     @param fname: Filename of the input vtk file
67     @type fname: string
68    
69     @param format: Format of the input vtk file ('vtk' or 'vtk-xml')
70     @type format: string
71    
72     @param vectors: the name of the vector data in the vtk file to use
73     @type vectors: string
74     """
75     class ArrowPlot(Plot):
76     """
77     Arrow field plot
78     """
79     def __init__(self, scene):
80     """
81     Initialisation of the ArrowPlot class
82    
83     @param scene: The Scene to render the plot in
84     @type scene: Scene object
85     """
86     def setData(self, *dataList, **options):
87     """
88     Set data to the plot
89    
90     @param dataList: List of data to set to the plot
91     @type dataList: tuple
92    
93     @param options: Dictionary of extra options
94     @type options: dict
95    
96     @param fname: the name of the input vtk file
97     @type fname: string
98    
99     @param format: the format of the input vtk file ('vtk' or 'vtk-xml')
100     @type format: string
101    
102     @param vectors: the name of the vector data in the vtk file to use
103     @type vectors: string
104     """
105     class Axes(Plot):
106     """
107     Axes class
108     """
109     def __init__(self):
110     """
111     Initialisation of Axes object
112     """
113     debugMsg("Called Axes.__init__()")
114     Plot.__init__(self)
115    
116     class BallPlot(Plot):
117     """
118     Ball plot
119     """
120     def __init__(self, scene):
121    
122     def setData(self, points=None,
123     fname=None, format=None,
124     radii=None, colors=None, tags=None):
125     """
126     Set data to the plot
127     @param points: the array to use for the points of the sphere
128     locations in space
129     @type points: float array
130    
131     @param fname: the name of the input vtk file
132     @type fname: string
133    
134     @param format: the format of the input vtk file ('vtk' or 'vtk-xml')
135     @type format: string
136    
137     @param radii: the name of the scalar array in the vtk unstructured
138     grid to use as the radii of the balls
139     @type radii: float array
140    
141     @param colors: the name of the scalar array in the vtk unstructured
142     grid to use as the colour tags of the balls
143     @type colors: string
144    
145     @param tags: the name of the scalar array in the vtk unstructured
146     grid to use as the colour of the tags of the balls
147     @type tags: integer array
148     """
149    
150     class Box(Item):
151     """
152     Generic class for Box objects
153    
154     To define a box one specify one of three groups of things:
155     - The bounds of the box: xmin, xmax, ymin, ymax, zmin, zmax
156     - The dimensions and origin: width, height, depth and origin
157     - The bottom left front and top right back corners: blf, trb
158     """
159    
160     def __init__(self):
161     """
162     Initialisation of the Box object
163     """
164     debugMsg("Called Box.__init__()")
165     Item.__init__(self)
166    
167     # define a box in many ways, either by its centre and width, height
168     # and depth, or by its bounds, xmin, xmax, ymin, ymax, zmin, zmax,
169     # or by its bottom left front and top right back points.
170    
171     # set the default bounds
172     self.xmin = -0.5
173     self.xmax = 0.5
174     self.ymin = -0.5
175     self.ymax = 0.5
176     self.zmin = -0.5
177     self.zmax = 0.5
178    
179     # set the default origin (the centre of the box)
180     self.origin = ((self.xmin + self.xmax)/2.0,
181     (self.ymin + self.ymax)/2.0,
182     (self.zmin + self.zmax)/2.0)
183    
184     # set the default dimensions
185     self.width = self.xmax - self.xmin
186     self.height = self.ymax - self.ymin
187     self.depth = self.zmax - self.zmin
188    
189     # set the default blf and trb points
190     self.blf = (self.xmin, self.ymin, self.zmin)
191     self.trb = (self.xmax, self.ymax, self.zmax)
192    
193     # tolerance for calculated variables checking purposes
194     self.tolerance = 1e-8
195    
196     def setBounds(self, xmin, xmax, ymin, ymax, zmin, zmax):
197     """
198     Set the bounds of the box
199     """
200     def getBounds(self):
201     """
202     Get the current bounds of the box
203     """
204    
205     def setOrigin(self, xo, yo, zo):
206     """
207     Set the origin of the box
208     """
209     def getOrigin(self):
210     """
211     Get the current origin of the box
212     """
213     debugMsg("Called Box.getOrigin()")
214     return self.origin
215    
216     def setWidth(self, width):
217     """
218     Set the width of the box
219     """
220     def getWidth(self):
221     """
222     Get the current box width
223     """
224     debugMsg("Called Box.getWidth()")
225     return self.width
226    
227     def setHeight(self, height):
228     """
229     Set the box height
230     """
231    
232     def getHeight(self):
233     """
234     Get the current box height
235     """
236     debugMsg("Called Box.getHeight()")
237     return self.height
238    
239     def setDepth(self, depth):
240     """
241     Set the box depth
242     """
243    
244     def getDepth(self):
245     """
246     Get the current box depth
247     """
248     debugMsg("Called Box.getDepth()")
249     return self.depth
250    
251     def setBLF(self, bottom, left, front):
252     """
253     Set the position of the bottom, left, front corner
254     """
255    
256     def getBLF(self):
257     """
258     Get the current position of the bottom, left, front corner
259     """
260     debugMsg("Called Box.getBLF()")
261     return self.blf
262    
263     def setTRB(self, top, right, back):
264     """
265     Set the position of the top, right, back corner
266     """
267    
268     def getTRB(self):
269     """
270     Get the current position of the top, right, back corner
271     """
272     debugMsg("Called Box.getTRB()")
273     return self.trb
274    
275    
276     class ClipBox(Box):
277     """
278     Clip box class: used to clip data sets with a box
279    
280     A box in this sense means three planes at right angles to one another
281     """
282    
283     def __init__(self, plot):
284     """
285     Intialisation of the ClipBox object
286     """
287    
288     def setInsideOut(self, insideOut):
289     """
290     Set the inside out flag
291     """
292    
293     def getInsideOut(self):
294     """
295     Get the current value of the inside out flag
296     """
297    
298     class Camera(Item):
299     """
300     Camera class
301     """
302     def __init__(self, scene):
303     """
304     Initialisation of the Camera object
305    
306     @param scene: The Scene object to add the Camera object to
307     @type scene: Scene object
308     """
309     def setPosition(self, *pos):
310     """
311     Set position of camera within scene
312    
313     @param pos: Position to set camera in terms of x,y,z coordinates
314     @type pos: tuple
315     """
316    
317     def getPosition(self):
318     """
319     Get the position of Camera within Scene
320    
321     Returns the position in a tuple of form (xPos, yPos, zPos)
322     """
323     debugMsg("Called Camera.getPosition()")
324    
325     return (self.xPos, self.yPos, self.zPos)
326    
327     def setFocalPoint(self, *pos):
328     """
329     Sets the focal point of the Camera with the Scene
330    
331     @param pos: Position to set the focal point
332     @type pos: tuple
333     """
334    
335     def getFocalPoint(self):
336     """
337     Get the position of the focal point of the Camera
338    
339     Returns the position of the focal point in a tuple of form
340     (xPos, yPos, zPos)
341     """
342    
343     def setElevation(self, elevation):
344     """
345     Set the elevation angle (in degrees) of the Camera
346    
347     @param elevation: The elevation angle (in degrees) of the Camera
348     @type elevation: float
349     """
350    
351     return
352    
353     def getElevation(self):
354     """
355     Gets the elevation angle (in degrees) of the Camera
356     """
357    
358     def setAzimuth(self, azimuth):
359     """
360     Set the azimuthal angle (in degrees) of the Camera
361    
362     @param azimuth: The azimuthal angle (in degrees) of the Camera
363     @type azimuth: float
364     """
365    
366     def getAzimuth(self):
367     """
368     Get the azimuthal angle (in degrees) of the Camera
369     """
370     class ContourPlot(Plot):
371     """
372     Contour plot
373     """
374     def __init__(self, scene):
375     """
376     Initialisation of the ContourPlot class
377    
378     @param scene: The Scene to render the plot in
379     @type scene: Scene object
380     """
381     def setData(self, *dataList, **options):
382     """
383     Set data to the plot
384    
385     @param dataList: List of data to set to the plot
386     @type dataList: tuple
387    
388     @param options: Dictionary of extra options
389     @type options: dict
390    
391     @param fname: the name of the input vtk file
392     @type fname: string
393    
394     @param format: the format of the input vtk file ('vtk' or 'vtk-xml')
395     @type format: string
396    
397     @param scalars: the scalar data in the vtk file to use
398     @type scalars: string
399     """
400    
401     class EllipsoidPlot(Plot):
402     """
403     Ellipsoid plot
404     """
405     def __init__(self, scene):
406     """
407     Initialisation of the EllipsoidPlot class
408    
409     @param scene: The Scene to render the plot in
410     @type scene: Scene object
411     """
412     debugMsg("Called EllipsoidPlot.__init__()")
413     Plot.__init__(self, scene)
414    
415     self.renderer = scene.renderer
416     self.renderer.addToInitStack("# EllipsoidPlot.__init__()")
417    
418     # labels and stuff
419     self.title = None
420     self.xlabel = None
421     self.ylabel = None
422     self.zlabel = None
423    
424     # default values for fname, format and tensors
425     self.fname = None
426     self.format = None
427     self.tensors = None
428    
429     # default values for shared info
430     self.escriptData = False
431     self.otherData = False
432    
433     # add the plot to the scene
434     scene.add(self)
435    
436     def setData(self, *dataList, **options):
437     """
438     Set data to the plot
439    
440     @param dataList: List of data to set to the plot
441     @type dataList: tuple
442    
443     @param options: Dictionary of keyword options to the method
444     @type options: dict
445    
446     @param fname: the name of the input vtk file
447     @type fname: string
448    
449     @param format: the format of the input vtk file ('vtk' or 'vtk-xml')
450     @type format: string
451    
452     @param tensors: the name of the tensor data in the vtk file to use
453     @type tensors: string
454     """
455    
456     class Image(Item):
457     """
458     Image class. Generic class to handle image data.
459     """
460     def __init__(self, scene=None):
461     """
462     Initialises the Image class object
463    
464     @param scene: The Scene object to add to
465     @type scene: Scene object
466     """
467     debugMsg("Called Image.__init__()")
468     Item.__init__(self)
469    
470     if scene is not None:
471     self.renderer = scene.renderer
472    
473     def load(self, fname):
474     """
475     Loads image data from file.
476    
477     @param fname: The filename from which to load image data
478     @type fname: string
479     """
480     debugMsg("Called Image.load()")
481    
482     fileCheck(fname)
483    
484     return
485    
486     class JpegImage(Image):
487     """
488     Subclass of Image class to explicitly handle jpeg images
489     """
490     def __init__(self, scene=None):
491     """
492     Initialises the JpegImage class object
493    
494     @param scene: The Scene object to add to
495     @type scene: Scene object
496     """
497    
498     def load(self, fname):
499     """
500     Loads jpeg image data from file.
501    
502     @param fname: The filename from which to load jpeg image data
503     @type fname: string
504     """
505    
506     class PngImage(Image):
507     """
508     Subclass of Image class to explicitly handle png images
509     """
510     def __init__(self, scene=None):
511     """
512     Initialises the PngImage class object
513    
514     @param scene: The Scene object to add to
515     @type scene: Scene object
516     """
517    
518     def load(self, fname):
519     """
520     Loads png image data from file.
521    
522     @param fname: The filename from which to load png image data
523     @type fname: string
524     """
525     class BmpImage(Image):
526     """
527     Subclass of Image class to explicitly handle bmp images
528     """
529     def __init__(self, scene=None):
530     """
531     Initialises the BmpImage class object
532    
533     @param scene: The Scene object to add to
534     @type scene: Scene object
535     """
536     def load(self, fname):
537     """
538     Loads bmp image data from file.
539    
540     @param fname: The filename from which to load bmp image data
541     @type fname: string
542     """
543    
544     class TiffImage(Image):
545     """
546     Subclass of Image class to explicitly handle tiff images
547     """
548     def __init__(self, scene=None):
549     """
550     Initialises the TiffImage class object
551    
552     @param scene: The Scene object to add to
553     @type scene: Scene object
554     """
555     def load(self, fname):
556     """
557     Loads tiff image data from file.
558    
559     @param fname: The filename from which to load tiff image data
560     @type fname: string
561     """
562     class PnmImage(Image):
563     """
564     Subclass of Image class to explicitly handle pnm (ppm, pgm, pbm) images
565     """
566     def __init__(self, scene=None):
567     """
568     Initialises the PnmImage class object
569    
570     @param scene: The Scene object to add to
571     @type scene: Scene object
572     """
573    
574     def load(self, fname):
575     """
576     Loads pnm (ppm, pgm, pbm) image data from file.
577    
578     @param fname: The filename from which to load pnm image data
579     @type fname: string
580     """
581    
582     class PsImage(Image):
583     """
584     Subclass of Image class to explicitly handle ps images
585     """
586     def __init__(self, scene=None):
587     """
588     Initialises the PsImage class object
589    
590     This object is B{only} used for generating postscript output
591    
592     @param scene: The Scene object to add to
593     @type scene: Scene object
594     """
595    
596     def load(self, fname):
597     """
598     Loads ps image data from file.
599    
600     B{NOT} supported by this renderer module
601    
602     @param fname: The filename from which to load ps image data
603     @type fname: string
604     """
605     debugMsg("Called PsImage.load()")
606    
607     # need to check if the file exists
608     fileCheck(fname)
609    
610     # this ability not handled by this renderer module
611     unsupportedError()
612    
613     return
614    
615     def render(self):
616     """
617     Does PsImage object specific (pre)rendering stuff
618     """
619     debugMsg("Called PsImage.render()")
620    
621     return
622    
623     class PdfImage(Image):
624     """
625     Subclass of Image class to explicitly handle pdf images
626     """
627     def __init__(self, scene=None):
628     """
629     Initialises the PdfImage class object
630    
631     This object is B{only} used for generating pdf output
632    
633     @param scene: The Scene object to add to
634     @type scene: Scene object
635     """
636    
637     def load(self, fname):
638     """
639     Loads pdf image data from file.
640    
641     B{NOT} supported by this renderer module
642    
643     @param fname: The filename from which to load pdf image data
644     @type fname: string
645     """
646    
647     class IsosurfacePlot(Plot):
648     """
649     Isosurface plot
650     """
651     def __init__(self, scene):
652     """
653     Initialisation of the IsosurfacePlot class
654    
655     @param scene: The Scene to render the plot in
656     @type scene: Scene object
657     """
658     def setData(self, *dataList, **options):
659     """
660     Set data to the plot
661    
662     @param dataList: List of data to set to the plot
663     @type dataList: tuple
664    
665     @param options: Dictionary of keyword options to the method
666     @type options: dict
667    
668     @param fname: the name of the input vtk file
669     @type fname: string
670    
671     @param format: the format of the input vtk file ('vtk' or 'vtk-xml')
672     @type format: string
673    
674     @param scalars: the name of the scalar data in the vtk file to use
675     @type scalars: string
676     """
677    
678     class LinePlot(Plot):
679     """
680     Line plot
681     """
682     def __init__(self, scene):
683     """
684     Initialisation of the LinePlot class
685    
686     @param scene: The Scene to render the plot in
687     @type scene: Scene object
688     """
689    
690     def setData(self, *dataList, **options):
691     """
692     Set data to the plot
693    
694     @param dataList: List of data to set to the plot
695     @type dataList: tuple
696    
697     @param options: Dictionary of extra options
698     @type options: dict
699    
700     @param offset: whether or not to offset the lines from one another
701     @type offset: boolean
702    
703     @param fname: Filename of the input vtk file
704     @type fname: string
705    
706     @param format: format of the input vtk file ('vtk' or 'vtk-xml')
707     @type format: string
708    
709     @param scalars: the name of the scalar data in the vtk file to use
710     @type scalars: string
711     """
712    
713     class OffsetPlot(Plot):
714     """
715     Offset plot
716     """
717     def __init__(self, scene):
718     """
719     Initialisation of the OffsetPlot class
720    
721     @param scene: The Scene to render the plot in
722     @type scene: Scene object
723     """
724    
725     def setData(self, *dataList, **options):
726     """
727     Set data to the plot
728    
729     @param dataList: List of data to set to the plot
730     @type dataList: tuple
731    
732     @param options: Dictionary of extra options
733     @type options: dict
734    
735     @param fname: Filename of the input vtk file
736     @type fname: string
737    
738     @param format: Format of the input vtk file ('vtk' or 'vtk-xml')
739     @type format: string
740    
741     @param scalars: the name of the scalar data in the vtk file to use
742     @type scalars: string
743     """
744     class Plane(Item):
745     """
746     Generic class for Plane objects
747     """
748    
749     def __init__(self, scene):
750     """
751     Initialisation of the Plane object
752     """
753    
754     def setOrigin(self, x, y, z):
755     """
756     Set the origin of the plane
757     """
758    
759     def getOrigin(self):
760     """
761     Get the current origin of the plane
762     """
763    
764     def setNormal(self, vx, vy, vz):
765     """
766     Set the normal vector to the plane
767     """
768    
769     def getNormal(self):
770     """
771     Get the current normal vector to the plane
772     """
773    
774     def mapImageToPlane(self, image):
775     # this really needs to go somewhere else!!!
776     """
777     Maps an Image object onto a Plane object
778     """
779    
780     class CutPlane(Plane):
781     """
782     Cut plane class: used to cut data sets with a plane
783    
784     Cut plane objects define a plane to cut a data set or plot by and return
785     the data along the intersection between the data set or plot with the
786     defined plane.
787     """
788    
789     def __init__(self):
790     """
791     Intialisation of the CutPlane object
792     """
793    
794    
795     class ClipPlane(Plane):
796     """
797     Class for planes used to clip datasets
798     """
799    
800     def __init__(self):
801     """
802     Intialisation of the ClipPlane object
803     """
804    
805     def setInsideOut(self, insideOut):
806     """
807     Set the inside out flag
808     """
809    
810     def getInsideOut(self):
811     """
812     Get the current value of the inside out flag
813     """
814    
815     class Plot(Item):
816     """
817     Abstract plot class
818     """
819     def __init__(self, scene):
820     """
821     Initialisation of the abstract Plot class
822    
823     @param scene: The Scene to render the plot in
824     @type scene: Scene object
825     """
826    
827     def setData(self, *dataList, **options):
828     """
829     Set data to the plot
830    
831     @param dataList: List of data to set to the plot
832     @type dataList: tuple
833    
834     @param options: Dictionary of extra options
835     @type options: dict
836     """
837    
838     def setTitle(self, title):
839     """
840     Set the plot title
841    
842     @param title: the string holding the title to the plot
843     @type title: string
844     """
845     debugMsg("Called setTitle() in Plot()")
846    
847    
848     def setXLabel(self, label):
849     """
850     Set the label of the x-axis
851    
852     @param label: the string holding the label of the x-axis
853     @type label: string
854     """
855    
856     def setYLabel(self, label):
857     """
858     Set the label of the y-axis
859    
860     @param label: the string holding the label of the y-axis
861     @type label: string
862     """
863    
864     def setZLabel(self, label):
865     """
866     Set the label of the z-axis
867    
868     @param label: the string holding the label of the z-axis
869     @type label: string
870     """
871    
872     def setLabel(self, axis, label):
873     """
874     Set the label of a given axis
875    
876     @param axis: string (Axis object maybe??) of the axis (e.g. x, y, z)
877     @type axis: string or Axis object
878    
879     @param label: string of the label to set for the axis
880     @type label: string
881     """
882    
883     class Renderer(BaseRenderer):
884     """
885     A generic object holding a renderer of a Scene().
886     """
887    
888     def __init__(self):
889     """
890     Initialisation of Renderer() class
891     """
892     debugMsg("Called Renderer.__init__()")
893     BaseRenderer.__init__(self)
894    
895     # initialise some attributes
896     self.renderWindowWidth = 640
897     self.renderWindowHeight = 480
898    
899     # what is the name of my renderer?
900     self.name = _rendererName
901    
902     # the namespace to run the exec code
903     self.renderDict = {}
904    
905     # initialise the evalstack
906     self._evalStack = ""
907    
908     # keep the initial setup of the module for later reuse
909     self._initStack = ""
910    
911     # initialise the renderer module
912     self.runString("# Renderer._initRendererModule")
913     self.addToInitStack("import vtk")
914     self.addToInitStack("from numarray import *")
915    
916     __revision__ = '$Revision: 1.33 $'
917    
918     class Scene(BaseScene):
919     """
920     The main object controlling the scene.
921    
922     Scene object methods and classes overriding the BaseScene class.
923     """
924    
925     def __init__(self):
926     """
927     The init function
928     """
929    
930     def add(self, obj):
931     """
932     Add a new item to the scene
933    
934     @param obj: The object to add to the scene
935     @type obj: object
936     """
937    
938     def place(self, obj):
939     """
940     Place an object within a scene
941    
942     @param obj: The object to place within the scene
943     @type obj: object
944     """
945    
946     def render(self, pause=False, interactive=False):
947     """
948     Render (or re-render) the scene
949    
950     Render the scene, either to screen, or to a buffer waiting for a save
951    
952     @param pause: Flag to wait at end of script evaluation for user input
953     @type pause: boolean
954    
955     @param interactive: Whether or not to have interactive use of the output
956     @type interactive: boolean
957     """
958    
959     def save(self, fname, format):
960     """
961     Save the scene to a file
962    
963     Possible formats are:
964     - Postscript
965     - PNG
966     - JPEG
967     - TIFF
968     - BMP
969     - PNM
970    
971     @param fname: Name of output file
972     @type fname: string
973    
974     @param format: Graphics format of output file
975     @type format: Image object or string
976     """
977    
978     def setBackgroundColor(self, *color):
979     """
980     Sets the background color of the Scene
981    
982     @param color: The color to set the background to. Can be RGB or CMYK
983     @type color: tuple
984     """
985    
986     def getBackgroundColor(self):
987     """
988     Gets the current background color setting of the Scene
989     """
990    
991     def setSize(self, xSize, ySize):
992     """
993     Sets the size of the scene.
994    
995     This size is effectively the renderer window size.
996    
997     @param xSize: the size to set the x dimension
998     @type xSize: float
999    
1000     @param ySize: the size to set the y dimension
1001     @type ySize: float
1002     """
1003    
1004     def getSize(self):
1005     """
1006     Gets the current size of the scene
1007    
1008     This size is effectively the renderer window size. Returns a tuple
1009     of the x and y dimensions respectively, in pixel units(??).
1010     """
1011     class SurfacePlot(Plot):
1012     """
1013     Surface plot
1014     """
1015     def __init__(self, scene):
1016     """
1017     Initialisation of the SurfacePlot class
1018    
1019     @param scene: The Scene to render the plot in
1020     @type scene: Scene object
1021     """
1022    
1023     def setData(self, *dataList, **options):
1024     """
1025     Set data to the plot
1026    
1027     @param dataList: List of data to set to the plot
1028     @type dataList: tuple
1029    
1030     @param options: Dictionary of extra options
1031     @type options: dict
1032    
1033     @param fname: the name of the input vtk file
1034     @type fname: string
1035    
1036     @param format: the format of the input vtk file ('vtk' or 'vtk-xml')
1037     @type format: string
1038    
1039     @param scalars: the scalar data in the vtk file to use
1040     @type scalars: string
1041     """
1042    
1043     class Text(Item):
1044     """
1045     Text
1046     """
1047     def __init__(self, scene):
1048     """
1049     Initialisation of the Text object
1050    
1051     @param scene: the scene with which to associate the Text object
1052     @type scene: Scene object
1053     """
1054    
1055     def setFont(self, font):
1056     """
1057     Set the current font
1058    
1059     @param font: the font to set
1060     @type font: string
1061     """
1062    
1063     def getFont(self):
1064     """
1065     \end{verbose}

  ViewVC Help
Powered by ViewVC 1.1.26