[cig-commits] r4476 - mc/3D/CitcomS/trunk/visual/Mayavi2

maweier at geodynamics.org maweier at geodynamics.org
Tue Sep 5 15:41:11 PDT 2006


Author: maweier
Date: 2006-09-05 15:41:10 -0700 (Tue, 05 Sep 2006)
New Revision: 4476

Added:
   mc/3D/CitcomS/trunk/visual/Mayavi2/README
Modified:
   mc/3D/CitcomS/trunk/visual/Mayavi2/Citcoms_Hdf2Vtk.py
Log:
Bugfixes and a new README on how to use the code.


Modified: mc/3D/CitcomS/trunk/visual/Mayavi2/Citcoms_Hdf2Vtk.py
===================================================================
--- mc/3D/CitcomS/trunk/visual/Mayavi2/Citcoms_Hdf2Vtk.py	2006-09-05 21:10:21 UTC (rev 4475)
+++ mc/3D/CitcomS/trunk/visual/Mayavi2/Citcoms_Hdf2Vtk.py	2006-09-05 22:41:10 UTC (rev 4476)
@@ -1,6 +1,7 @@
 #!/usr/bin/env python
 
-#    Script to generate VTK files from CitcomS hdf files
+#    Script to generate TVTK files from CitcomS hdf files
+#    author: Martin Weier
 #    Copyright (C) 2006 California Institue of Technology 
 #
 #    This program is free software; you can redistribute it and/or modify
@@ -16,8 +17,8 @@
 #    You should have received a copy of the GNU General Public License
 #    along with this program; if not, write to the Free Software
 #    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-#    For more information contact maweier at geodynamics.org
 
+
 #import scipy
 import sys
 from datetime import datetime
@@ -227,8 +228,8 @@
         for n0 in xrange(el_nz_redu*el_ny_redu*el_nx_redu):
             iter = vtk_i.next()
             
-            if capnr==0:
-                print iter
+            #if capnr==0:
+            #    print iter
             
             #print iter
             #Get Cartesian Coords from Coords
@@ -666,6 +667,5 @@
 
 
 
-
 if __name__ == '__main__':
     citcoms_hdf2vtk()

Added: mc/3D/CitcomS/trunk/visual/Mayavi2/README
===================================================================
--- mc/3D/CitcomS/trunk/visual/Mayavi2/README	2006-09-05 21:10:21 UTC (rev 4475)
+++ mc/3D/CitcomS/trunk/visual/Mayavi2/README	2006-09-05 22:41:10 UTC (rev 4476)
@@ -0,0 +1,42 @@
+Citcoms_Hdf2Vtk.py is a program to convert CitcomS Hdf files
+to Vtk files. To run it please make sure that you have
+- pyvtk 0.4.66 or above
+- pytables 1.3.1 or a above
+installed.
+
+see Citcoms_Hdf2Vtk.py --help for help.
+It is recommended but not necessary to reduce the grid size by
+specifying a new grid with the options -x|-y|-z [resolution].
+
+################################################################
+To run the Mayavi2 extensions please install the latest version.
+It is recommended to copy this folder to the Mayavi2 root directory.
+Warning these scripts won't work standalone. Always run them out
+of this folder.
+
+To start Mayavi2 with a predefined visualization please
+use:
+
+For Vtk files:
+Citcoms_VtkDisplay.py [path to vtk file]
+
+For Hdf files:
+Citcoms_HdfDisplay.py [path to hdf file] [timestep] 
+It is recommended but not necessary to reduce the grid size by
+specifying a new grid with the options -x|-y|-z [resolution].
+
+################################################################
+To make the new filters and the CitcomS File reader available 
+in the Mayavi2 menu please copy the content of this folder to 
+the Mayavi2 root directory and edit mayavi_ui_plugin_definition.py.
+To see an example have a look at
+plugins/plugin_defs/mayavi_ui_plugin_definition.py.
+Warning: Do not overwrite your file with this one. There is no 
+guarantee that Mayavi will work after this. Please edit the
+files carefully and have in mind that you are editing python code. 
+Always make a backup from the original files.
+ 
+
+
+
+



More information about the cig-commits mailing list