1. 14 May, 2013 1 commit
    • Brad King's avatar
      Use vtk_add_test_cxx function · 5b018861
      Brad King authored
      Refactor */*/Testing/Cxx/CMakeLists.txt to use the vtk_add_test_cxx
      function instead of direct add_test calls.
      
      Change-Id: I73dee627fa87a399c48b409af046b116fc75a0fd
      5b018861
  2. 23 Apr, 2013 1 commit
    • David Gobbi's avatar
      Clamp integer scalars in InterpolateTuple(). · 8c73f97f
      David Gobbi authored
      The InterpolateTuple() function was seeing an integer overflow
      when used from vtkButterflySubdivisionFilter, and probably had
      undetected overflow issues elsewhere.  Adding a clamp to the
      interpolation code for integer types protects against overflow.
      
      Change-Id: Ibd6ab7f79d514dbb9ea2d055cc299273b7490f7b
      8c73f97f
  3. 13 Apr, 2013 1 commit
    • Sean McBride's avatar
      ENH: Improve finding of isnan and friends. · 17c5a4e8
      Sean McBride authored
      These functions can be defined in various ways:
      1) in C++11 as std::isinf(), std::isnan(), std::isfinite() in <cmath>
      2) in C99 as isinf(), isnan(), isfinite() in <math.h>
      3) in pre-C99 extensions as isinf(), isnan(), finite() in <math.h>
      4) on Windows as _isinf(), _finite() in <float.h>
      
      Change-Id: I5817f43eb167c26bdfe6521ce5376262ba71b600
      17c5a4e8
  4. 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
  5. 08 Apr, 2013 1 commit
  6. 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
  7. 01 Apr, 2013 2 commits
    • Sean McBride's avatar
      Removed superfluous semi-colon · 62a6872b
      Sean McBride authored
      Fixes -Wextra-semi warning that was repeated often since
      this is a public header.
      
      Change-Id: I5f21d0e15a1fcac655a019057ced8f03399c17ef
      62a6872b
    • Sean McBride's avatar
      Fixed 64-to-32 truncation warning · 38777cfb
      Sean McBride authored
      Implicit cast was truncating long to int; just use long.
      Also change from float to double to reduce chance of overflow.
      
      Change-Id: I8f15e29f52e14ab746996f319e35ff1cadda2102
      38777cfb
  8. 31 Mar, 2013 3 commits
    • Sean McBride's avatar
      Replaced all "VTK_LARGE_ID" with "VTK_ID_MAX" · 9c5c2a16
      Sean McBride authored
      The constant "VTK_LARGE_ID" was deprecated
      and replaced with "VTK_ID_MAX" (for consistency
      in naming).
      
      Change-Id: Id3b9d0155b451f95e2d6242fe463fde793126aa0
      9c5c2a16
    • Sean McBride's avatar
      Replaced "-VTK_LARGE_ID-1" with "VTK_ID_MIN" · 35c44ca1
      Sean McBride authored
      Replaced all usages of "-VTK_LARGE_ID-1" with
      the new "VTK_ID_MIN" constant.
      
      More readable.
      
      Change-Id: I759214821076ebbf53cd749a78dd7baf7e717ac0
      35c44ca1
    • Sean McBride's avatar
      Added VTK_ID_MIN and VTK_ID_MAX constants · a69493b5
      Sean McBride authored
      Added VTK_ID_MIN constant, which did not exist before.
      (Nothing uses it yet).
      
      Added VTK_ID_MAX constant, which replaces VTK_LARGE_ID, which is
      now only #defined if VTK_LEGACY_REMOVE is not.
      
      These MIN/MAX names are more consistent with
      existing constants like VTK_INT_MIN / VTK_INT_MAX.
      
      Change-Id: Idafed9ce29df2e43d3318a6ad0c5d5246944f062
      a69493b5
  9. 30 Mar, 2013 1 commit
    • David Gobbi's avatar
      Remove the vtkSetNGetMacro from vtkSetGet.h · f2d1b35b
      David Gobbi authored
      The original purpose of vtkSetNGetMacro was to make a "set/get" macro
      that could be used with classes that were not derived from vtkObjectBase
      (and that therefore could use vtkSetMacro and vtkGetMacro).  However,
      some developers were assuming that it was simply a shorthand that
      combined the vtkSetMacro and vtkGetMacro, but it does not call Modified
      as is required when setting properties of a vtkObjectBase-derived object.
      
      This macro was added after VTK 5.10 was released, so there should be no
      backward compatility problems with its removal.
      
      Change-Id: I5fe74fc52814ac6b7f6bc67f79d2880e2fd1d16a
      f2d1b35b
  10. 26 Mar, 2013 1 commit
  11. 22 Mar, 2013 2 commits
    • Marcus D. Hanwell's avatar
      Fixed Tcl wrapping, and some special classes · 9c9c3ebd
      Marcus D. Hanwell authored
      Added some code to handle .txx files more elegantly, so that they can be
      listed as source files and the corresponding header file found. Moving
      away from WRAP_HEADER and using WRAP_SPECIAL (which largely means wrap
      in Python at this point in time when used in conjunction with
      WRAP_EXCLUDE).
      
      Change-Id: I51447090d1b351d03474a5d4972eab7a0d3f9f78
      9c9c3ebd
    • Marcus D. Hanwell's avatar
      Move the Python wrapping to the end · 34903fe1
      Marcus D. Hanwell authored
      This moves the Python wrapping to the end of the build process, using
      the information exported by the module files.
      
      Change-Id: I711382f79fc1fdb15cd80c87f55dd2f97a2c5cd8
      34903fe1
  12. 16 Mar, 2013 1 commit
    • Sean McBride's avatar
      Removed workarounds for old gcc's · 214c83d3
      Sean McBride authored
      Removed gcc 2 workaround, as there are no other comparisons
      of __GNUC__ against the number 2 (except KWSys and 3rd party).
      Removed broken VTK_CXX_GCC_3 since __GNUC__ can't be equal to
      and less than 3 at the same time.
      
      Change-Id: Iefdbb1a417fac120ce74ed91d030e4f7dbcdfd0f
      214c83d3
  13. 15 Mar, 2013 3 commits
    • Sean McBride's avatar
      Put VTK_LARGE_INTEGER and VTK_LARGE_FLOAT in VTK_LEGACY_REMOVE. · 435d5b1f
      Sean McBride authored
      vtkType.h says that VTK_LARGE_INTEGER and VTK_LARGE_FLOAT are
      'compatibility names'.  All uses of these names were updated
      in previous commits to use the new names, so now wrap them in
      VTK_LEGACY_REMOVE.
      
      Change-Id: Ibbf7e9841003432d1fda9b6fd5417182bc387a5c
      435d5b1f
    • 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
  14. 14 Mar, 2013 1 commit
  15. 13 Mar, 2013 4 commits
  16. 12 Mar, 2013 4 commits
  17. 11 Mar, 2013 1 commit
  18. 08 Mar, 2013 1 commit
    • Sean McBride's avatar
      Eliminated (undefined) negation of INT_MIN · 38f76b82
      Sean McBride authored
      clang ubsan warned running vtkRenderingAnnotationCxx-TestCubeAxes2DMode:
      
      Rendering/Annotation/vtkCubeAxesActor.cxx:1315:30: runtime error: negation of -2147483648 cannot be represented in type 'int'
      
      This happens when 'range' is exactly 0.0, and so log10() gives -infinity,
      which when cast to int (apparently) becomes INT_MIN which cannot
      be negated due to the asymmetry of two's compliment representation.
      
      Now, check log10() result with newly-created vtkMath::IsFinite API.
      If the result is not finite, return 0 from vtkCubeAxesActor::Digits(),
      which I'm not sure is the correct thing to return.
      
      Change-Id: I36fc832df98ccb96c1fdc951c42e7e2c6de9d4b4
      38f76b82
  19. 06 Mar, 2013 2 commits
    • Kyle Lutz's avatar
      Fix thread-safety issue in vtkInformationVector · e4a793c4
      Kyle Lutz authored
      This changes the SetNumberOfInformationObjects() method in the
      vtkInformationVector class to only set the number of information
      objects if it is different from the current number of objects.
      
      This fixes an issue in which multiple threads calling the
      vtkExecutive::GetOutputInfomation() method would result in
      SetNumberOfInformationObjects() being called simultaneously.
      
      Change-Id: Ib39818d163ffa514308c72489cfaa2dcac9cd7fa
      e4a793c4
    • Kyle Lutz's avatar
      Remove invalid return from void method in vtkIdList · 69509fe0
      Kyle Lutz authored
      This removes an invalid return statement from the void
      IntersectWith() method in the vtkIdList class.
      
      This fixes a compilation error on Win32.
      
      Change-Id: I58a11f4b4469603f56aecad91131f620192e6cdb
      69509fe0
  20. 03 Mar, 2013 1 commit
  21. 26 Feb, 2013 1 commit
  22. 25 Feb, 2013 2 commits
    • Marcus D. Hanwell's avatar
      Moved the vtk*NewMacros to vtkObjectFactory.h · b4d6e076
      Marcus D. Hanwell authored
      This ensures that vtkObjectFactory.h is included in the relevant
      implementations (to support building all vtkObject derived classes with
      the object factory mechanism), and moves these macros to a more
      appropriate location.
      
      Change-Id: I412379a29a9d55d8c12378fe0c28d2da09d154c4
      b4d6e076
    • Sean McBride's avatar
      Removed obsolete checks for compiler 'bool' support · 6bc6866a
      Sean McBride authored
      As VTK 6 has dropped support for antique compilers, surely we can assume 'bool' exists in 2013.
      Removed VTK_COMPILER_HAS_BOOL checks.  Kept vtkstd_bool with VTK_LEGACY_REMOVE.
      
      Change-Id: I5ae1143eb78470307cf2a5ba5ff8fa77403d4b4d
      6bc6866a
  23. 24 Feb, 2013 1 commit
    • Marcus D. Hanwell's avatar
      Add some warnings when abtract classes are returned · 41f0bd00
      Marcus D. Hanwell authored
      Added an error message when NULL is returned by the New() method, making
      it easier to debug problems with missing overrides. Also added a warning
      when vtkInteractorStyleSwitchBase is returned as this can be difficult
      to track down when porting old code.
      
      Change-Id: I0ac5ad848a8e30d004640867cee2a40d0209eac4
      41f0bd00
  24. 21 Feb, 2013 3 commits
    • Bill Lorensen's avatar
      COMP: Change to tclsh does not work on windows · 13ab3b0e
      Bill Lorensen authored
      The change to use tclsh rather than the vtk executable does not work
      on windows.
      
      This patch reverts that change.
      
      Change-Id: I048e8c62a547a2a04a2923df084016b451c636d3
      13ab3b0e
    • Bill Lorensen's avatar
      ENH: Use TCL_TCLSH versus VTK_TCL_EXE · 9b78526a
      Bill Lorensen authored
      For tcl tests that do no graphics there is no need to use
      VTK_TCL_EXE. TCL_TCLSH works as long as the auto_path is set
      corrrectly. This may help solve some timeouts on a few MAC builds.
      
      Change-Id: I209e569af190dd90d78615fec92fb227149dbbc1
      9b78526a
    • Bill Lorensen's avatar
      ENH: Reduce the output of TestSetGet.tcl · d09b4fa7
      Bill Lorensen authored
      TestSetGet.tcl produces over 6 meg of output. This patch reduces that
      to 50k. This should speed up the test and may stop timeouts on some
      Mac systems.
      
      Change-Id: I102f85bb8bcd4985e1d7ee2c66361da4ddaeb242
      d09b4fa7