1. 21 Jul, 2014 1 commit
  2. 18 Jul, 2014 11 commits
  3. 17 Jul, 2014 7 commits
    • Utkarsh Ayachit's avatar
      BUG #14873: Fixed selections on vtkTable datasets in spreadsheet. · 8e345d4d
      Utkarsh Ayachit authored
      Spreadsheet view didn't show rows selected in vtkTable properly due to
      missing logic in vtkMarkSelectedRows to mark selection rows. Fixed that.
      
      Also update documentation in pqSpreadSheetViewSelectionModel to better
      explain its role.
      
      Change-Id: I8a1b26f0a193a6bd4be8f0c3e62f6727a09c0e31
      8e345d4d
    • Cory Quammen's avatar
      Added method EnableAllAttributeArrays() · ada8c849
      Cory Quammen authored
      This method is for convenience and to balance out the existing method
      DisableAllAttributeArrays().
      
      In addition, return 0 from GetNumberOfAttributeArrays() if attribute
      (POINT, CELL, etc.) is not available instead of signaling an error.
      
      Change-Id: I321e3028ef380c203b0ebc7d715e1b18987cca0d
      ada8c849
    • Utkarsh Ayachit's avatar
      Update PythonSelection test. · 8f190c1d
      Utkarsh Ayachit authored
      Update PythonSelection test since "ids" array is not added
      automatically. Using GenerateIds() filter explicitly, until we decide
      what's the right way forward.
      
      Change-Id: Ibb67460659ca2a4cfd62f75b091d9a42f83f2fff
      8f190c1d
    • Utkarsh Ayachit's avatar
      Handle the case with mismatched arrays across ranks. · 408409ea
      Utkarsh Ayachit authored
      It's highly possible (e.g in Exodus with can.ex2) for all ranks to not
      have the same set of arrays. This raises errors in evaluating expression
      on certain ranks. Adding NoneArray for those missing arrays addresses
      this issue.
      
      Also fixed a warning in vtkMultiProcessControllerHelper exposed by
      FindData test in parallel.
      
      Change-Id: I7b137dbd8c52598ae33aab96e0895a2025ceb7c1
      408409ea
    • Cory Quammen's avatar
      Remove debugging output that slipped by review. · 03a6c323
      Cory Quammen authored
      Change-Id: Id26c59f69e3a2d7984d7350bc6bdbdae94ed2f13
      03a6c323
    • Dave DeMarle's avatar
      a844f99b
    • Cory Quammen's avatar
      Removed unnecessary import of numpy · 089c05b6
      Cory Quammen authored
      Numpy is not required for this test, and causes an exception on
      systems where numpy is not available.
      
      Change-Id: I7400724df98da547c85e0f93ae79e176d1066219
      089c05b6
  4. 16 Jul, 2014 21 commits
    • Utkarsh Ayachit's avatar
      Fix shadowed variable warnings. · 88dfa0ba
      Utkarsh Ayachit authored
      Change-Id: Id9a4d2594f4a827b991f93ddc6a51ca1a1893956
      88dfa0ba
    • Utkarsh Ayachit's avatar
      Update PythonAnnotationFilter. · 78e7ff7e
      Utkarsh Ayachit authored
      Updating PythonAnnotationFilter to work with newer numpy support. Since
      the calculator.py API was changed, updating extract_selection module as
      well.
      
      Change-Id: I3fe663455b506bd75e7452773af8fab23c0dc422
      78e7ff7e
    • Utkarsh Ayachit's avatar
      Update VTK to bring fixes for string arrays. · f9d53e7d
      Utkarsh Ayachit authored
      Change-Id: Ie6d825b21b8d4aede038d49a5b8c26cae7336d24
      f9d53e7d
    • Cory Quammen's avatar
      Cleaned up vtkPythonView code · 4b9e10ac
      Cory Quammen authored
      - Removed unused helper code
      - Got rid of GenerateImage() method that wasn't really needed.
      
      Change-Id: I03ee11215ec713b5a84c3e4d62b5d9d252b2467f
      4b9e10ac
    • Cory Quammen's avatar
      Reset image data in the vtkPythonView before each render · 4b9d452b
      Cory Quammen authored
      If this is not done, the previous successfully generated image may
      still be displayed.
      
      In addition, the Python environment is now reset prior to evaluating
      the python script to clear out any definitions set in prior
      evaluations of different verions of the script. For example, one could
      define a render() method in the script, then set the script to the
      empty string. Without resetting the Python environment, the render()
      method would still be defined, which is unexpected stateful behavior.
      
      Change-Id: I8979d8c2f9ec1657c7a84292e18d77147d947647
      4b9d452b
    • Cory Quammen's avatar
      Evaluate script within a unique Python dictionary · b35b18da
      Cory Quammen authored
      If there were two or more Python View instances, the top-level
      functions and variables from the most-recently evaluated Python View
      script would clobber the functions and variables from the other Python
      Views. To fix this, now each Python View script is evaluated in the
      context of a unique Python dictionary copied from the global
      dictionary returned by the globals() built-in function. This prevents
      any clobbering of function definitions between different instances of
      the vtkPythonView class.
      
      To simplify calling these functions from the C++ side, the utility
      functions call_render() and call_setup_data() in python_view.py
      now take a reference to the function that should be evaluated.
      
      Change-Id: I7fe294ea40508c4fc0c1bd18706c156da7f08a2b
      
      Change-Id: I8d5304905cd1c69fb6cc390718ff41da2a718660
      b35b18da
    • Cory Quammen's avatar
      Moved most of the code calling Python functions to Python side · 3ada95a9
      Cory Quammen authored
      The scripts that invoked the user-defined functions were getting long
      and awkward to call from the C++ side, so they have moved to the
      Python side.
      
      In addition, added backwards compatibility support for calling
      old-style render() functions so that no modifications to existing
      scripts are required. This works by checking the number of arguments
      required by the defined render() function. If the number of arguments
      is two, an old-style render() function is assumed. If the number of
      arguments is three, the new-style render() function is assumed.
      
      Change-Id: I09d8a10d0fdc0573de6d6cfc7bcc8523c5fb43f1
      3ada95a9
    • Cory Quammen's avatar
      Removed unnecessary explicit loading of test baseline · a6bba0ce
      Cory Quammen authored
      Change-Id: Ie1f20192654d97ee5e51958c59f14220d70a8862
      a6bba0ce
    • Cory Quammen's avatar
      Removed some commented out code · 20df572a
      Cory Quammen authored
      Change-Id: I5560b1f7e9502103c2331d84a383e3374a014341
      20df572a
    • Cory Quammen's avatar
      Added two Python View tests · 64d65098
      Cory Quammen authored
      One tests creation of a view image from a numpy array and the other
      tests creation of an image using only VTK. Added baselines as well.
      
      Change-Id: I03ce0abaa029ebbc8284712e3dde11f13a51865f
      64d65098
    • Cory Quammen's avatar
      Removed dependency of pqPythonView on matplotlib · 2a8174ca
      Cory Quammen authored
      It remains dependent on PARAVIEW_ENABLE_PYTHON being on.
      
      Change-Id: Ia519c9bbf5a2ba559b8c62e6d79c065ccdde23e4
      2a8174ca
    • Cory Quammen's avatar
      Added comparison against baseline for Python View test · 8229c50e
      Cory Quammen authored
      Change-Id: Icd69b17bd9cdfd992bc19356301cf6717fa4d61e
      8229c50e
    • Cory Quammen's avatar
      Added utility function matplotlib_figure(width, height) · 15268405
      Cory Quammen authored
      This saves on some boilerplate for setting up matplotlib figures in
      Python views.
      
      Removed some unneeded semicolons.
      
      Change-Id: I1036d88eb979dff73aeb0c4c6ea855091e14ab7a
      15268405
    • Cory Quammen's avatar
      Fixed the test to generate a valid image · 7613571c
      Cory Quammen authored
      Change-Id: I4d97ea635c54cef1c9a80699ffc704d2d2ef6139
      7613571c
    • Cory Quammen's avatar
      Added utility function numpy_to_image · 9a82c9fe
      Cory Quammen authored
      This function converts 2D or 3D numpy arrays to vtkImageData
      objects.
      
      Change-Id: I9e23f161201c794f3ef122f3f8bf3c3a7b4b39da
      9a82c9fe
    • Cory Quammen's avatar
      Updated Python View baseline · 96c67cf9
      Cory Quammen authored
      Change-Id: I32a35a8b2ca5e560d8050bb84f0842d83b58a6e9
      96c67cf9
    • Cory Quammen's avatar
      Made test name more specific · a0adf856
      Cory Quammen authored
      Change-Id: I3e6d23c14ce4082fe163cae90896563f0cd8090a
      a0adf856
    • Cory Quammen's avatar
      Updated Python View tests for refactored Python View · 55b039ae
      Cory Quammen authored
      Change-Id: I0c80d67a0749be0c134c5fff686f09b10dd6d0bd
      55b039ae
    • Cory Quammen's avatar
      Removed Python View's dependency on matplotlib · 007f10e1
      Cory Quammen authored
      Matplotlib is no longer necessary to use Python View.
      
      Change-Id: Iff5713f5727ba295ae055bbc9cee8ea726a7c48b
      007f10e1
    • Cory Quammen's avatar
      Made python view dependent only on Python · b1b26f8f
      Cory Quammen authored
      Removed dependency on matplotlib.
      
      Change-Id: I2896bec920f3ce0a7f6209c813b7752bce94a4aa
      b1b26f8f
    • Cory Quammen's avatar
      Refactored Python View to remove dependence on matplotlib · 549c58e9
      Cory Quammen authored
      In principal, image data to be displayed in a view render window could
      be generated many different ways in Python - using matplotlib, OpenCV,
      or even direct manipulation of a numpy array. In light of that, this
      change decouples the Python View from matplotlib. Matplotlib may still
      be used to generate images in the Python view with slight modification
      to existing Python scripts used in the Python view.
      
      From a user's perspective, the only changes to know about are how to
      define the "render" function in the Python script. Previously, the
      "render" function had the signature
      
        def render(view, figure)
      
      where "view" is the Python View instance calling this function and
      "figure" was a matplotlib figure that was set up by the view
      automatically. The function was not expected to return a value.
      
      Now the "render" function has the signature
      
        def render(view, width, height)
      
      where "view" is still the Python View and the "width" and "height"
      parameters are the width and height of the current view render
      window. IMPORTANT - the function is now expected to return a
      vtkImageData object containing the image content to display in the
      view render window.
      
      To generate an image from matplotlib, Figure and FigureCanvas
      object need to be created the following way:
      
        from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
        from matplotlib.figure import Figure
      
        figure = Figure()
        figureCanvas = FigureCanvas(figure)
        figure.set_dpi(72)
        figure.set_size_inches(float(width)/72.0, float(height)/72.0)
      
      This "figure" object can be used in the same way as the "figure"
      argument in the previous signature of the "render" method.
      
      A convenience function has been added to to the python_view module to
      create a vtkImageData object from a matplotlib Figure object. It is
      used as follows:
      
        from paraview import python_view
        vtk_image = python_view.figure_to_image(figure)
      
      This refactoring has simplified the implementation of the Python View
      dramatically. The matplotlib utilities are no longer needed with the
      changes in the Python View. Furthermore, Python View is now available
      whenever Python is enabled.
      
      Change-Id: Ic41301f5f7492fa8f171570b03eff317c7faf108
      549c58e9