[cig-commits] r4513 - in mc/3D/CitcomS/trunk/visual/Mayavi2: . plugins plugins/filter plugins/plugin_defs

maweier at geodynamics.org maweier at geodynamics.org
Mon Sep 11 10:24:29 PDT 2006


Author: maweier
Date: 2006-09-11 10:24:29 -0700 (Mon, 11 Sep 2006)
New Revision: 4513

Modified:
   mc/3D/CitcomS/trunk/visual/Mayavi2/Citcoms_HdfDisplay.py
   mc/3D/CitcomS/trunk/visual/Mayavi2/Citcoms_VtkDisplay.py
   mc/3D/CitcomS/trunk/visual/Mayavi2/plugins/CitcomS_hdf_file_reader.py
   mc/3D/CitcomS/trunk/visual/Mayavi2/plugins/filter/CitcomSFilterActions.py
   mc/3D/CitcomS/trunk/visual/Mayavi2/plugins/filter/CitcomSSphere.py
   mc/3D/CitcomS/trunk/visual/Mayavi2/plugins/filter/CitcomSreduce.py
   mc/3D/CitcomS/trunk/visual/Mayavi2/plugins/filter/CitcomSshowCaps.py
   mc/3D/CitcomS/trunk/visual/Mayavi2/plugins/filter/CitcomSshowSurface.py
   mc/3D/CitcomS/trunk/visual/Mayavi2/plugins/plugin_defs/mayavi_ui_plugin_definition.py
Log:
Updated licenses.


Modified: mc/3D/CitcomS/trunk/visual/Mayavi2/Citcoms_HdfDisplay.py
===================================================================
--- mc/3D/CitcomS/trunk/visual/Mayavi2/Citcoms_HdfDisplay.py	2006-09-11 17:23:11 UTC (rev 4512)
+++ mc/3D/CitcomS/trunk/visual/Mayavi2/Citcoms_HdfDisplay.py	2006-09-11 17:24:29 UTC (rev 4513)
@@ -56,9 +56,6 @@
         scap = CitcomSshowCaps()
         script.add_filter(scap)
         
-        #Orientation Axes
-        oa = orientation_axes.OrientationAxes()
-        script.add_module(oa)
         
         #Show ScalarCutPlane
         scp = scalar_cut_plane.ScalarCutPlane()
@@ -71,10 +68,12 @@
        
         gly = glyph.Glyph()
         gly.glyph.glyph_source.scale = 0.082
-        gly.glyph.scale_mode = 'data_scaling_off'
-        gly.glyph.color_mode = 'no_coloring'
+        gly.glyph.scale_mode = 'scale_by_scalar'
+        gly.glyph.color_mode = 'color_by_scalar'
         script.add_module(gly)
-        
+        mm = gly.module_manager
+        mm.scalar_lut_manager.use_default_range = False
+        mm.scalar_lut_manager.data_range = 0.0, 1.0
         ################### Create CORE ################################
         #Load VTK Data Sets
         sphere = tvtk.SphereSource()

Modified: mc/3D/CitcomS/trunk/visual/Mayavi2/Citcoms_VtkDisplay.py
===================================================================
--- mc/3D/CitcomS/trunk/visual/Mayavi2/Citcoms_VtkDisplay.py	2006-09-11 17:23:11 UTC (rev 4512)
+++ mc/3D/CitcomS/trunk/visual/Mayavi2/Citcoms_VtkDisplay.py	2006-09-11 17:24:29 UTC (rev 4513)
@@ -79,10 +79,6 @@
         scap = CitcomSshowCaps()
         script.add_filter(scap)
         
-        #Orientation Axes
-        oa = orientation_axes.OrientationAxes()
-        script.add_module(oa)
-        
         #Show ScalarCutPlane
         scp = scalar_cut_plane.ScalarCutPlane()
         script.add_module(scp)
@@ -94,10 +90,12 @@
         #Shows Glyph on reduce grid
         gly = glyph.Glyph()
         gly.glyph.glyph_source.scale = 0.082
-        gly.glyph.scale_mode = 'data_scaling_off'
-        gly.glyph.color_mode = 'no_coloring'
+        gly.glyph.scale_mode = 'scale_by_scalar'
+        gly.glyph.color_mode = 'color_by_scalar'
         script.add_module(gly)
-        
+        mm = gly.module_manager
+        mm.scalar_lut_manager.use_default_range = False
+        mm.scalar_lut_manager.data_range = 0.0, 1.0
         ################### Create CORE ################################
         #Load VTK Data Sets
         sphere = tvtk.SphereSource()

Modified: mc/3D/CitcomS/trunk/visual/Mayavi2/plugins/CitcomS_hdf_file_reader.py
===================================================================
--- mc/3D/CitcomS/trunk/visual/Mayavi2/plugins/CitcomS_hdf_file_reader.py	2006-09-11 17:23:11 UTC (rev 4512)
+++ mc/3D/CitcomS/trunk/visual/Mayavi2/plugins/CitcomS_hdf_file_reader.py	2006-09-11 17:24:29 UTC (rev 4513)
@@ -1,7 +1,8 @@
 """This source manages a CitcomS Hdf file given to it.  
 """
 # Author: Martin Weier
-# Copyright (c) 
+# Copyright (c) 2006, California Institute of Technology
+# License: GPL Style
 
 # Enthought library imports.
 from enthought.traits import Trait, TraitPrefixList, Instance, Int, Str, Button

Modified: mc/3D/CitcomS/trunk/visual/Mayavi2/plugins/filter/CitcomSFilterActions.py
===================================================================
--- mc/3D/CitcomS/trunk/visual/Mayavi2/plugins/filter/CitcomSFilterActions.py	2006-09-11 17:23:11 UTC (rev 4512)
+++ mc/3D/CitcomS/trunk/visual/Mayavi2/plugins/filter/CitcomSFilterActions.py	2006-09-11 17:24:29 UTC (rev 4513)
@@ -1,9 +1,19 @@
 """Actions to start the CitcomS filter.
 
 """
-# Author: Martin Weier
-# Copyright (c) California Institute of Technology
-# License: 
+#Author: Martin Weier 
+#Copyright (C) 2006  California Institute of Technology
+#This program is free software; you can redistribute it and/or modify
+#it under the terms of the GNU General Public License as published by
+#the Free Software Foundation; either version 2 of the License, or
+#any later version.
+#This program is distributed in the hope that it will be useful,
+#but WITHOUT ANY WARRANTY; without even the implied warranty of
+#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#GNU General Public License for more details.
+#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
 
 # Enthought library imports.
 # Local imports.

Modified: mc/3D/CitcomS/trunk/visual/Mayavi2/plugins/filter/CitcomSSphere.py
===================================================================
--- mc/3D/CitcomS/trunk/visual/Mayavi2/plugins/filter/CitcomSSphere.py	2006-09-11 17:23:11 UTC (rev 4512)
+++ mc/3D/CitcomS/trunk/visual/Mayavi2/plugins/filter/CitcomSSphere.py	2006-09-11 17:24:29 UTC (rev 4513)
@@ -1,3 +1,20 @@
+"""Creates points os a specified cap with a specified resolution.
+"""
+
+# Author: Martin Weier
+#Copyright (C) 2006  California Institute of Technology
+#This program is free software; you can redistribute it and/or modify
+#it under the terms of the GNU General Public License as published by
+#the Free Software Foundation; either version 2 of the License, or
+#any later version.
+#This program is distributed in the hope that it will be useful,
+#but WITHOUT ANY WARRANTY; without even the implied warranty of
+#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#GNU General Public License for more details.
+#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
+
 from math import sqrt,acos,pi,atan, atan2, sin, cos
 
 
@@ -2,3 +19,3 @@
 class CitcomSSphere:
-    
+    #Cointains corner points for each cap.
     lookup_table = [( (0.013497673906385899, 0.0, 0.54983437061309814) ,

Modified: mc/3D/CitcomS/trunk/visual/Mayavi2/plugins/filter/CitcomSreduce.py
===================================================================
--- mc/3D/CitcomS/trunk/visual/Mayavi2/plugins/filter/CitcomSreduce.py	2006-09-11 17:23:11 UTC (rev 4512)
+++ mc/3D/CitcomS/trunk/visual/Mayavi2/plugins/filter/CitcomSreduce.py	2006-09-11 17:24:29 UTC (rev 4513)
@@ -39,18 +39,16 @@
     probe_filter = Instance(tvtk.ProbeFilter, ())
 
     citcomsgrid = CitcomSSphere()
+    sphere = Instance(tvtk.SphereSource,())
     
     # Upper threshold (this is a dynamic trait that is changed when
     # input data changes).
-    Radius = Range(0.0, 1.0, 0.0,
-                            desc='adjust radius')
+    Radius = Range(0.0, 1.0, 0.0, desc='adjust radius')
     
-    theta = Range(0, 40, 10,
-                            desc='the theta resolution')
-    phi = Range(0, 40, 10,
-                            desc='the upper threshold of the filter')
+    theta = Range(0, 40, 3, desc='the theta resolution')
+    phi = Range(0, 40, 3, desc='the upper threshold of the filter')
 
-    Selected_Source = Enum( 'Sphere', 'CitcomSGrid',)
+    Selected_Source = Enum(  'Sphere','CitcomSGrid',)
     
     radius_max = Float(1.0)
     set_radius_max = Button('Set Radius Max')
@@ -83,6 +81,9 @@
         dependent on upstream sources and filters.
         """
         # Just setup the default output of this filter.
+        s = self.sphere
+        s.set(radius=0.0,theta_resolution=20,phi_resolution=20)
+        self.probe_filter.input = s.output
         self.outputs = [self.probe_filter.output]
     
     def update_pipeline(self):

Modified: mc/3D/CitcomS/trunk/visual/Mayavi2/plugins/filter/CitcomSshowCaps.py
===================================================================
--- mc/3D/CitcomS/trunk/visual/Mayavi2/plugins/filter/CitcomSshowCaps.py	2006-09-11 17:23:11 UTC (rev 4512)
+++ mc/3D/CitcomS/trunk/visual/Mayavi2/plugins/filter/CitcomSshowCaps.py	2006-09-11 17:24:29 UTC (rev 4513)
@@ -104,30 +104,27 @@
         This method is invoked (automatically) when any of the inputs
         sends a `data_changed` event.
         """
-        self.update()
+	fil = self.ugrid_filter
+        fil.update()
         # Propagate the data_changed event.
         self.data_changed = True
 
     ######################################################################
     # Non-public interface
     ######################################################################
-    def _lower_threshold_changed(self, old_value, new_value):
+    def _lower_threshold_changed(self,old_value, new_value):
         """Callback interface for the lower threshold slider"""
-        if new_value>=self.upper_threshold:
-            new_value=self.upper_threshold-1
         fil = self.ugrid_filter
-        fil.point_minimum = new_value*(self.n)
+        fil.point_minimum = (self.lower_threshold)*(self.n)
         fil.update()
         self.data_changed = True
         
+        
     def _upper_threshold_changed(self, old_value, new_value):
         """Callback interface for the upper threshold slider"""
-        if new_value<=self.lower_threshold:
-            new_value=self.lower_threshold+1
         fil = self.ugrid_filter
-        fil.point_maximum = new_value*(self.n)
+        fil.point_maximum = self.upper_threshold*(self.n)
         fil.update()
         self.data_changed = True
-       
-
+      
    

Modified: mc/3D/CitcomS/trunk/visual/Mayavi2/plugins/filter/CitcomSshowSurface.py
===================================================================
--- mc/3D/CitcomS/trunk/visual/Mayavi2/plugins/filter/CitcomSshowSurface.py	2006-09-11 17:23:11 UTC (rev 4512)
+++ mc/3D/CitcomS/trunk/visual/Mayavi2/plugins/filter/CitcomSshowSurface.py	2006-09-11 17:24:29 UTC (rev 4513)
@@ -2,8 +2,18 @@
 
 """
 # Author: Martin Weier
-# Copyright (c) 2006, California Institue of Technology
-# License: GPL Style.
+#Copyright (C) 2006  California Institute of Technology
+#This program is free software; you can redistribute it and/or modify
+#it under the terms of the GNU General Public License as published by
+#the Free Software Foundation; either version 2 of the License, or
+#any later version.
+#This program is distributed in the hope that it will be useful,
+#but WITHOUT ANY WARRANTY; without even the implied warranty of
+#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#GNU General Public License for more details.
+#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
 
 # Enthought library imports.
 from enthought.traits import Instance, Range, Int, Float

Modified: mc/3D/CitcomS/trunk/visual/Mayavi2/plugins/plugin_defs/mayavi_ui_plugin_definition.py
===================================================================
--- mc/3D/CitcomS/trunk/visual/Mayavi2/plugins/plugin_defs/mayavi_ui_plugin_definition.py	2006-09-11 17:23:11 UTC (rev 4512)
+++ mc/3D/CitcomS/trunk/visual/Mayavi2/plugins/plugin_defs/mayavi_ui_plugin_definition.py	2006-09-11 17:24:29 UTC (rev 4513)
@@ -1,9 +1,9 @@
 """The MayaVi plugin definition.
 
 """
-# Author: Prabhu Ramachandran <prabhu_r at users.sf.net>
-# Copyright (c) 2005, Enthought, Inc.
-# License: BSD Style.
+# Author: Martin Weier
+# Copyright (c) 2006, California Institute of Technology
+# License: GPL Style
 
 # Enthought library imports.
 from enthought.envisage import PluginDefinition, get_using_workbench



More information about the cig-commits mailing list