1. 01 Aug, 2013 1 commit
    • Sean McBride's avatar
      Conservative elimination of !null checks before 'delete' · 8812203b
      Sean McBride authored
      C++ guarantees that delete 0 and delete [] 0 do nothing.
      Older buggy compilers that didn't honour this are no longer
      supported by VTK.  Conservatively removed many "if (!ptr)"
      checks before using delete in /Common.
      
      Change-Id: I451f353ba57487432904487d61107cf7bb818b8e
      8812203b
  2. 25 Jul, 2013 1 commit
    • Utkarsh Ayachit's avatar
      Cleanup logic for indexed colors. · 16543376
      Utkarsh Ayachit authored
      vtkDiscretizableColorTransferFunction used control points to map indexed colors.
      To make applications simpler, added a new API to add indexed colors which are
      used when present when in IndexedLookup mode. If no IndexedColors are specified,
      the vtkDiscretizableColorTransferFunction reverts to the previous behaviour for
      backwards compatibility.
      
      Change-Id: If5b6791baccf2ee0022fd1b1098093d226ef64c3
      16543376
  3. 24 Jul, 2013 1 commit
    • Burlen Loring's avatar
      Make "graphic error" api legacy · c544585c
      Burlen Loring authored
      Decorated vtkRenderWindow "graphic error" methods with legacy.
      These were superceded by vtkOpenGL{Check/Clear}ErrorMacro's.
      
      Change-Id: I2b3fbbbb1125b7611d4553e6ea1640b3f74121f6
      c544585c
  4. 08 Jul, 2013 1 commit
    • Burlen Loring's avatar
      OpenGL error hunt · a6fa3e37
      Burlen Loring authored
      This patch implements OpenGL error checking in VTK.
      
      OpenGL's error handling implementation error is designed such
      that internal error flags remain set with the first error that
      occurred until they are explicitly checked. With this design
      it's important to check and clear the error flags regularly
      else they become unusable as code checking for errors ends
      up reporting earlier undetected unrelated errors.
      
      This patch takes the following approach:
      
      1) at public entry points into code that uses OpenGL clear the
      error flags without reporting errors. This guards against
      reportinig unrealted errors, such as those caused by code
      outside of VTK. See vtkOpenGLClearErrorMacro
      
      2) before returning from functions that made OpenGL calls check
      for and report OpenGL errors. This detects Open GL errors in the
      function/method where they occurred facilitating debugging and it
      clears error flags so that user code doesn't detect errors caused
      by VTK. See vtkOpenGLCheckErrorMacro
      
      This patch cleans up a number of bugs that were detected by
      the new error checking and reporting.
      
      This patch also contains improvements for OpenGL pixel buffers, a
      renderbuffer object, and fast paths through framebuffer objects,
      and texture objects, and fast path for setting uniform variables,
      all of which are needed in vtkSurfaceLICPainter and
      vtkLineIntegralConvolution2D GPGPU code.
      
      Change-Id: I4ecefe9a444a74128bf73ef2ddfd5d4acea387ec
      a6fa3e37
  5. 28 Jun, 2013 3 commits
  6. 07 Jun, 2013 1 commit
  7. 04 Jun, 2013 1 commit
    • Brad King's avatar
      Convert VTKData test inputs to ExternalData content links · 3797f83d
      Brad King authored
      Add to the Testing/Data directory ExternalData content links mirroring
      the content and layout we use from the VTKData/Data directory.
      
      Add a CMake/vtkLegacyData.cmake module, included from CMakeLists.txt and
      Testing/External/CMakeLists.txt, to call ExternalData_Expand_Arguments
      for all data directories added from VTKData/Data.  This will bulk-fetch
      all test input data currently used by tests of any module, enabled or
      not.  We can make the DATA{} references more granular later.
      
      Add a VTK_TEST_DATA_DIR variable to refer to the directory we tell the
      ExternalData module to populate the real data files.  Replace references
      to VTK_DATA_ROOT in test command lines (after -D) with references to
      VTK_TEST_DATA_DIR.  Drop the VTK_DATA_ROOT CMake option and stop using
      the VTKData repository.
      
      Remove the TESTING_DATA option from the vtk_add_test_cxx API and remove
      the VTK_DATA_ROOT option from the vtk_add_test_mpi API since all test
      input data are now handled through ExternalData and Testing/Data content
      links.
      
      Change-Id: Id02490b76ea2e161b9038188264a4830485039d8
      3797f83d
  8. 31 May, 2013 1 commit
  9. 23 May, 2013 1 commit
    • Brad King's avatar
      Remove references to old VTKData/Baseline directories · fc5d874c
      Brad King authored
      The VTKData repository no longer holds Baseline directories so drop
      references to such directories from the VTK source tree:
      
      * Replace the default -V in CMake/vtkTestingRenderingDriver.cmake with a
        value that will fail but indicate what to do.  All current uses of
        this module have an explicit -V so the default should never be used.
      
      * Drop a few leftover Baseline directory references from comments in
        "*/*/Testing/*/CMakeLists.txt".
      
      * Remove boilerplate duplicate test command-line examples (that
        reference Baseline directories) from *.py tests and leave an updated
        example in "Wrapping/Python/README.txt".  The command-line example
        convention was added long before the modern CTest infrastructure
        and is no longer needed anyway.
      
      Change-Id: I3001e99b3cc8c2717107e61b3b7f988caeb49cab
      fc5d874c
  10. 20 May, 2013 1 commit
    • Andrew Maclean's avatar
      Make some color methods consistent. · 293e5386
      Andrew Maclean authored
      In order to use functions like SetTableValue(2, "Blue") in a lookup table
        or other SetColors in derived classes in the same manner,
        these methods should be virtual.
      This commit just makes the relevant Set methods virtual.
      In the case of vtkProperty, the definition of SetColor(double a[3]) has
        been moved into vtkProperty.cxx, the rationale is that, in VTK classes,
        definitions occur in the implementation file not the header file.
      
      Change-Id: I89fee8eb4902e0847114b068374c3bff0bf10b9d
      293e5386
  11. 17 May, 2013 2 commits
  12. 16 May, 2013 1 commit
    • Andrew Maclean's avatar
      Make some color methods consistent. · 55475274
      Andrew Maclean authored
      
      
      In order to use functions like SetTableValue(2, "Blue") in a lookup table
        or other SetColors in derived classes in the same manner,
        these methods should be virtual.
      This commit just makes the relevant Set methods virtual.
      In the case of vtkProperty, the definition of SetColor(double a[3]) has
        been moved into vtkProperty.cxx, the rationale is that, in VTK classes,
        definitions occur in the implementation file not the header file.
      
      Change-Id: I6ad8d0019785faed1f7cb157192fdcc2f2d70c34
      Signed-off-by: Andrew Maclean's avatarAndrew Maclean <andrew.amaclean@gmail.com>
      55475274
  13. 14 May, 2013 3 commits
  14. 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
  15. 02 May, 2013 1 commit
    • Kyle Lutz's avatar
      Refactoring code to set color/opacity/visibility for blocks. · 52fd8ad8
      Kyle Lutz authored
      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
  16. 28 Apr, 2013 1 commit
    • Andrew Maclean's avatar
      These Python tests have been refactored. · 3810c5a6
      Andrew Maclean authored
      
      
      This has been done by removing the "tcl-isms" and making
       the code more readable. In some cases redundant code
       has been removed (often a result of copy/paste operations).
       The code has also been checked to ensure each line is 80
       characters or less.
      
      The code can now be run using vtkpython or by using the
       appropriate Python environment.
      
      Originally these were TCL scripts that were converted using
        vtkTclTestToPy.py and they they needed to be run through the
        rtImageTest.py driver which defines a few needed
        functions/variables for their operation. To this end
        backdrop.py has been added where it is needed.
      
      Change-Id: I50d6505628c140ea4551f74f7f3e85df907567e1
      Signed-off-by: Andrew Maclean's avatarAndrew Maclean <andrew.amaclean@gmail.com>
      3810c5a6
  17. 24 Apr, 2013 2 commits
  18. 18 Apr, 2013 1 commit
    • David C. Lonie's avatar
      Remove the MathTextActor classes. · d978780f
      David C. Lonie authored
      * Converted tests to use regular TextActors.
      * Fixed the MathText path generator to rotate paths if needed.
      * Update the GL2PS text export code to check for mathtext
        strings, since mathtext/freetype are both handled by the same
        actor.
      * Made vtkTextRenderer::DetectBackend public so we can peek at
        the backend from the export code.
      
      Change-Id: I52ba3c1e916c70dd80b67d59b611db1becb0846c
      d978780f
  19. 14 Apr, 2013 1 commit
    • Berk Geveci's avatar
      Revert "Prevent division by 0 by bailing early" · feaf55f2
      Berk Geveci authored
      This reverts commit 5bb0f14f. For some reason, this
      commit causes some dashboard failures on Mac OS X 10.8:
      crash when setting the cursor. It is not clear why but
      we are temporarily reverting this commit to verify that
      this fixes the problem.
      
      Change-Id: I027af718fa0e441aa6d688a29978dcd2d9576710
      feaf55f2
  20. 10 Apr, 2013 1 commit
    • Kyle Lutz's avatar
      Use RenderMaterial() instead of SendMaterialProperties() · e3f5e52d
      Kyle Lutz authored
      This changes the vtkCompositePainter class to use RenderMaterial()
      instead of SendMaterialProperties() for setting the solid color on
      individual blocks. The SendMaterialProperties() call did not correctly
      scale the material properties.
      
      Change-Id: Ia17ccbd75e677770e3ebf2cdb30bda224c62f3dd
      e3f5e52d
  21. 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
  22. 08 Apr, 2013 1 commit
  23. 05 Apr, 2013 1 commit
  24. 03 Apr, 2013 2 commits
    • Berk Geveci's avatar
      Fixed ReleaseData functionality in algorithms. · 6c965828
      Berk Geveci authored
      It turns out that ReleaseData has been broken for a while, in
      that it didn't release data. No test looked at this so nothing
      failed. Fixed. I also added a test. As Bill Lorensen always
      says "if it is not tested, it is broken"
      
      Change-Id: Iae817886d5dca88752df6c6f5496bb229b6ea43f
      6c965828
    • Berk Geveci's avatar
      Fixed warning about unused variable. · 95ef69b4
      Berk Geveci authored
      Change-Id: I15a57ff4bbffe689cd7e7c7fa9e1033f1cd638fd
      95ef69b4
  25. 01 Apr, 2013 5 commits
  26. 22 Mar, 2013 1 commit
    • Sean McBride's avatar
      Prevent division by 0 by bailing early · 5bb0f14f
      Sean McBride authored
      If size[0] or size[1] are <= 0, bail early in the same
      way as is currently done if size is NULL.
      
      Fixes undefined behavior reported by clang's
      -fsanitize=float-cast-overflow where the resulting
      NaN is later converted to float (a UB).
      
      Thanks to Dave Cole for the suggested fix.
      
      Change-Id: Iae41eb91701e79f56bb1adb3d9fc7631260e203a
      5bb0f14f
  27. 20 Mar, 2013 1 commit
  28. 15 Mar, 2013 2 commits
    • Sean McBride's avatar
      Big find-replace of VTK_LARGE_FLOAT -> VTK_FLOAT_MAX · 04d04637
      Sean McBride authored
      vtkType.h says that VTK_LARGE_FLOAT is a
      'compatibility name'.  There were many uses of the
      old name, which I updated.  The find-replace should
      be quite safe as it's basically what the preprocessor
      does anyway.
      
      Change-Id: I66ecb51cd2f21ee3cdf9289d8a65d39fc4519a83
      04d04637
    • Sean McBride's avatar
      Big find-replace of VTK_LARGE_INTEGER -> VTK_INT_MAX · 1ff4b0ee
      Sean McBride authored
      vtkType.h says that VTK_LARGE_INTEGER is a
      'compatibility name'.  There were many uses of the
      old name, which I updated.  The find-replace should
      be quite safe as it's basically what the preprocessor
      does anyway.
      
      Change-Id: Ic82bfec6d706dbcd68af70f2d4a31cdd51f7b497
      1ff4b0ee