File: x518.html

package info (click to toggle)
mayavi 1.4-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,068 kB
  • ctags: 1,838
  • sloc: python: 16,794; sh: 54; makefile: 48
file content (874 lines) | stat: -rw-r--r-- 14,014 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>The Menus</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="MayaVi Users Guide"
HREF="book1.html"><LINK
REL="UP"
TITLE="Using MayaVi"
HREF="c313.html"><LINK
REL="PREVIOUS"
TITLE="Configuring the lights"
HREF="x512.html"><LINK
REL="NEXT"
TITLE="Module Documentation"
HREF="x761.html"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>MayaVi Users Guide</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x512.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 3. Using MayaVi</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x761.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="MENUS"
>The Menus</A
></H1
><P
>This section details the various menus that MayaVi provides.  Almost
all the menu items have hot keys associated with them.  The underlined
letter indicates the key sequence to be used.  Consider the case of
the <SPAN
CLASS="GUIMENUITEM"
>New Window</SPAN
> menu item (the letter
<SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>N</I
></SPAN
> is underlined) that is in the
<SPAN
CLASS="GUIMENU"
>File</SPAN
> menu (the letter <SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>F</I
></SPAN
> is
underlined).  This can be reached by using the following key strokes.
<B
CLASS="KEYCAP"
>Alt-F</B
> followed by <B
CLASS="KEYCAP"
>N</B
>.  The Menu
itself requires the <B
CLASS="KEYCAP"
>Alt</B
> modifier but the menu item
does not.  The following are the various menus that MayaVi provides.</P
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="FILE-MENU"
>File Menu</A
></H2
><P
>The <SPAN
CLASS="GUIMENU"
>File</SPAN
> menu provides the following menu items.</P
><DIV
CLASS="GLOSSLIST"
><DL
><DT
><B
><SPAN
CLASS="GUIMENUITEM"
>New Window</SPAN
></B
></DT
><DD
><P
>This creates a new MayaVi visualization window that is completely
independent of the first window.  Any number of such windows can be
created.</P
></DD
><DT
><B
><SPAN
CLASS="GUIMENUITEM"
>Open</SPAN
></B
></DT
><DD
><P
>This provides a submenu containing two items.</P
><DIV
CLASS="GLOSSLIST"
><DL
><DT
><B
> <SPAN
CLASS="GUIMENUITEM"
> VTK file </SPAN
> </B
></DT
><DD
><P
>   This provides a GUI dialog from which a VTK file can be selected
   for opening.  Once the file is opened a new
   <CODE
CLASS="CLASSNAME"
>DataVizManager</CODE
> is created and a GUI dialog
   for configuring the data file is provided.
   </P
></DD
><DT
><B
> <SPAN
CLASS="GUIMENUITEM"
> VTK XML file </SPAN
> </B
></DT
><DD
><P
>   This provides a GUI dialog from which a VTK XML file can be chosen.
   This is a new VTK format and is only available in VTK versions
   higher than 4.0.
   </P
></DD
><DT
><B
> <SPAN
CLASS="GUIMENUITEM"
> PLOT3D file </SPAN
> </B
></DT
><DD
><P
>  This provides a sub menu from which either a PLOT3D file containing
  single block or multi-block binary structured grid data can be
  selected for opening.  Once the file is opened a new
  <CODE
CLASS="CLASSNAME"
>DataVizManager</CODE
> is created and a GUI dialog
  for configuring the data file is provided.
  </P
></DD
><DT
><B
> <SPAN
CLASS="GUIMENUITEM"
> EnSight case file </SPAN
> </B
></DT
><DD
><P
>  This provides a sub menu from which an EnSight case file can be
  opened.
  </P
></DD
></DL
></DIV
></DD
><DT
><B
><SPAN
CLASS="GUIMENUITEM"
>Import</SPAN
></B
></DT
><DD
><P
>This provides a submenu containing two items.</P
><DIV
CLASS="GLOSSLIST"
><DL
><DT
><B
> <SPAN
CLASS="GUIMENUITEM"
> VRML2 scene </SPAN
> </B
></DT
><DD
><P
> This loads a VRML2 scene into the current visualization.
  </P
></DD
><DT
><B
> <SPAN
CLASS="GUIMENUITEM"
> 3D Studio scene </SPAN
> </B
></DT
><DD
><P
> This provides a menu containing all the VRML files that are
  already opened.  The chosen VRML file is closed and the VRML files
  actors are removed from the rendered scene.
  </P
></DD
></DL
></DIV
></DD
><DT
><B
><SPAN
CLASS="GUIMENUITEM"
>Load</SPAN
></B
></DT
><DD
><P
>This provides a submenu containing three items.</P
><DIV
CLASS="GLOSSLIST"
><DL
><DT
><B
> <SPAN
CLASS="GUIMENUITEM"
> Visualization </SPAN
> </B
></DT
><DD
><P
> This loads a saved <SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>complete</I
></SPAN
>
  visualization.
  </P
></DD
><DT
><B
> <SPAN
CLASS="GUIMENUITEM"
> ModuleManagers </SPAN
> </B
></DT
><DD
><P
> This creates new <CODE
CLASS="CLASSNAME"
>ModuleManager</CODE
>s for
  the current <CODE
CLASS="CLASSNAME"
>DataVizManager</CODE
> and loads
  <CODE
CLASS="CLASSNAME"
>ModuleManager</CODE
>s that have been saved to a file
  into the newly created ones.
  </P
></DD
><DT
><B
> <SPAN
CLASS="GUIMENUITEM"
> ModuleManagers (Append)</SPAN
>
  </B
></DT
><DD
><P
> This is slightly different from the previous menu item and
  loads the first of the saved <CODE
CLASS="CLASSNAME"
>ModuleManager</CODE
>s
  into the current <CODE
CLASS="CLASSNAME"
>ModuleManager</CODE
> and for the
  subsequent saved <CODE
CLASS="CLASSNAME"
>ModuleManager</CODE
>s it creates
  new <CODE
CLASS="CLASSNAME"
>ModuleManager</CODE
>s and loads
  <CODE
CLASS="CLASSNAME"
>ModuleManager</CODE
>s from the saved file.
  </P
></DD
></DL
></DIV
></DD
><DT
><B
><SPAN
CLASS="GUIMENUITEM"
>Save</SPAN
></B
></DT
><DD
><P
>This provides a submenu containing four items.</P
><DIV
CLASS="GLOSSLIST"
><DL
><DT
><B
> <SPAN
CLASS="GUIMENUITEM"
> Entire Visualization </SPAN
> </B
></DT
><DD
><P
> This saves the <SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>entire</I
></SPAN
> visualization
  configuration to a file such that it can be loaded by the
  <SPAN
CLASS="GUIMENUITEM"
>Load</SPAN
> menu's
  <SPAN
CLASS="GUIMENUITEM"
>Visualization</SPAN
> menu item.
  </P
></DD
><DT
><B
> <SPAN
CLASS="GUIMENUITEM"
> Current DataVizManager </SPAN
>
  </B
></DT
><DD
><P
> This creates saves the current
  <CODE
CLASS="CLASSNAME"
>DataVizManager</CODE
> to a file.  This can be loaded
  as a visualization.
  </P
></DD
><DT
><B
> <SPAN
CLASS="GUIMENUITEM"
> Current ModuleManager </SPAN
>
  </B
></DT
><DD
><P
> This enables one to store the currently active
  <CODE
CLASS="CLASSNAME"
>ModuleManager</CODE
> into a file such that it can be
  loaded later.
  </P
></DD
><DT
><B
> <SPAN
CLASS="GUIMENUITEM"
> All ModuleManagers </SPAN
>
  </B
></DT
><DD
><P
> This enables one to store the all the
  <CODE
CLASS="CLASSNAME"
>ModuleManager</CODE
>s for the currently active
  <CODE
CLASS="CLASSNAME"
>DataVizManager</CODE
> into a file such that it can
  be loaded later.
  </P
></DD
></DL
></DIV
></DD
><DT
><B
><SPAN
CLASS="GUIMENUITEM"
>Save Scene to</SPAN
></B
></DT
><DD
><P
>Provides a menu which in turn provides menu items to export the
visualized scene to a Post Script file, PPM/BMP/TIFF/JPEG/PNG image,
Open Inventor, Geomview OOGL, VRML and RenderMan RIB files.  It is
also possible to save the scene to a vector graphic via <A
HREF="http://www.geuz.org/gl2ps"
TARGET="_top"
>GL2PS</A
>.  This is only available
if VTK is built with GL2PS support.</P
></DD
><DT
><B
><SPAN
CLASS="GUIMENUITEM"
>Close</SPAN
></B
></DT
><DD
><P
>Provides submenu's to close the current
<CODE
CLASS="CLASSNAME"
>DataVizManager</CODE
>.  This means that all the
<CODE
CLASS="CLASSNAME"
>ModuleManager</CODE
>s of that particular
<CODE
CLASS="CLASSNAME"
>DataVizManager</CODE
> will also be deleted.  It also
provides menus to close the currently active VRML and 3D Studio scenes
that have been imported.</P
></DD
><DT
><B
><SPAN
CLASS="GUIMENUITEM"
>Close All</SPAN
></B
></DT
><DD
><P
>Close all the <CODE
CLASS="CLASSNAME"
>DataVizManager</CODE
>s and all the
imported VRML2 and 3D Studio scenes.</P
></DD
><DT
><B
><SPAN
CLASS="GUIMENUITEM"
>Exit</SPAN
></B
></DT
><DD
><P
>Close this particular MayaVi Window.  If this is the only MayaVi
window the application exits completely.</P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="VIZ-MENU"
>Visualize Menu</A
></H2
><P
>The <SPAN
CLASS="GUIMENU"
>Visualize</SPAN
> menu provides the following menu items.</P
><DIV
CLASS="GLOSSLIST"
><DL
><DT
><B
><SPAN
CLASS="GUIMENUITEM"
> Modules </SPAN
></B
></DT
><DD
><P
>Provides a sub-menu which contains a list of all available
<CODE
CLASS="CLASSNAME"
>Module</CODE
>s.  This list is dynamically generated
based on the available modules.</P
></DD
><DT
><B
><SPAN
CLASS="GUIMENUITEM"
> Filters </SPAN
></B
></DT
><DD
><P
>Provides a sub-menu which contains a list of all available
<CODE
CLASS="CLASSNAME"
>Filter</CODE
>s.  This list is dynamically generated
based on the available filters.</P
></DD
><DT
><B
><SPAN
CLASS="GUIMENUITEM"
> Pipeline browser </SPAN
></B
></DT
><DD
><P
>This creates a GUI that shows the entire VTK visualization pipeline.
The objects in the pipeline can be configured by double clicking on
the items.  If there are a large number of objects this can become
confusing to use and it would be better to use the pipeline segment
browser configuration provided with the configuration for each
<CODE
CLASS="CLASSNAME"
>Module</CODE
></P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="OPTIONS-MENU"
>Options Menu</A
></H2
><P
>The <SPAN
CLASS="GUIMENU"
>Options</SPAN
> menu provides the following menu items.</P
><DIV
CLASS="GLOSSLIST"
><DL
><DT
><B
><SPAN
CLASS="GUIMENUITEM"
> Preferences </SPAN
></B
></DT
><DD
><P
>Provides a GUI using which one can edit the default preferences.  The
preferences allow one to set various default settings including
foreground color, background color, default directory where the file
related dialogs will open in initially.  These options can be saved so
that the next time MayaVi is started it will use these defaults.  If
you set the default directory to an empty one the directory that the
file open/save dialogs will use will be intelligently chosen.  The
stereo rendering option enables stereo rendering in the MayaVi window.
If the save current lighting option is set then the current lighting
is saved as the default and used in all subsequent MayaVi
visualizations.</P
><P
> The search path setting allows the user to specify a list of
directories where user defined modules and filters are made available.
The search path is a ':'-separated string and is specified like the
PYTHONPATH.  '~', '~user' and '$VAR' are all expanded.  Each of the
directories specified in this string can have a <TT
CLASS="FILENAME"
> Modules/ </TT
> and <TT
CLASS="FILENAME"
> Filters/ </TT
> directory inside
where user defined modules and filters can be stored.  These modules
and filters will be made available inside the
<SPAN
CLASS="GUIMENUITEM"
>User</SPAN
> sub-menu of the
<SPAN
CLASS="GUIMENUITEM"
>Module</SPAN
> and
<SPAN
CLASS="GUIMENUITEM"
>Filter</SPAN
> menus.  These modules and filters
can be used from the command line or from a Python interpreter session
by using 'User.ModuleName' or 'User.FilterName'.</P
></DD
><DT
><B
><SPAN
CLASS="GUIMENUITEM"
> Configure RenderWindow </SPAN
></B
></DT
><DD
><P
>Provides a simple GUI to configure the Visualization RenderWindow.
This is also where one can change the stereo rendering options.</P
></DD
><DT
><B
><SPAN
CLASS="GUIMENUITEM"
> Change Foreground </SPAN
></B
></DT
><DD
><P
>Allows one to change the default foreground color.</P
></DD
><DT
><B
><SPAN
CLASS="GUIMENUITEM"
> Change Background </SPAN
></B
></DT
><DD
><P
>Allows one to change the default background color.</P
></DD
><DT
><B
><SPAN
CLASS="GUIMENUITEM"
> Show Debug window </SPAN
></B
></DT
><DD
><P
>Pops up a small window where debug messages are printed.  This is very
useful if you run into trouble and want to know what happened.  It
also shows the function call sequence.  The messages are also printed
to stderr.</P
></DD
><DT
><B
><SPAN
CLASS="GUIMENUITEM"
> Show Control Panel </SPAN
></B
></DT
><DD
><P
>Toggles the visibility of the <A
HREF="c313.html#CONTROL-PANEL"
>control
panel</A
>.  This can be very useful when you want to do a full
screen visualization.</P
></DD
><DT
><B
><SPAN
CLASS="GUIMENUITEM"
> Reload Modules </SPAN
></B
></DT
><DD
><P
>This function reloads all the currently loaded Python modules.  This
is <SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>very</I
></SPAN
> useful while debugging a new feature for
some module that one is creating.  One may also see funny behavior
for already instantiated objects.</P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="HELP-MENU"
>Help Menu</A
></H2
><P
>The <SPAN
CLASS="GUIMENU"
>Help</SPAN
> menu provides the following menu items.</P
><DIV
CLASS="GLOSSLIST"
><DL
><DT
><B
><SPAN
CLASS="GUIMENUITEM"
>About</SPAN
></B
></DT
><DD
><P
>Displays a few details about MayaVi.</P
></DD
><DT
><B
><SPAN
CLASS="GUIMENUITEM"
>Users Guide</SPAN
></B
></DT
><DD
><P
>Opens a web browser and displays this MayaVi users guide.</P
></DD
><DT
><B
><SPAN
CLASS="GUIMENUITEM"
>Home page</SPAN
></B
></DT
><DD
><P
>Opens a web browser and displays the MayaVi home page.</P
></DD
></DL
></DIV
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x512.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="book1.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x761.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Configuring the lights</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="c313.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Module Documentation</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>