[Python-apps-commits] r1485 - in packages/mayavi2/trunk/debian (5 files)

varun at users.alioth.debian.org varun at users.alioth.debian.org
Sun Jun 22 06:51:18 UTC 2008


    Date: Sunday, June 22, 2008 @ 06:51:14
  Author: varun
Revision: 1485

* Add ExtractVectorComponent.diff patch (Closes: #479448)
* Add SelectOutputFilter.diff patch (Closes: #478359)
* Bump Standards-Version to 3.8.0

Added:
  packages/mayavi2/trunk/debian/patches/ExtractVectorComponent.diff
  packages/mayavi2/trunk/debian/patches/SelectOutputFilter.diff
Modified:
  packages/mayavi2/trunk/debian/changelog
  packages/mayavi2/trunk/debian/control
  packages/mayavi2/trunk/debian/patches/series

Modified: packages/mayavi2/trunk/debian/changelog
===================================================================
--- packages/mayavi2/trunk/debian/changelog	2008-06-21 13:31:39 UTC (rev 1484)
+++ packages/mayavi2/trunk/debian/changelog	2008-06-22 06:51:14 UTC (rev 1485)
@@ -1,3 +1,11 @@
+mayavi2 (2.1.1-5) unstable; urgency=low
+
+  * Add ExtractVectorComponent.diff patch (Closes: #479448)
+  * Add SelectOutputFilter.diff patch (Closes: #478359)
+  * Bump Standards-Version to 3.8.0
+
+ -- Varun Hiremath <varun at debian.org>  Sat, 21 Jun 2008 21:34:22 +0530
+
 mayavi2 (2.1.1-3) unstable; urgency=low
 
   * Add plot3d_reader.diff patch from upstream, fixes issues with reading

Modified: packages/mayavi2/trunk/debian/control
===================================================================
--- packages/mayavi2/trunk/debian/control	2008-06-21 13:31:39 UTC (rev 1484)
+++ packages/mayavi2/trunk/debian/control	2008-06-22 06:51:14 UTC (rev 1485)
@@ -5,7 +5,7 @@
 Uploaders: Ondrej Certik <ondrej at certik.cz>, Marco Rodrigues <gothicx at sapo.pt>, Varun Hiremath <varun at debian.org>
 Build-Depends: cdbs, debhelper (>= 5), python-all-dev, python-central (>= 0.6.0),
  python-setuptools, python-vtk, python-numpy, quilt
-Standards-Version: 3.7.3
+Standards-Version: 3.8.0
 Vcs-Svn: svn://svn.debian.org/svn/python-apps/packages/mayavi2/trunk
 Vcs-Browser: http://svn.debian.org/wsvn/python-apps/packages/mayavi2/trunk/
 XS-Python-Version: current

Added: packages/mayavi2/trunk/debian/patches/ExtractVectorComponent.diff
===================================================================
--- packages/mayavi2/trunk/debian/patches/ExtractVectorComponent.diff	                        (rev 0)
+++ packages/mayavi2/trunk/debian/patches/ExtractVectorComponent.diff	2008-06-22 06:51:14 UTC (rev 1485)
@@ -0,0 +1,198 @@
+diff -urN mayavi2_2.1.1.orig/enthought.mayavi/docs/mayavi2.man mayavi2_2.1.1/enthought.mayavi/docs/mayavi2.man
+--- mayavi2_2.1.1.orig/enthought.mayavi/docs/mayavi2.man	2008-03-07 05:58:36.000000000 +0530
++++ mayavi2_2.1.1/enthought.mayavi/docs/mayavi2.man	2008-06-21 13:01:21.000000000 +0530
+@@ -318,6 +318,12 @@
+ input but no scalar data for the magnitude of the vectors\&.
+ 
+ .TP
++.B ExtractVectorComponents
++Wraps the TVTK ExtractVectorComponents filter to extract components of
++a vector\&. This is useful for analysing individual components of a
++vector data\&.
++
++.TP
+ .B GaussianSplatter
+ This filter splat points into a volume with an elliptical, Gaussian distribution\&.
+ 
+diff -urN mayavi2_2.1.1.orig/enthought.mayavi/docs/user_guide/application.rst mayavi2_2.1.1/enthought.mayavi/docs/user_guide/application.rst
+--- mayavi2_2.1.1.orig/enthought.mayavi/docs/user_guide/application.rst	2008-03-07 05:58:36.000000000 +0530
++++ mayavi2_2.1.1/enthought.mayavi/docs/user_guide/application.rst	2008-06-21 13:01:21.000000000 +0530
+@@ -248,6 +248,11 @@
+           (with optional scaling between [0, 1]). This is useful
+           when the input data has vector input but no scalar data
+           for the magnitude of the vectors.
++	  
++   ExtractVectorComponents
++	  Wraps the TVTK ExtractVectorComponents filter to extract
++	  components of a vector. This is useful for analysing
++	  individual components of a vector data.
+ 
+    GaussianSplatter
+           This filter splat points into a volume with an elliptical,
+diff -urN mayavi2_2.1.1.orig/enthought.mayavi/enthought/mayavi/action/filters.py mayavi2_2.1.1/enthought.mayavi/enthought/mayavi/action/filters.py
+--- mayavi2_2.1.1.orig/enthought.mayavi/enthought/mayavi/action/filters.py	2008-03-07 05:58:34.000000000 +0530
++++ mayavi2_2.1.1/enthought.mayavi/enthought/mayavi/action/filters.py	2008-06-21 13:01:01.000000000 +0530
+@@ -148,6 +148,16 @@
+         mv = get_imayavi(self.window)
+         mv.add_filter(f)
+ 
++######################################################################
++# `ExtractVectorComponentsFilter` class.
++######################################################################
++class ExtractVectorComponentsFilter(WorkbenchAction):
++    def perform(self):
++        """ Performs the action. """
++        from enthought.mayavi.filters.extract_vector_components import ExtractVectorComponents
++        f = ExtractVectorComponents()
++        mv = get_imayavi(self.window)
++        mv.add_filter(f)
+ 
+ ######################################################################
+ # `GaussianSplatter` class.
+diff -urN mayavi2_2.1.1.orig/enthought.mayavi/enthought/mayavi/filters/api.py mayavi2_2.1.1/enthought.mayavi/enthought/mayavi/filters/api.py
+--- mayavi2_2.1.1.orig/enthought.mayavi/enthought/mayavi/filters/api.py	2008-03-07 05:58:33.000000000 +0530
++++ mayavi2_2.1.1/enthought.mayavi/enthought/mayavi/filters/api.py	2008-06-21 13:01:01.000000000 +0530
+@@ -15,6 +15,7 @@
+ from extract_tensor_components import ExtractTensorComponents
+ from extract_unstructured_grid import ExtractUnstructuredGrid
+ from extract_vector_norm import ExtractVectorNorm
++from extract_vector_components import ExtractVectorComponents
+ from gaussian_splatter import GaussianSplatter
+ from greedy_terrain_decimation import GreedyTerrainDecimation
+ from mask_points import MaskPoints
+diff -urN mayavi2_2.1.1.orig/enthought.mayavi/enthought/mayavi/filters/extract_vector_components.py mayavi2_2.1.1/enthought.mayavi/enthought/mayavi/filters/extract_vector_components.py
+--- mayavi2_2.1.1.orig/enthought.mayavi/enthought/mayavi/filters/extract_vector_components.py	1970-01-01 05:30:00.000000000 +0530
++++ mayavi2_2.1.1/enthought.mayavi/enthought/mayavi/filters/extract_vector_components.py	2008-06-21 13:01:01.000000000 +0530
+@@ -0,0 +1,63 @@
++# Author: Varun Hiremath <varun at debian.org>
++
++# Enthought library imports.
++from enthought.traits.api import Instance, Enum
++from enthought.traits.ui.api import View, Group, Item, InstanceEditor
++from enthought.tvtk.api import tvtk
++
++# Local imports
++from enthought.mayavi.filters.filter_base import FilterBase
++
++######################################################################
++# `ExtractVectorComponents` class.
++######################################################################
++class ExtractVectorComponents(FilterBase):
++    """ This wraps the TVTK ExtractVectorComponents filter and allows
++    one to select any of the three components of an input vector data
++    attribute."""
++
++    # The version of this class.  Used for persistence.
++    __version__ = 0
++
++    # The actual TVTK filter that this class manages.
++    filter = Instance(tvtk.ExtractVectorComponents, args=(), allow_none=False)
++
++    # The Vector Component to be extracted
++    component = Enum('x-component', 'y-component', 'z-component',
++                     desc='component of the vector to be extracted')
++
++    view = View(Group(Item(name='component')),
++                resizable=True
++               )
++
++    ######################################################################
++    # `Filter` interface.
++    ######################################################################
++    def update_pipeline(self):
++        # Do nothing if there is no input.
++        inputs = self.inputs
++        if len(inputs) == 0:
++            return
++
++        fil = self.filter
++        fil.input = inputs[0].outputs[0]
++        fil.update()
++        self._component_changed(self.component)
++
++    ######################################################################
++    # Non-public interface.
++    ######################################################################
++    def _component_changed(self, value):
++        # Obtain output from the TVTK ExtractVectorComponents filter
++        # corresponding to the selected vector component
++
++        if len(self.inputs) == 0:
++            return
++
++        if value == 'x-component':
++            self._set_outputs([self.filter.vx_component])
++        elif value == 'y-component':
++            self._set_outputs([self.filter.vy_component])
++        elif value == 'z-component':
++            self._set_outputs([self.filter.vz_component])
++        self.render()
+diff -urN mayavi2_2.1.1.orig/enthought.mayavi/enthought/mayavi/mayavi_ui_plugin_definition.py mayavi2_2.1.1/enthought.mayavi/enthought/mayavi/mayavi_ui_plugin_definition.py
+--- mayavi2_2.1.1.orig/enthought.mayavi/enthought/mayavi/mayavi_ui_plugin_definition.py	2008-03-07 05:58:34.000000000 +0530
++++ mayavi2_2.1.1/enthought.mayavi/enthought/mayavi/mayavi_ui_plugin_definition.py	2008-06-21 13:01:01.000000000 +0530
+@@ -545,13 +545,23 @@
+ extract_vector_norm_filter = Action(
+     id            = "ExtractVectorNormFilter",
+     class_name    = ID + ".action.filters.ExtractVectorNormFilter",
+-    name          = "Extract &Vector Norm",
++    name          = "Extract Vector &Norm",
+     #image         = "images/new_scene.png",
+     tooltip       = "Compute the vector norm for the current vector data",
+     description   = "Compute the vector norm for the current vector data",
+     locations = [Location(path="MenuBar/VisualizeMenu/FiltersMenu/additions"),]
+ )
+ 
++extract_vector_components_filter = Action(
++    id            = "ExtractVectorComponentsFilter",
++    class_name    = ID + ".action.filters.ExtractVectorComponentsFilter",
++    name          = "Extract &Vector Components",
++    #image         = "images/new_scene.png",
++    tooltip       = "Extract vector components from vector data",
++    description   = "Extract vector components from vector data",
++    locations = [Location(path="MenuBar/VisualizeMenu/FiltersMenu/additions"),]
++)
++
+ gaussian_splatter_filter = Action(
+     id            = "GaussianSplatterFilter",
+     class_name    = ID + ".action.filters.GaussianSplatterFilter",
+@@ -744,7 +754,8 @@
+                extract_grid_filter,
+                extract_tensor_components_filter,
+                extract_unstructured_grid_filter,
+-               extract_vector_norm_filter,               
++               extract_vector_norm_filter,
++               extract_vector_components_filter,
+                gaussian_splatter_filter,
+                greedy_terrain_decimation_filter,
+                mask_points_filter,
+diff -urN mayavi2_2.1.1.orig/enthought.mayavi/enthought/mayavi/tools/filters.py mayavi2_2.1.1/enthought.mayavi/enthought/mayavi/tools/filters.py
+--- mayavi2_2.1.1.orig/enthought.mayavi/enthought/mayavi/tools/filters.py	2008-03-07 05:58:33.000000000 +0530
++++ mayavi2_2.1.1/enthought.mayavi/enthought/mayavi/tools/filters.py	2008-06-21 13:01:01.000000000 +0530
+@@ -19,9 +19,10 @@
+ __all__ = [ 'extractedges', 'extractvectornorm', 'tube', 'warpscalar',
+     'delaunay2d', 'threshold', 'pointtocelldata', 'elevationfilter',
+     'quadricdecimation', 'celltopointdata', 'decimatepro', 'delaunay3d',
+-    'extractgrid', 'extracttensorcomponents', 'extractunstructuredgrid',
+-    'gaussiansplatter', 'greedyterraindecimation', 'maskpoints',
+-    'polydatanormals', 'transformdata', 'trianglefilter', 'warpvector',
++    'extractgrid', 'extracttensorcomponents', 'extractvectorcomponents',
++    'extractunstructuredgrid', 'gaussiansplatter', 'greedyterraindecimation',
++    'maskpoints', 'polydatanormals', 'transformdata', 'trianglefilter',
++    'warpvector',
+ ]
+ 
+ 
+@@ -193,6 +194,13 @@
+ 
+ extracttensorcomponents = make_function(ExtractTensorComponentsFactory)
+ 
++##############################################################################
++class ExtractVectorComponentsFactory(PipeFactory):
++    """Applies the ExtractVectorComponents mayavi filter to the given VTK object."""
++    _target = Instance(filters.ExtractVectorComponents, ())
++
++extractvectorcomponents = make_function(ExtractVectorComponentsFactory)
++
+ 
+ ##############################################################################
+ class ExtractUnstructuredGridFactory(PipeFactory):

Added: packages/mayavi2/trunk/debian/patches/SelectOutputFilter.diff
===================================================================
--- packages/mayavi2/trunk/debian/patches/SelectOutputFilter.diff	                        (rev 0)
+++ packages/mayavi2/trunk/debian/patches/SelectOutputFilter.diff	2008-06-22 06:51:14 UTC (rev 1485)
@@ -0,0 +1,197 @@
+Index: mayavi2-2.1.1/enthought.mayavi/docs/mayavi2.man
+===================================================================
+--- mayavi2-2.1.1.orig/enthought.mayavi/docs/mayavi2.man	2008-06-21 13:02:27.000000000 +0530
++++ mayavi2-2.1.1/enthought.mayavi/docs/mayavi2.man	2008-06-21 13:02:27.000000000 +0530
+@@ -355,6 +355,12 @@
+ mesh\&.
+ 
+ .TP
++.B SelectOutput
++A filter that allows a user to select one among several of the outputs 
++of a given input.  This is typically very useful for a multi-block data 
++source\&.
++
++.TP
+ .B Threshold
+ A simple filter that thresholds on input data\&.
+ 
+Index: mayavi2-2.1.1/enthought.mayavi/docs/user_guide/application.rst
+===================================================================
+--- mayavi2-2.1.1.orig/enthought.mayavi/docs/user_guide/application.rst	2008-06-21 13:02:27.000000000 +0530
++++ mayavi2-2.1.1/enthought.mayavi/docs/user_guide/application.rst	2008-06-21 13:02:27.000000000 +0530
+@@ -281,6 +281,11 @@
+           Reduce triangles in a mesh, forming a good approximation of the
+           original mesh.
+ 
++   SelectOutput
++          A filter that allows a user to select one among several of the
++          outputs of a given input.  This is typically very useful for a
++          multi-block data source.
++
+    Threshold
+           A simple filter that thresholds on input data.
+ 
+Index: mayavi2-2.1.1/enthought.mayavi/enthought/mayavi/action/filters.py
+===================================================================
+--- mayavi2-2.1.1.orig/enthought.mayavi/enthought/mayavi/action/filters.py	2008-06-21 13:02:27.000000000 +0530
++++ mayavi2-2.1.1/enthought.mayavi/enthought/mayavi/action/filters.py	2008-06-21 13:02:27.000000000 +0530
+@@ -235,6 +235,17 @@
+         mv = get_imayavi(self.window)
+         mv.add_filter(f)
+ 
++######################################################################
++# `SelectOutput` class.
++######################################################################
++class SelectOutputFilter(WorkbenchAction):
++    """ An action that creates a SelectOutput filter. """
++    def perform(self):
++        """ Performs the action. """
++        from enthought.mayavi.filters.select_output import SelectOutput
++        f = SelectOutput()
++        mv = get_imayavi(self.window)
++        mv.add_filter(f)
+ 
+ ######################################################################
+ # `TransformData` class.
+Index: mayavi2-2.1.1/enthought.mayavi/enthought/mayavi/filters/api.py
+===================================================================
+--- mayavi2-2.1.1.orig/enthought.mayavi/enthought/mayavi/filters/api.py	2008-06-21 13:02:27.000000000 +0530
++++ mayavi2-2.1.1/enthought.mayavi/enthought/mayavi/filters/api.py	2008-06-21 13:02:27.000000000 +0530
+@@ -22,6 +22,7 @@
+ from point_to_cell_data import PointToCellData
+ from poly_data_normals import PolyDataNormals
+ from quadric_decimation import QuadricDecimation
++from select_output import SelectOutput
+ from threshold import Threshold
+ from transform_data import TransformData
+ from triangle_filter import TriangleFilter
+Index: mayavi2-2.1.1/enthought.mayavi/enthought/mayavi/filters/select_output.py
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ mayavi2-2.1.1/enthought.mayavi/enthought/mayavi/filters/select_output.py	2008-06-21 13:02:27.000000000 +0530
+@@ -0,0 +1,70 @@
++"""Filter that allows a user to select one among several of the outputs
++of a given input.  This is typically very useful for a multi-block data
++source.  """
++
++# Author: Prabhu Ramachandran <prabhu [at] aero . iitb . ac . in>
++# Copyright (c) 2008,  Prabhu Ramachandran
++# License: BSD Style.
++
++# Enthought library imports.
++from enthought.traits.api import Int
++from enthought.traits.ui.api import View, Group, Item
++from enthought.mayavi.core.filter import Filter
++from enthought.mayavi.core.traits import SimpleDRange
++
++################################################################################
++# `SelectOutput` class.
++################################################################################
++class SelectOutput(Filter):
++    """
++    This filter lets a user select one among several of the outputs of a
++    given input.  This is typically very useful for a multi-block data
++    source.  
++    """
++
++    # The output index in the input to choose from.
++    output_index = SimpleDRange(low_name='_min_index',
++                                high_name='_max_index',
++                                low=0,
++                                high=0,
++                                is_float=False)
++
++    # The minimum output index of our input.
++    _min_index = Int(0, desc='the minimum output index')
++    # The maximum output index of our input.
++    _max_index = Int(0, desc='the maximum output index')
++
++    ######################################## 
++    # Traits View.
++
++    view = View(Group(Item('output_index', 
++                           enabled_when='_max_index > 0')),
++                resizable=True)
++
++    ######################################################################
++    # `Filter` interface.
++    def update_pipeline(self):
++        # Do nothing if there is no input.
++        inputs = self.inputs
++        if len(inputs) == 0:
++            return
++
++        # Set the maximum index.
++        self._max_index = len(inputs[0].outputs) - 1
++        self._output_index_changed(self.output_index)
++
++    def update_data(self):
++        # Propagate the event.
++        self.data_changed = True
++
++    ######################################################################
++    # Trait handlers.
++    def _output_index_changed(self, value):
++        """Static trait handler."""
++        if value > self._max_index:
++            self.output_index = self._max_index
++        elif value < self._min_index:
++            self.output_index = self._min_index
++        else:
++            self._set_outputs([self.inputs[0].outputs[value]])
++
+Index: mayavi2-2.1.1/enthought.mayavi/enthought/mayavi/mayavi_ui_plugin_definition.py
+===================================================================
+--- mayavi2-2.1.1.orig/enthought.mayavi/enthought/mayavi/mayavi_ui_plugin_definition.py	2008-06-21 13:02:27.000000000 +0530
++++ mayavi2-2.1.1/enthought.mayavi/enthought/mayavi/mayavi_ui_plugin_definition.py	2008-06-21 13:02:27.000000000 +0530
+@@ -624,6 +624,16 @@
+     locations = [Location(path="MenuBar/VisualizeMenu/FiltersMenu/additions"),]
+ )
+ 
++select_output_filter = Action(
++    id            = "SelectOutputFilter",
++    class_name    = ID + ".action.filters.SelectOutputFilter",
++    name          = "&Select Output",
++    tooltip       = "Choose the output of the source that should be used",
++    description   = "Choose the output of the source that should be used",
++    locations = [Location(path="MenuBar/VisualizeMenu/FiltersMenu/additions"),]
++)
++
++
+ transform_data_filter = Action(
+     id            = "TransformDataFilter",
+     class_name    = ID + ".action.filters.TransformDataFilter",
+@@ -762,6 +772,7 @@
+                point_to_cell_data_filter,
+                poly_data_normals_filter,
+                quadric_decimation_filter,
++               select_output_filter,
+                transform_data_filter,
+                threshold_filter,
+                triangle_filter,
+Index: mayavi2-2.1.1/enthought.mayavi/enthought/mayavi/tools/filters.py
+===================================================================
+--- mayavi2-2.1.1.orig/enthought.mayavi/enthought/mayavi/tools/filters.py	2008-06-21 13:02:27.000000000 +0530
++++ mayavi2-2.1.1/enthought.mayavi/enthought/mayavi/tools/filters.py	2008-06-21 13:02:27.000000000 +0530
+@@ -17,7 +17,7 @@
+ from enthought.mayavi.filters.filter_base import FilterBase
+ 
+ __all__ = [ 'extractedges', 'extractvectornorm', 'tube', 'warpscalar',
+-    'delaunay2d', 'threshold', 'pointtocelldata', 'elevationfilter',
++    'delaunay2d', 'selectoutput', 'threshold', 'pointtocelldata', 'elevationfilter',
+     'quadricdecimation', 'celltopointdata', 'decimatepro', 'delaunay3d',
+     'extractgrid', 'extracttensorcomponents', 'extractvectorcomponents',
+     'extractunstructuredgrid', 'gaussiansplatter', 'greedyterraindecimation',
+@@ -246,6 +246,12 @@
+ 
+ polydatanormals = make_function(PolyDataNormalsFactory)
+ 
++##############################################################################
++class SelectOutputFactory(PipeFactory):
++    """Applies the SelectOutput mayavi filter to the given source."""
++    _target = Instance(filters.SelectOutput, ())
++
++selectoutput = make_function(SelectOutputFactory)
+ 
+ ##############################################################################
+ class TransformDataFactory(PipeFactory):

Modified: packages/mayavi2/trunk/debian/patches/series
===================================================================
--- packages/mayavi2/trunk/debian/patches/series	2008-06-21 13:31:39 UTC (rev 1484)
+++ packages/mayavi2/trunk/debian/patches/series	2008-06-22 06:51:14 UTC (rev 1485)
@@ -1 +1,3 @@
 plot3d_reader.diff
+ExtractVectorComponent.diff
+SelectOutputFilter.diff




More information about the Python-apps-commits mailing list