1. 17 May, 2013 1 commit
  2. 14 May, 2013 3 commits
  3. 13 May, 2013 1 commit
    • Brad King's avatar
      vtkTestingMacros: Generalize add_test_(python|tcl) · 52b51415
      Brad King authored
      Teach add_test_(python|tcl) to parse explicit NO_DATA, NO_RT, NO_VALID,
      and NO_OUTPUT keyword options for tests that do not need VTK_DATA_ROOT
      or do not use a valid baseline image.  Factor add_test_python1 into
      add_test_python and distinguish them with the NO_RT keyword argument.
      Update call sites to produce identical test command lines before and
      after this change.
      
      Change-Id: I09f874b26aab409e55e7aa6f92412314540dbb85
      52b51415
  4. 02 May, 2013 1 commit
    • Kyle Lutz's avatar
      Refactoring code to set color/opacity/visibility for blocks. · 52fd8ad8
      Kyle Lutz authored and Utkarsh Ayachit's avatar Utkarsh Ayachit committed
      This commit refactors some of the code added in recent weeks to add ability for
      users to set display paramaters for blocks within a composite dataset. This
      commit additionally adds support for changing block opacity.
      
      Blocks colors/opacities can also be overridden when using scalar coloring.
      The only issue is when depth-peeling gets used. In that case, point-data coloring
      with texture (i.e. using interpolate scalars before mapping) results in color
      bleeds. We need to dig into the depth peeling code to address that issue.
      
      Change-Id: I2c86912b45bc0516dc4dc726df9448e0569c8312
      52fd8ad8
  5. 30 Apr, 2013 1 commit
    • Yumin Yuan's avatar
      Attempts to fix random failure of TestPolygonSelection on amber8. · 947a3261
      Yumin Yuan authored
      The original test has many MouseMove events, and each event will trigger redrawing of polygon on screen,
      which takes a fairly long time to run on amber8 due to software-rendering with Mesa. This commit modified
      the playback events so that only a few events are included and the test result image stays the same. The pixel drawing part of the test is also turned off for the test.
      
      Change-Id: I848a550ad4a3e0fd662fb97df96e381587585318
      947a3261
  6. 27 Apr, 2013 1 commit
  7. 24 Apr, 2013 1 commit
    • Yumin Yuan's avatar
      Added polygon selection to hardware selector. · 962324b7
      Yumin Yuan authored
      A new Interaction style is added, and the hardware selector is
      modifed to handle polygon selection. This new type of selection,
      like the rubber band selection, is also based on pixel buffer.
      
      Change-Id: Ic886670fb8cf1bb4a6471b239d8767c03cfea2dc
      962324b7
  8. 22 Apr, 2013 1 commit
    • Sean McBride's avatar
      Removed dead code found by compiler warning · 8ff3310f
      Sean McBride authored
      After fixing one warning about private globals
      not being marked static (by marking them static)
      another warning appeared saying that they are in fact
      not used at all.  Just removed them.
      
      Change-Id: Iead6576f9106ab3207f0b9452f7a6951379d8f3d
      8ff3310f
  9. 17 Apr, 2013 2 commits
  10. 16 Apr, 2013 1 commit
    • Utkarsh Ayachit's avatar
      BUG: Fix GetProcAddress call when OSMesa is being used. · a142841a
      Utkarsh Ayachit authored
      When OSMesa was used (and VTK was built without X), we ended up not loading any
      of the extensions since GetProcAddress() didn't use the equivalent call for
      OSMesa i.e. OSMesaGetProcAddress(). This patch addresses that issue.
      
      Change-Id: Ia4e83f6884bd6e178f160934ff749cff4ef1e788
      a142841a
  11. 09 Apr, 2013 1 commit
    • David Thompson's avatar
      Use scalar annotations on interval-mode scalar bar. · 55cb7e11
      David Thompson authored
      This commit renders user-provided notes associated with specific
      scalar values on the interval-mode scalar bar. Previously, only
      the categorical mode rendered these annotations.
      
      Also, provide the scalar bar with an optional swatch
      to illustrate the color assigned to NaN values.
      
      Add an option to color leader lines from the scalar bar to
      the annotation labels by the corresponding scalar value.
      
      This commit also breaks the process of rebuilding the scalar bar
      into several virtual methods so that subclasses (particularly
      ParaView's `vtkPVScalarBarActor`) can reuse more of the base class
      functionality. The process is now separated into 2 phases: layout,
      where bounding boxes for scalar bar components are placed; and
      configuration, where actors are positioned and geometry is created.
      This includes some changes to text actor to support constrained
      placement and text size queries.
      
      Add a test for the new scalar bar options.
      There are now many more options controlling how the scalar bar behaves.
      In particular many settings interact with the way geometry is rendered:
      the lookup table may be indexed or not (thus tick marks may not be
      rendered); the orientation may be horizontal or vertical; annotations
      may be rendered or not; the NaN annotation may be omitted; leader lines
      to annotations may be colored by the scalar they annotate or by the label
      color; and the tick marks may precede or succeed the scalar bar.
      Also, we must test how empty labels are handled and how even vs odd
      numbers of labels affect placement (since the algorithm for placement
      behaves differently in these cases).
      
      We cannot perform a full factorial test, but do test independent
      configurations.
      
      Finally, this commit improves the performance of prominent value
      detection for primitive-type arrays (e.g., int, double) by avoiding
      the use of vtkVariant instances to hold the working set of distinct
      values during sampling.
      
      Change-Id: I852f9b497d5e6ab619d9d7b763f641c44e4869cf
      55cb7e11
  12. 08 Apr, 2013 1 commit
  13. 03 Apr, 2013 1 commit
    • Sean McBride's avatar
      Removed VS6 and VS7 workarounds · de8eae2b
      Sean McBride authored
      Assume that if _MSC_VER is defined that it is >= 1310
      (ie VS7.1).
      
      This improves the readability of the code, and slightly
      improved code coverage.
      
      Change-Id: Iffc601f4cff53c4e267835e39b2b17a3adf74494
      de8eae2b
  14. 01 Apr, 2013 3 commits
  15. 26 Mar, 2013 1 commit
    • Joachim Pouderoux's avatar
      Fix GRAM size detection under X Window. · 6ac4b149
      Joachim Pouderoux authored
      The size in kilobytes was saved in an int which was then multiplied by 1024.
      With a board equipped with 2GB, this leads to a overflow and an negative
      mem size saved in the vtkXGPUInfo structure.
      This bug generated issues with some specific usage of
      vtkOpenGLVolumeRayCastMapper for instance.
      
      Change-Id: I54af3bb694e12aaa5b32b70a797920fdada3b309
      6ac4b149
  16. 25 Mar, 2013 1 commit
    • David C. Lonie's avatar
      Restore ability to scale gl2ps linewidth/pointsize. · 6643a930
      David C. Lonie authored
      The functions:
      
      static void vtkGL2PSExporter::SetGlobalLineWidthFactor(float);
      static void vtkGL2PSExporter::SetGlobalPointSizeFactor(float);
      
      were removed during the GL2PS rewrite. This patch restores the
      functionality by adding LineWidthFactor and PointSizeFactor ivars to
      vtkGL2PSExporter and the associated setters:
      
      void vtkGL2PSExporter::SetLineWidthFactor(float)
      void vtkGL2PSExporter::SetPointSizeFactor(float)
      
      These attributes are specific to the vtkGL2PSExporter instances, while
      the old implementation stored them in global variables.
      
      A vtkOpenGLGL2PSHelper is added to RenderingOpenGL that fakes the
      GL2PS function calls needed to update line width, point size, and
      stipple state. The public static methods are called from the rendering
      code when the GL state is changed to inform GL2PS of the change. The
      vtkOpenGLGL2PSHelper class is used to update GL2PS without introducing
      a dependency on vtkgl2ps to vtkRenderingOpenGL.
      
      The TestContextGL2PS unit test is modified to ensure that 1.0 scaling
      factors are used.
      
      The vtkGL2PSContextDevice::StippleOn was not used, and is removed in
      this commit.
      
      Change-Id: Ia367211848f69ffdb093fceeb9baa029435a20d0
      6643a930
  17. 22 Mar, 2013 1 commit
    • Utkarsh Ayachit's avatar
      Fix OpenGL include dependency. · ad146c5d
      Utkarsh Ayachit authored
      This reverts commit 35a3e376.
      
      Instead of adding OPENGL_INCLUDE_DIR to every module that depends on
      vtkRenderingOpenGL, we add OPENGL_INCLUDE_DIR as one of the
      vtkRenderingOpenGL_INCLUDE_DIRS. That way, any module depending on
      vtkRenderingOpenGL will automatically know where to find gl.h since gl.h is
      needed by the header files for classes in vtkRenderingOpenGL.
      
      Change-Id: I6675c2b522e15b3fc6f7a80c28f91c56660b671e
      ad146c5d
  18. 20 Mar, 2013 3 commits
    • Sean McBride's avatar
      Silence warning by toggling an "#if 1" · a232f0fb
      Sean McBride authored
      printOglError() is unused, but likely meant to be used
      when developing/debugging.
      
      Fixes -Wunused-function warning that started after
      the function was recently made static.
      
      Change-Id: I2958a48108bc0225743388e9e82c010e4fa45411
      a232f0fb
    • Kyle Lutz's avatar
      Fix issues in vtkOpenGLPainterDeviceAdapter::SendMaterialProperties() · 69d4df39
      Kyle Lutz authored
      This fixes a few issues in the SendMaterialProperties() method in
      the vtkOpenGLPainterDeviceAdapter class.
      
      1. The enums for the glMaterialfv() calls were wrong when the
         data type was double.
      2. Some use-cases don't need to set the specular power. Now there
         is a check for null specular_power pointer and it will only be
         set if a valid pointer is passed.
      
      Change-Id: Ifa3e9814f87ecaec30ad3d41a9ba706469be23ca
      69d4df39
    • Sean McBride's avatar
      Fixed tonnes of -Wmissing-prototypes warnings · d9313162
      Sean McBride authored
      Just added 'static' in front of many private functions.
      
      Change-Id: I892a46d684e00a44e7f84a7343e2cf5690f07eed
      d9313162
  19. 13 Mar, 2013 2 commits
    • David Gobbi's avatar
      ENH: Add math function for computing log2 on integers. · 14865174
      David Gobbi authored
      Computing log2() is useful for data partitioning algorithms.
      This implementation works over the full 64-bit range.
      
      Change-Id: I83fee61d06d6ce9c1b4afe30aedfe582ffa18ed7
      14865174
    • David Gobbi's avatar
      ENH: Add math function for nearest power of two. · 93f35796
      David Gobbi authored
      There are several places in VTK where the bounding power of two is
      computed.  It is safer to centralize the code.  Use an O(log(N))
      algorithm instead of the O(N) algorithm that was used before.
      
      Change-Id: Idef2522d5a9357863837959975c0592751971010
      93f35796
  20. 12 Mar, 2013 1 commit
    • Sean McBride's avatar
      Added #error for Carbon + OS X 10.7 SDK · caf4fcac
      Sean McBride authored
      Some of the functions used by the Carbon render window
      are so old that they don't even exist in 10.7 SDK.
      Added #error to catch this.
      
      Change-Id: Ib5694a127cd59148f4ed2123d76d63f62ccc9b61
      caf4fcac
  21. 11 Mar, 2013 1 commit
    • Sean McBride's avatar
      Fixed many memory leaks in error branches. · f5588ef8
      Sean McBride authored
      Leaks fixed by adding deallocation in the early exit branch.
      Also removed some unnecessary checks for null before
      using delete.
      
      Found by cppcheck.
      
      Change-Id: I8ec80d676926d9725999034846f52d0efb0c8da4
      f5588ef8
  22. 27 Feb, 2013 2 commits
    • Berk Geveci's avatar
      Added OpenGL includes for tests that directly include OpenGL. · 19611a36
      Berk Geveci authored
      Some tests that used OpenGL classes did not include OpenGL headers.
      This worked by coincidence on systems where gl.h was in system path.
      Didn't work on the Mac.
      
      Change-Id: If13ef3605b239ddf8d345b82d374841e50d30601
      19611a36
    • Sean McBride's avatar
      Fixed invalid cast caught by clang ubsan · d15a1de3
      Sean McBride authored
      'large' values, like 255, were being cast to 'char' which, on many
      platforms, can hold max 127, invoking undefined behaviour.  The buffer
      was already typed 'unsigned char', so I just changed the cast.
      
      Change-Id: I16b6f135f29f1e8adf61bd71b44067bc75cc8ede
      d15a1de3
  23. 23 Feb, 2013 1 commit
    • David Gobbi's avatar
      Replace polygons with triangle strips in vtkImageSliceMapper. · 6f063d9b
      David Gobbi authored
      The 3D image mapper displays the image as a texture on a polygon.
      Rendering the polygon with GL_POLYGON is deprecated in OpenGL 3
      and seemed to cause rendering issues with some drivers.  Switch to
      GL_TRIANGLE_STRIP to see if it fixes these issues.
      
      Change-Id: I5d2e3f23d4ddd26cb359f23871c1c6afe41e8c69
      6f063d9b
  24. 22 Feb, 2013 2 commits
    • Bill Lorensen's avatar
      COMP: Restore TestOffAxisStereo on Mac · fc3db726
      Bill Lorensen authored
      The TestOffAxisStereo test was recently removed from Mac builds
      because of multi-month, recurring failures. In a recent topic,
      http://review.source.kitware.com/#/t/2193/ Aashish fixed issues with
      WindowToImageFilter that prevented some stereo tests from getting
      proper test images. This ended up TestOffAxisStereo which were also
      fixed.
      
      Change-Id: I6916219969520c688acdad3831ec8ecd96c224f7
      fc3db726
    • Aashish Chaudhary's avatar
      Updated offaxis stereo test · 29fc8066
      Aashish Chaudhary authored
      Now drawing sphere behind the projected plane and cone in front
      
      Change-Id: I374a6c618b88b34fd80a66cadcd3da4311081c9b
      29fc8066
  25. 15 Feb, 2013 1 commit
    • Bill Lorensen's avatar
      ENH: Tcl tests should not fail if VTK_DATA_ROOT is missing. · c5ab6fda
      Bill Lorensen authored
      A test should run without VTK_DATA_ROOT unless it needs input data
      from VTK_DATA_ROOT. Tests that have image baselines should still run
      unless they need input data.
      
      rtImage.tcl is modified to skip baseline comparisons if VTK_DATA_ROOT
      is not defined.
      
      CMakeLists.txt files are converted to use add_test_tcl macro for
      consistency.
      
      CMakeLists.txt files are changed to isolate tests that need input
      data.
      
      This was tested as follows:
      1) configured a build with VTK_DATA_ROOT undefine
         ctest -R Tcl-
         154 tests passed
      2) configured a build with VTK_DATA_ROOT defined
         ctest -R Tcl-
         390 tests passed
      
      This means that 390-154 = 236 tcl tests require input data
      
      Change-Id: I9067a3e3e2a710ddf353f0181cc7b22a85b5ef10
      c5ab6fda
  26. 13 Feb, 2013 3 commits
  27. 12 Feb, 2013 2 commits