1. 02 Jan, 2013 1 commit
  2. 31 Dec, 2012 1 commit
    • David C. Lonie's avatar
      Make MPL rendering less verbose. · 8fc892b8
      David C. Lonie authored
      Only print rendering errors and python exceptions in
      vtkMatplotlibMathTextUtilities when debugging is turned on. Also set
      vtkMatplotlibMathTextUtilities::Debug to true when the
      VTK_MATPLOTLIB_DEBUG env var is defined.
      Change-Id: Iabe1295c9c72cc820c76b8df615d2b97fb9a6a1e
  3. 30 Dec, 2012 1 commit
  4. 21 Dec, 2012 1 commit
    • David C. Lonie's avatar
      Add more environment variables to configure/debug matplotlib. · 10ff04a8
      David C. Lonie authored
      This class is aware of a number of enviroment variables that can be used to
      configure and debug python initialization (all are optional):
      - VTK_MATPLOTLIB_DEBUG: Enable verbose debugging output during initialization
        of the python environment.
      - VTK_MATPLOTLIB_PYTHONINTERP: Path to the python interpreter. This will be
        passed to Py_SetProgramName prior to calling Py_Initialize.
      - VTK_MATPLOTLIB_PYTHONHOME: See the Python documentation on the PYTHONHOME
        environment variable. This will be passed to Py_SetPythonHome prior to
        calling Py_Initialize.
      - VTK_MATPLOTLIB_PYTHONPATH: A list of additional python module paths to be
        prepended to the sys.path object after initialization. Use ';' on windows and
        ':' on apple/linux to separate multiple paths.
      Change-Id: I00613c3254750d26de350514a426fe24ce26f732
  5. 20 Dec, 2012 1 commit
  6. 19 Dec, 2012 4 commits
    • David C. Lonie's avatar
      Fix TextContextMathImage. · 98a4d792
      David C. Lonie authored
      Matplotlib seems to need \left{ to be \left\{ in some cases?
      Traceback (most recent call last):
        File "/usr/lib/python2.7/site-packages/matplotlib/textpath.py", line 137, in get_text_path
          glyph_info, glyph_map, rects = self.get_glyphs_mathtext(prop, s)
        File "/usr/lib/python2.7/site-packages/matplotlib/textpath.py", line 228, in get_glyphs_mathtext
          s, self.DPI, prop)
        File "/usr/lib/python2.7/site-packages/matplotlib/mathtext.py", line 3010, in parse
          box = self._parser.parse(s, font_output, fontsize, dpi)
        File "/usr/lib/python2.7/site-packages/matplotlib/mathtext.py", line 2344, in parse
      Expected a delimiter (at char 5), (line:1, col:6)
      ERROR: In ../Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.cxx, line 235
      vtkMatplotlibMathTextUtilities (0x1cb8f70): Object is NULL!
      Change-Id: I30d2e5eea46dafe670f1465c0b9afabea6b6c764
    • David C. Lonie's avatar
      Fix rotated mathtext rendering. · cb04b0c2
      David C. Lonie authored
      Fixes tests like this:
      Change-Id: I57d4c1cad88e2636941293c39a3852b7acddbf25
    • David C. Lonie's avatar
      Fix failing TestRenderString test. · 85aa8ff7
      David C. Lonie authored
      Don't scale the image to a power of two for this test, since we're
      using vtkImageViewer2 instead of directly rendering a texture.
      Change-Id: Ic72b68968f88b1694eee837850b9db551f9d39b2
    • David C. Lonie's avatar
      Add missing return statement. · d70b7107
      David C. Lonie authored
      Change-Id: I5a73762fedc450f683cd2f4426a26d4545abac2a
  7. 18 Dec, 2012 3 commits
  8. 13 Dec, 2012 7 commits
    • David C. Lonie's avatar
      Fix failing TestCaptionActor. · ef48d154
      David C. Lonie authored
      The text drop shadow was colored the same as the text, creating a very
      difficult to read label. This patch resets the color property of the
      caption's text actor to the default vtkProperty2D color.
      Change-Id: Id00640dca2fc97ef81011feec5be4993116e3217
    • David C. Lonie's avatar
      Add simple benchmark to test new text rendering classes. · c3f33573
      David C. Lonie authored
      The benchmark is in Rendering/FreeType/Testing/Cxx, and is disabled
      by default since it takes a little while to run and will never actually
      The benchmark compares the new FTTools implementation to FTUtilities,
      which was previously the only way to render multi-line text. A variety
      of font sizes, orientations, etc are used in order to force cache misses
      in the FreeType cache. The test string is unusually long for VTK (500
      lines), but this was necessary to ensure that each render occurred on a
      measurable timescale. vtkTextRenderer is also tested to benchmark the
      overhead that the TextRenderer layer adds.
      On my machine in a release-mode build, I get:
      FTTools: Total: 23.06  Min: 0.00  Max: 1.29  Ave: 0.23
      TextRen: Total: 22.94  Min: 0.00  Max: 1.28  Ave: 0.22
      FTUtils: Total: 27.00  Min: 0.01  Max: 1.48  Ave: 0.27
      So some of the renderings in the new class are still occurring faster
      than clock() can detect, but there is nevertheless an improvement
      over FTUtils. It would be useful to figure out a way to benchmark small
      strings of 1-5 lines in a reasonable way.
      Change-Id: I8f37e3130ed766932f671f315ce790d1772e2410
    • David C. Lonie's avatar
      Port vtkTextActor to use vtkTextRenderer. · d17c39aa
      David C. Lonie authored
      The MathTextActor is updated too, since it used the FTUtilities class
      cached by TextActor. I plan to remove the MathTextActor classes completely,
      since their functionality is redundant once TextActors are using
      Change-Id: I098a02ac5e55c1ce31423c1268fb4db2e2b5bb1f
    • David C. Lonie's avatar
      Add a TextRenderer interface and implementation. · f393fa8b
      David C. Lonie authored
      An abstract vtkTextRenderer interface is added to RenderingCore.
      This will allow all rendering classes to have access to text rendering
      functionality without an explicit dependence on RenderingFreeType. Once
      existing code is migrated to use this simplified interface, applications
      using VTK will be able to add their own text rendering backends easily.
      The interface is designed to, at minimum, switch between FreeType and
      MathText rendering, enabling any users of the interface to have access
      to pretty-printed equation by passing in MathText markup, which is a subset
      of LaTeX. The implementation will test for the presence of "$...$" in the
      input string and, if present, MathText will be used instead of FreeType.
      If MathText is unavailable (it requires python and matplotlib) or fails
      to render, a warning is produced and the FreeType backend is used as a
      The default implementation of this class is vtkMathTextFreeTypeTextRenderer
      in the RenderingFreeType module.
      Change-Id: I215ad856e3f197c3ea22eb8f9dd68e5ec2f9e620
    • David C. Lonie's avatar
      Clean up comments, style in FreeTypeTools. · e5e484be
      David C. Lonie authored
      Change-Id: I9e020c0d7e19294762f8fb270dccc7e42a49f748
    • David C. Lonie's avatar
      Add multiline, justification, and shadows to vtkFreeTypeTools. · 6dd7b574
      David C. Lonie authored
      Also, explicitly return text dimensions from text rasterization
      functions. Older hardware requires texture image dimensions to be
      powers of 2. Since the text will only be rendered into a portion of
      the image in these cases, the text dimensions are needed to calculate
      the texture coordinates during rendering.
      Some classes were hiding the text dimensions in the image metadata, e.g.
      texture coordinates and text dimensions were stored in Spacing and Origin.
      This undocumented behavior was confusing and unintuitive.
      Now functions that rendering scaled images explicitly return the text
      Change-Id: Ic74b0dd9573d336427038985c671a8b724c92429
    • David C. Lonie's avatar
      Add GetConstrainedFontSize to FTTools and MTUtilities. · 5c14d896
      David C. Lonie authored
      Add a method to compute the font size needed to make text rendered
      by FreeTypeTools or MathTextUtilities fill a specified rectangle.
      The documentation of vtkTextMapper::GetConstrainedFontSize is
      clarified, too.
      Change-Id: I39de26b5173153eaec9e8f5f2857fe9964bad768
      s constrained -- add note about updated docs for tmapper
      Change-Id: Ib8c042285aabc719fe57825c05d85b6ab2b59c4b
  9. 07 Dec, 2012 1 commit
    • Brad King's avatar
      Replace remove() with list(REMOVE_ITEM) · 6625fcec
      Brad King authored
      The remove() command is documented as discouraged and replaced by the
      list(REMOVE_ITEM) command which has been around since CMake 2.6.0.
      Change-Id: Ibd5a95ef9dc81eb09a28a344ef009d7f1511abf6
  10. 04 Dec, 2012 2 commits
  11. 03 Dec, 2012 2 commits
    • Dave DeMarle's avatar
      Give OpenGL include directory to everything that needs it. · 35a3e376
      Dave DeMarle authored
      For example vtkGL2PSExporter.cxx includes vtkOpenGLRenderWindow.h,
      which includes vtkOpenGL.h which includes GL/gl.h.
      When that isn't on the system include path, as in cross compilation for
      a supercomputer an using pure OSmesa compilation will fail.
      Change-Id: Ic0fa1870009c6013ad30dbb938707ba4735f1ed3
    • Dave DeMarle's avatar
      Fix iostream conversion errors. · f076c3b0
      Dave DeMarle authored
      These show up on xlc compiler as: "The call to operator<< has no best match"
      Change-Id: If4ef9cfbb635609ab850205fcf441d6cd3ff40e2
  12. 28 Nov, 2012 2 commits
  13. 27 Nov, 2012 1 commit
  14. 20 Nov, 2012 1 commit
    • Joachim Pouderoux's avatar
      Add bool IntializeFromCurrentContext() method to vtkRenderWindow. · 2eb0792e
      Joachim Pouderoux authored
      This new method allows to associate a vtkRenderWindow to an existing
      and currently activated OpenGLContext. The window and associated ids
      are fetched by analyzing the context properties.
      For now, the implementation has been successfully tested on
      Windows & Linux.
      This new method is used to initialize a RenderWindow from a Java SWT
      GLCanvas component.
      Change-Id: Ia08b7df58a964a93c265d89ebe7b1316e605ee10
  15. 14 Nov, 2012 2 commits
  16. 13 Nov, 2012 3 commits
    • Sean McBride's avatar
      misc code review of VTK Cocoa code. · 6c4ac2be
      Sean McBride authored
      Renamed Obj-C ivars to start with underscore, per convention. Got rid of 10.5 era workaround. Updated some comments, especially wrt ARC memory management. Fixed some white space. All minor stuff.
      Change-Id: Ib1283176980d70ee5c25a43b754ec558fc47a7a4
    • Jeff Baumes's avatar
      Fixing Clear() method for the context scene · ba2cb526
      Jeff Baumes authored
      Clear() was removing elements from the scene without first
      setting the scene and parent to NULL, as is done in
      RemoveItem(). This sometimes caused a crash in e.g.
      vtkContextScene::MouseMoveEvent() where it keeps a reference
      to the last item picked and attempts to invoke a method on
      it as long as the scene is still valid. This change causes
      this check to not pass (scene is NULL) and avoid the crash.
      Change-Id: Ic9a64f38b5c9093ea6e56241ba16e4bba7cb99ca
    • Frederic TINGAUD's avatar
      Don't use exponent in cube axes title with custom labels. · b807256a
      Frederic TINGAUD authored
      If the user passes custom labels, the exponent information in axis title
      doesn't make sense. It should be hidden.
      Change-Id: I8203ed072ba85ffaaaca0b325abb299000213895
  17. 07 Nov, 2012 2 commits
    • Kyle Lutz's avatar
      Fix warning in vtkOpenGLScalarsToColorsPainter · 7480adf8
      Kyle Lutz authored
      This fixes a "forcing conversion to bool" warning in the
      vtkOpenGLScalarsToColorsPainter::RenderInternal() method.
      Change-Id: I736aee9819062bf283e3bac15ffab96dfdb958d3
    • Kyle Lutz's avatar
      Fix warning in vtkOpenGLExtensionManager · f3341bae
      Kyle Lutz authored
      This fixes a warning caused by a prevuiously declared
      gl_version variable in vtkOpenGLExtensionManager.
      Change-Id: Iabe6ea8db4d346f5082818e5885fe0b0a7b42eba
  18. 05 Nov, 2012 4 commits
  19. 01 Nov, 2012 1 commit