1. 10 Mar, 2015 1 commit
    • Ken Martin's avatar
      Add in support for below and above range LUTs · 5d7ab890
      Ken Martin authored
      Copy changes Cory made to support below and above range
      colors in lookup tables into the general Mapper routines.
      The new OpenGL backend uses the code in Mapper as opposed
      to the code in ScalarsToColorsPainter.  This fixed failing
      tests in paraview.
      
      Also a minor compiler warning fix.
      
      Change-Id: Icff4a9804eb051ecccae2590dabe20da162c1747
      5d7ab890
  2. 09 Feb, 2015 2 commits
    • Ken Martin's avatar
      Update to a cleaner way of solving the issue · 3943313e
      Ken Martin authored
      And fix what woudl have been a problem with multiple pieces
      sharing the same color coordinates.
      
      Change-Id: I8cf207aefbe2b7ad3e2c58031394eab46ebd7bb0
      3943313e
    • Ken Martin's avatar
      Fix an issue with mapper requiring a polydata input · f77c1ff9
      Ken Martin authored
      Added in a signature where you can pass in the input. For
      composite mappers GetInput can fail as it looks for polydata.
      
      Left in the old signature even though nothing in VTK calls it
      just to be safe.
      
      Change-Id: I0b1c2d29bca2877adb2d1be87acced77d851192d
      f77c1ff9
  3. 29 Jan, 2015 1 commit
    • Ken Martin's avatar
      Add a subclass for faster composite dataset mapping · 1862e2d0
      Ken Martin authored
      This class is a faster implementation of vtkCompositePolyDataMapper
      that requires its inputs to adhear to some constraints. The big change
      is that it required adding functions to append to a VBO or IBO.
      
      Part of this change is I decoupled the opacity from scalar coloring.
      Previously a change in opacity required rebuilding the VBO if
      scalar coloring was on. While this is still the behavior, it can
      now be optimized to not do that.  It doesn't made sense for
      the property's opacity to be mixed in with scalar colors, it
      was just done that way because that we all the old pipeline
      could do.
      
      Also cleaned up a few long lines while I was a it.
      
      Change-Id: I3a06b502f154c4da7465e53eeeaeab9492bca88f
      1862e2d0
  4. 11 Dec, 2014 2 commits
    • Cory Quammen's avatar
      Enable coloring by indexed lookup for vtkStringArrays · 94498364
      Cory Quammen authored
      This change makes it possible to map vtkStringArrays to colors using
      indexed lookup mode. The vtkStringArrays may be associated with
      points, cells, or neither (field data). A slew of changes were
      required to give this capability:
      
      - Changed signature of vtkScalarsToColors::MapScalars(...) and
        vtkDiscretizableColorTransferFunction::MapScalars(...)  to take a
        vtkAbstractArray instead of a vtkDataArray. This enables mapping
        non-vtkDataArray arrays, such as vtkStringArrays. These changes are
        backwards compatible because vtkAbstractArray is the parent class of
        vtkDataArray.
      
      - Changed vtkLookupTable::MapScalarsThroughTable2(...) to handle
        vtkStringArrays.
      
      - Changed vtkColorTransferFunction::MapScalarsThroughTable2(...) to handle
        vtkStringArrays.
      
      - Added vtkAbstractMapper::GetAbstractScalars(...) that returns a data
        array as a vtkAbstractArray - needed to retrieve vtkStringArray
        scalars.
      
      - Added some error reporting when unhandled array type is encountered
        in vtkScalarsToColors::MapScalarsThroughTable2.
      
      - Enabled use of vtkStringArrays for coloring in the surface mappers.
      
      - Added some tests for mapping vtkStringArrays with
        vtkColorTransferFunction and vtkDiscretizableColorTransferFunction.
      
      - Added some tests for coloring objects by vtkStringArrays in cell data
        and point data.
      
      - Added logic to vtkMapper and vtkPolyDataMapper2D that generates a
        reasonable default lookup table when a vtkStringArray or other
        non-numeric array is selected for coloring by scalars. This requires
        making the vtkRenderingCore module depend on vtkCommonColor. Added
        tests for this feature.
      
      Change-Id: I91e2e451217139a7daabd7f4a63de0b8ff707ad4
      94498364
    • Cory Quammen's avatar
      Handle coloring by field data · a07731a2
      Cory Quammen authored
      Some level of support was previously available for coloring by field
      data, but this was restricted to drawing triangle strips. This patch
      adds another mode to coloring by field data that enables coloring the
      entire data set by a particular tuple in the field data. The field
      data tuple gets mapped through the color map, and that color is used
      to color the entire data set. The default behavior for triangle strips
      is retained by setting this tuple index to -1, the default value.
      
      The motivation for this change is to make it possible to color blocks
      in a multi-block dataset according to a value in that block's field
      data array, e.g., an initial condition, block ID, etc. Vector values
      (arrays with more than one component) are fully supported.
      
      Several other improvements were also made:
      
      - Added test for existing capability of coloring by field data.
      
      - Added test for coloring by tuple of field data.
      
      - Modified vtkMapper::GetScalarModeAsString() to return
        string for field data scalar mode.
      
      - Fixed vtkDataSetSurfaceFilter::UnstructuredGridExecute(...) and
        vtkUnstructuredGridGeometryFilter::RequestData(...)
        to pass field data through to output
      
      Change-Id: I0d97e84ec77e7ea01ca1b1350acce73cb6c4c15b
      a07731a2
  5. 24 Nov, 2014 1 commit
  6. 25 Aug, 2014 2 commits
    • Cory Quammen's avatar
      Change clamping range for texture coordinates · b807a6d6
      Cory Quammen authored
      When InterpolateScalarsBeforeMapping is on, vtkMapper and
      vtkScalarsToColorsPainter would clamp texture coordinates to the range
      [0, 1]. This lead to incorrect results if the range of the scalar
      values associated with points that define a primitive were not
      completely contained within the range of the color lookup table used
      to color that primitive, e.g., a quad with scalar range [0,3] colored
      by a color map with range [1,2], and the option
      InterpolateScalarsBeforeMapping is on. In this case, the texture
      coordinates should be in the range [-1, 2], not clamped to [0, 1].
      
      Unfortunately, removing the clamping completely leads to another
      problem. It turns out that some implementations of OpenGL do not
      handle arbitrary texture coordinates of about 1000 or higher
      correctly. To handle this, clamping has been retained, but to the
      range [-1000, 1000]. Hopefully this covers most use cases.
      
      Change-Id: I597c4c1b5f18af645fd6f54e90103321b20b8fb9
      b807a6d6
    • Cory Quammen's avatar
      Rename local functions and embed in anonymous namespace · 8160c637
      Cory Quammen authored
      The templated function vtkMapperScalarToTextureCoordinate was defined
      within the implementation file for vtkScalarsToColorsPainter. An
      identical function with the same name was also defined in the
      implementation file for vtkMapper. As is done with multiply-defined
      templated functions, the linker was selecting only one of these
      definitions for use by both vtkScalarsToColors and vtkMapper,
      which is obviously not desirable behavior, but which turned out
      no to cause any problems because the definitions were the same.
      
      Solved this problem by placing both function definitions in anonymous
      namespaces. Also, reduce the size of the names of these functions to
      exclude the class name prefix.
      
      Change-Id: I7cd8533c383b9388846c2f72c0873c2201a9b395
      8160c637
  7. 23 May, 2014 1 commit
  8. 28 Jan, 2014 1 commit
  9. 09 Apr, 2012 2 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>
      2d323fc4
    • 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>
      cdd4d6fd
  10. 19 Sep, 2011 1 commit
  11. 09 May, 2011 1 commit
  12. 20 May, 2010 1 commit
    • Mark Olesen's avatar
      Remove vtk(Cxx|Type)RevisionMacro · ecbbf7f7
      Mark Olesen authored
      The CVS $Revision$ keyword replacement will no longer maintain these
      macros automatically.  They were used only to implement CollectRevisions
      and vtkObjectBase::PrintRevisions, an API that was never used.
      
      Automated as follows:
      
        pass 0:
        catch templates
        ---------------
        $ git grep 'vtk\(Cxx\|Type\)RevisionMacro' | grep '<'
      
        pass 1:
        main changes
        ---------------
        $ git grep -l '^vtkCxxRevisionMacro' | while read file; do
          echo "$file" 1>&2
          perl -i -ne 'print unless (/^vtkCxxRevisionMacro/ and /\)/)' $file
        done
        $ git grep -l -e 'vtkTypeRevisionMacro(' | while read file; do
          echo "$file" 1>&2
          perl -i -pe 's/vtkTypeRevisionMacro/vtkTypeMacro/g' $file
        done
      
        pass 2:
        verify
        ---------------
        $ git grep 'vtk\(Cxx\|Type\)RevisionMacro'
      
      Fixed multi-line vtkCxxRevisionMacro and templates by hand.
      ecbbf7f7
  13. 23 Apr, 2010 1 commit
    • Mark Olesen's avatar
      Remove vtk(Cxx|Type)RevisionMacro · 19c55e0e
      Mark Olesen authored
      The CVS $Revision$ keyword replacement will no longer maintain these
      macros automatically.  They were used only to implement CollectRevisions
      and vtkObjectBase::PrintRevisions, an API that was never used.
      
      Automated as follows:
      
        pass 0:
        catch templates
        ---------------
        $ git grep 'vtk\(Cxx\|Type\)RevisionMacro' | grep '<'
      
        pass 1:
        main changes
        ---------------
        $ git grep -l '^vtkCxxRevisionMacro' | while read file; do
          echo "$file" 1>&2
          perl -i -ne 'print unless (/^vtkCxxRevisionMacro/ and /\)/)' $file
        done
        $ git grep -l -e 'vtkTypeRevisionMacro(' | while read file; do
          echo "$file" 1>&2
          perl -i -pe 's/vtkTypeRevisionMacro/vtkTypeMacro/g' $file
        done
      
        pass 2:
        verify
        ---------------
        $ git grep 'vtk\(Cxx\|Type\)RevisionMacro'
      
      Fixed multi-line vtkCxxRevisionMacro and templates by hand.
      19c55e0e
  14. 06 Oct, 2008 3 commits
  15. 18 Jul, 2008 1 commit
  16. 14 Jul, 2008 1 commit
    • Francois Bertel's avatar
      BUG:Fixed double *GetBounds() on vtkAbstractMapper3D subclasses. In... · 11e0f703
      Francois Bertel authored
      BUG:Fixed double *GetBounds() on vtkAbstractMapper3D subclasses. In vtkAbstractMapper3D, GetCenter() and GetLength() call GetBounds and rely on the side effect that it will update this->Bounds, the subclasses implementations were not changing this->Bounds to uninitialized (1,-1,1,-1,1,-1) and were returning some arbitrary (-1,1,-1,1,-1,1) valid bounds instead when the input is null. It could be problematic if the scene has one mapper with a valid input with bounds out of (-1,1,-1,1-1,1) and another mapper with an empty input. Fixed another bug in vtkCompositePolyDataMapper2.cxx where input can be used before checking it is not null.
      11e0f703
  17. 23 Feb, 2008 1 commit
  18. 27 Aug, 2007 1 commit
  19. 12 Jul, 2005 1 commit
  20. 24 May, 2005 1 commit
  21. 18 Jan, 2005 1 commit
  22. 22 Nov, 2004 1 commit
  23. 12 Oct, 2004 1 commit
  24. 11 Jul, 2004 1 commit
  25. 08 Jul, 2004 1 commit
  26. 30 Jun, 2004 1 commit
  27. 29 Jan, 2004 1 commit
  28. 28 Jan, 2004 1 commit
  29. 27 Jan, 2004 1 commit
  30. 26 Jan, 2004 2 commits
  31. 15 Jan, 2004 1 commit
  32. 08 Jan, 2004 2 commits