1. 14 Dec, 2017 1 commit
  2. 29 Nov, 2017 1 commit
  3. 31 Oct, 2017 1 commit
    • Sean McBride's avatar
      General review and cleanup of vtkLookupTable and friends · 63366102
      Sean McBride authored
      - made vtkScalarsToColors::SetRange(double[2]) virtual, since the other SetRange() is.  Likewise vtkLookupTable::SetTableRange(double[2]).
      - changed most uses of dangerous GetTableValue() (that returns inner buffer) in favour of version that copies the values out.
      - use fixed-size memcpy in a few places for a potential speedup
      - improved some comments
      - added a few consts, especially with buffers
      - removed const on plain old ints
      - moved a nan check earlier, saving work when true
      - moved some variable declarations closer to initialization
      - removed some unneeded semi colons
      - removed some useless casts, added others for clarity
  4. 05 Oct, 2017 1 commit
    • Sean McBride's avatar
      Improved performance of vtkLookupTable a bit · 30acb904
      Sean McBride authored
      Did a few things to speed things up:
      - eliminated some double<->integer conversions.
      - repeated the last colour in the lut as a 4th "special" colour, eliminating need for a test in very hot function. Improved shift & scale calculations against pathological cases.
      - use memcpy() (with fixed size) instead of manual copying byte by byte. Modern compilers optimize this well, as verified with godbolt.
      Did some other cleanup while investigating my performance issues: added more const safety, fixed comments, etc.
  5. 04 Oct, 2017 1 commit
  6. 02 Oct, 2017 1 commit
  7. 29 Mar, 2017 1 commit
    • David Gobbi's avatar
      Add timestamp check for vtkLookupTable BuildSpecialColors · ee085a8a
      David Gobbi authored
      This will re-build the BelowRange, AboveRange, and Nan color entries
      in the lookup table if they are out of date.  Without this change, if
      a user calls SetBelowRangeColor() etc. after the table has been set or
      built, then the table will remain unchanged.
  8. 30 Nov, 2016 1 commit
  9. 23 Sep, 2016 3 commits
    • Kitware Robot's avatar
      Reindent using the reindentation script. · f830ff47
      Kitware Robot authored
      This commit reindents the code with the following utility:
      This utility changes the positions of the braces so that they are no
      longer indented relative to the code block they reside in.
      The bash command line used was the following:
      for d in Charts Common Deprecated Domains Examples Filters GUISupport \
               Geovis IO Imaging Infovis Interaction Parallel Rendering \
               Testing Views Web Wrapping; do
        for e in cxx cxx.in txx txx.in hxx hxx.in h h.in c c.in; do
          find "${d}" -name "*.${e}" -exec \
            python Utilities/Maintenance/vtk_reindent_code.py {} +
    • David DeMarle's avatar
      replace VTK's nonstandard Doxygen with standard markup · 6a7e5148
      David DeMarle authored
      generated via:
      cd $VTKSRC
      perl Utilities/Doxygen/doc_header2doxygen.pl --to ~/tmp/vtkheaders .
      cp -r ~/tmp/vtkheaders/* .
    • Robert Maynard's avatar
  10. 24 Aug, 2016 1 commit
  11. 19 Aug, 2016 1 commit
  12. 07 Jul, 2016 2 commits
    • Sean McBride's avatar
      Applied VTK_DELETE_FUNCTION to many constructors · 1853e030
      Sean McBride authored
      vtk(.*)\(const vtk\1&\);\s*//\s*Not implemented[\.]*
      vtk\1(const vtk\1\&) VTK_DELETE_FUNCTION;
      vtk(.*)\(const vtk\1 &\);\s*//\s*Not implemented[\.]*
      vtk\1(const vtk\1 \&) VTK_DELETE_FUNCTION;
      vtk(.*)\( const vtk\1 & \);\s*//\s*Not implemented[\.]*
      vtk\1( const vtk\1 \& ) VTK_DELETE_FUNCTION;
      vtk(.*)\( const vtk\1& \);\s*//\s*Not implemented[\.]*
      vtk\1( const vtk\1\& ) VTK_DELETE_FUNCTION;
      vtk(.*) \(const vtk\1&\);\s*//\s*Not implemented[\.]*
      vtk\1 (const vtk\1\&) VTK_DELETE_FUNCTION;
    • Sean McBride's avatar
      Applied VTK_DELETE_FUNCTION for operator= · 2d0e11ef
      Sean McBride authored
      After that, this finds basically nothing:
      then manually reverted changed files in VPIC and KWSys folders.
  13. 25 May, 2016 1 commit
    • Kitware Robot's avatar
      Remove all BTX and ETX markers from VTK headers · 4d127b1d
      Kitware Robot authored
      Perl was used to remove all the BTX and ETX markers from the code.
      The specific command that was run on all "vtk*.h" files was this:
          perl -0777 -i -pe 's/(\n* *\/\/ *[BE]TX *\n+)+/\n\n/g'
      This regex replaces each BTX/ETX line, plus any leading or trailing
      blank lines, with a single blank line.
  14. 08 Mar, 2016 1 commit
  15. 18 Jan, 2016 1 commit
    • Cory Quammen's avatar
      Added warning about when BuildSpecialColors() must be called · 3e330cdf
      Cory Quammen authored
      Table values may be set by accessing the WritePointer() directly.
      When this pointer is accessed, there is no mechanism to update
      the special values in the table automatically before the lookup
      table is used. vtkLookupTable::BuildSpecialColors() must be
      invoked explicitly in this case.
  16. 15 Jan, 2016 1 commit
    • Cory Quammen's avatar
      BUG 15903: Fix race condition in setting special colors in table · e3a8a1ec
      Cory Quammen authored
      In vtkLookupTableMapData(), the special colors were set in the lookup
      table prior to doing the mapping. This can lead to a race condition if
      multiple threads call this function at the same time. Normally, this
      shouldn't be a problem, because if the vtkLookupTable used to fill in
      the table values is the same, each thread will write the same values
      to each entry in the table. Some verification tools, however, will
      note that more than one thread is writing to the same memory location
      at a time.
      Avoid this by setting the special colors when the lookup table is built
      or when custom table values are set.
  17. 10 Jul, 2015 1 commit
  18. 26 Mar, 2015 1 commit
    • Cory Quammen's avatar
      BUG 15365: Fixed crash in function called from multiple threads · dac748ae
      Cory Quammen authored
      vtkLookupTableMapData() was not thread safe and could lead to
      crashes when accessed from multiple threads. Added a mutex around
      the logic to determine if the color table size needed to be
      Added a multi-threaded test that crashes on occasion prior
      to this patch, but does not crash with this patch applied.
  19. 18 Dec, 2014 1 commit
  20. 18 Sep, 2014 1 commit
    • Cory Quammen's avatar
      6657: Add out-of-range colors to color maps · 238163f9
      Cory Quammen authored
      This change adds special colors to color maps that can optionally be
      used for scalar values outside the range of the color map. It touches
      a number of classes in VTK.
      - Added AboveRangeColor for values above the lookup table range.
      - Added UseAboveRangeColor option to control whether the
        AboveRangeColor or the color that maps to the highest value is used
        for values above the range.
      - Added BelowRangeColor for values below the lookup table range.
      - Added UseBelowRangeColor option to control whether the
        BelowRangeColor or the color that maps to the lowest value is used
        for values below the range.
      - Made GetColorAsUnsignedChars() a static member so that other classes
        can use it.
      - Modified test to include testing of {Above|Below}RangeColors
      - Test of out-of-range color functionality in
      - Test of out-of-range color functionality in
      - Made RGBABytes member protected so subclasses can use it.
      - Added {Above|Below}RangeColor and Use{Above|Below}RangeColor member
        variables that function the same as the members with the same name
        in vtkLookupTable. These colors are specified as RGB colors instead
        of RGBA colors, as they are in vtkLookupTable. For better or worse,
        this is for consistency with how NanColor is specified in each of
        these classes.
      - Above and BelowRangeColor are used only if the Clamping option is
      - Forwards {Above|Below}RangeColor and Use{Above|Below}RangeColor to
        the internal vtkLookupTable in the Build() method.
      - Fixed a bug that caused the internal vtkLookupTable to allocate
        3 times the amount of colors needed to hold the table.
      - Added two colors for {Above|Below}RangeColors in the lookup table
        texture map. The color map class fills in these colors appropriately
        based on the {Above|Below}RangeColors settings.
      - Fixed the texture coordinate calculation to accommodate out-of-range
      Performance-wise, this change increases the time to map an array with
      10 million scalars to colors by 5.5% using
      Change-Id: Ia3535fae175e991c0d1a4cf70752845193b4166d
  21. 10 Sep, 2014 1 commit
  22. 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
  23. 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>
  24. 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
      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
  25. 31 Mar, 2013 1 commit
  26. 20 Aug, 2012 4 commits
    • David Thompson's avatar
      Move most annotation stuff to `vtkScalarsToColors`. · de162c7b
      David Thompson authored
      ... which is where it belongs. The only parts remaining
      in `vtkLookupTable` are the changes to `MapValue` and
      `MapScalarsThroughTable2` which are table-specific.
      Change-Id: I47da9d3fb7478d37a560f7019f917952103df9e2
    • David Thompson's avatar
      Make annotation API more consistent. · dd7fe488
      David Thompson authored
      + Make `GetIndex()` work consistently whether `IndexedLookup`
        is true or false.
      + Make `GetIndex()` and `MapValue()` properly handle NaN values
        when `IndexedLookup` is false.
      + Return a `vtkIdType` for the number of annotated values.
        (The previous `vtkVariant` was a cut-and-paste error.)
      Change-Id: I4586ab117200cca73b021ce0d01782a7da958b45
    • David Thompson's avatar
      Color mapping using only annotated values. · ee78433e
      David Thompson authored
      This patch implements an "indexed" color mode for `vtkLookupTable`.
      When `IndexedLookup` is true, the scalar range and log/linear settings are disabled;
      `MapScalars` and `MapValue` require an exact match to an annotated value
      in order to return a valid color.
      All other values are mapped to `NanColor`.
      Change-Id: I9805ab6b4398db479c0ae6b0d239886850c2e187
    • David Thompson's avatar
      Add categorical data to vtkLookupTable. · 649a62b1
      David Thompson authored
      Change-Id: I123e0eb3833a8c5dd5d1c399e70ecffe8ba7ec5c
  27. 09 Apr, 2012 3 commits
    • VTK Developers's avatar
      Remove trailing whitespace from all source files · 2d323fc4
      VTK Developers authored
      Exclude ThirdParty, Utilities/MetaIO, and Utilities/KWSys as these
      are maintained outside VTK.
      Co-Author: Marcus D. Hanwell <marcus.hanwell@kitware.com>
      Co-Author: Chris Harris <chris.harris@kitware.com>
      Co-Author: Brad King <brad.king@kitware.com>
    • VTK Developers's avatar
      Include module-wide headers and export macros · 144f03ca
      VTK Developers authored
      Include the module-wide header from every header in each module.
      Reference the export/visibility macro for the module.
      Co-Author: Marcus D. Hanwell <marcus.hanwell@kitware.com>
      Co-Author: Chris Harris <chris.harris@kitware.com>
    • VTK Developers's avatar
      Modularize VTK tree layout · cdd4d6fd
      VTK Developers authored
      Move source files from their former monolithic VTK location to their new
      location in modular VTK without modification.  This preserves enough
      information for "git blame -M" and "git log --follow" to connect
      modularized VTK files to their original location and history.
      Co-Author: Marcus D. Hanwell <marcus.hanwell@kitware.com>
      Co-Author: Chris Harris <chris.harris@kitware.com>
      Co-Author: Brad King <brad.king@kitware.com>
      Co-Author: Nikhil Shetty <nikhil.shetty@kitware.com>
  28. 21 Apr, 2011 1 commit
    • David Gobbi's avatar
      ENH: Make vtkScalarsToColors into a concrete class. · 39343497
      David Gobbi authored
      This patch enhances vtkScalarsToColors so that it can be used as a
      simple way to do scalar range mapping.  It is meant to be used
      when you have RGB scalars and want to map them to "unsigned char"
      RGB or RGBA colors, or if you have single-component scalars and
      simply want to map them to greyscale.
      Basically, it maps scalars directly to colors without the use of a
      CTF or a lookup table, all it does is rescale the values.  It also
      does the job faster than vtkLookupTable and vtkColorTransferFunction.
      Change-Id: I24fa8a1545a969c2ee5202bd8eca76b52842fbf4
  29. 08 Mar, 2011 1 commit
  30. 22 Feb, 2011 1 commit
  31. 21 Oct, 2010 1 commit
    • Andy Bauer's avatar
      Changing the amount of colors shown for lookup tables. · 46e01f50
      Andy Bauer authored
      There was a number of colors limit (256 in v3.8, and currently 1024)
      set in vtkScalarsToColorsPainter which is now changed to be
      limited by the nubmer of opengl texture colors.  The changes to the
      other files are for specifying the amount of available colors
      in those lookup tables.
      Change-Id: Ic0d7f4fa660380627804ad0e891fceab3af773b1
  32. 20 Aug, 2010 1 commit