1. 10 Jun, 2019 1 commit
  2. 19 Mar, 2018 2 commits
  3. 11 Nov, 2017 2 commits
  4. 07 Sep, 2017 1 commit
  5. 28 Aug, 2017 1 commit
  6. 25 Aug, 2017 2 commits
  7. 24 Aug, 2017 1 commit
  8. 12 Aug, 2017 2 commits
  9. 03 May, 2017 1 commit
  10. 11 Apr, 2017 1 commit
    • Shusil Dangi's avatar
      ENH: Changes/Adds the standard Copyright info for all files · 8259ffcc
      Shusil Dangi authored
         Library: iMSTK
         Copyright (c) Kitware, Inc. & Center for Modeling, Simulation,
         & Imaging in Medicine, Rensselaer Polytechnic Institute.
         Licensed under the Apache License, Version 2.0 (the "License");
         you may not use this file except in compliance with the License.
         You may obtain a copy of the License at
         Unless required by applicable law or agreed to in writing, software
         distributed under the License is distributed on an "AS IS" BASIS,
         WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
         See the License for the specific language governing permissions and
         limitations under the License.
  11. 09 Mar, 2017 1 commit
  12. 08 Mar, 2017 2 commits
  13. 26 Jan, 2017 3 commits
    • Alexis Girault's avatar
      ENH: Allow debug rendering while simulation runs · f1a8342d
      Alexis Girault authored
      Addresses suggestions made here:
      alexis-girault/iMSTK@a63f98b5 (comment 212643)
      It would be great to have the option of using pan-zoom-rotate
      when simulation is running for certain applications. I keep
      pressing 'S' and 'E' in succession to see if everything is good
      for an example i was working on. It need not be a default run
      mode option.
      * Rename VTKRenderer::setup into VTKRenderer::setMode
      * Add VTKRenderer::getMode
      * Add VTKViewer::getRenderingMode wrapping the one above
      * Consider Rendering Mode in Mouse event callbacks instead of
      simulation status
      * Allow to switch to Debug rendering and back with the `d` key
    • Alexis Girault's avatar
      ENH: Display framerate in window · 2094e396
      Alexis Girault authored
      Press the `P` key (for "Print text", since f should be for
      fullscreen) to display the rendering framerate in the left
      bottom corner.
      Needed to override `SetCurrentRenderer` to add the textActor.
      Only update the displayed framerate value every 100ms, which
      requires the variables `m_lastFpsUpdate` (last time since the
      value was updated), and `m_lastFps` (to compute the framerate
      value using a moving average).
    • Alexis Girault's avatar
      BUG: fix VTK rendering when framerate not fixed · 70d57b87
      Alexis Girault authored
      When the framerate was not fixed, the next render pass
      would be called using `CreateOneShotTimer(0)` while its
      parameter minimum value is 1 (in milliseconds). 0 would
      set it up for the default value of 10 ms.
  14. 05 Jan, 2017 1 commit
  15. 20 Dec, 2016 1 commit
    • Alexis Girault's avatar
      ENH: Add custom event handlers for vtk interaction · a63f98b5
      Alexis Girault authored
      1) Allow to set up lambda functions from VTKViewer
      as custom behavior to run in the interactor Style
      in event callbacks.
      2) Simplify VTKInteractorStyle::OnChar() to only have
      simple default behaviors (start, stop, pause, play, quit)
      3) Move the implemenation of getTargetFrameRate(),
      setTargetFrameRate() and setSimulationManager() from
      VTKInteractorStyle to VTKViewer, which becomes friend class
      of the private members of VTKInteractorStyle to avoid
      repeatedly wrapping around the interactor style methods.
      Co-authored-by: default avatarHina Shah <hina.shah@kitware.com>
  16. 29 Nov, 2016 1 commit
    • Alexis Girault's avatar
      ENH: Update timer in vtkInteractor to meet target fps · de900528
      Alexis Girault authored
      vtkInteractor::CreateRepeatingTimer would call
      vtkInteractorStyle::OnTimer then sleep for the period
      given in ms after calling OnTimer again. This isn't
      adapted for rendering at a regular framerate, because
      the time taken withing the OnTimer function is not
      taken into account in the sleep time.
      By using OneShotTimer, we can manipulate when to
      render the next frame: in (period - time spent) ms
      if the time spent in OnTimer is smaller than the period
      time, or right away (period of 0 ms) if the time spent
      is over the target period (late frame).
      An interface is added in the VTKInteractorStyle,
      wrapped in the VTKViewer, to set the target framerate.
      Default value is 0ms to render as fast as possible. See:
      : http://gaming.stackexchange.com/questions/221423/is-there-any-reason-to-limit-my-fps
  17. 11 Nov, 2016 1 commit
  18. 25 Jul, 2016 1 commit
  19. 02 Jun, 2016 1 commit
  20. 17 May, 2016 1 commit
  21. 16 May, 2016 3 commits
  22. 13 May, 2016 2 commits
    • Alexis Girault's avatar
      WIP: Implement CameraController · b5a57f0f
      Alexis Girault authored
      1) Camera does not hold a vtkCamera anymore (less tight integration).
      It holds camera parameters.
      2) Camera has a pointer to CameraController, that you can set up
      based on a deviceclient. This camera controller has a reference
      to the camera, and updates its parameters based on the deviceclient
      retrieved information.
      3) Scene runs the controller as an asynchronous module in its own
      thread, it is therefore started in Scene::initModule and ended in
      4) In the timer loop of InteractorStyle, the vtk camera is updated
      based on the scene camera.
      5) In Renderer, a new vtk Camera needs to be created to match the
      scene camera, since it is not created anymore in imstk::Camera.
    • Alexis Girault's avatar
      ENH: Render on timer event from window interactor · 835e68c9
      Alexis Girault authored
      1) Create a timer on the renderWindowInteractor
      2) Render() in 'InteractorStyle::OnTimer()'
  23. 15 Apr, 2016 1 commit
  24. 08 Apr, 2016 1 commit
    • Alexis Girault's avatar
      ENH: Improve Viewer Simulation control · 22fb2144
      Alexis Girault authored
      (1) `SimulationManager::startSimulation()` will check if a Viewer is
      already rendering, and will only start a rendering/interaction loop
      in the main thread if it isn't. This allows us to work with two
      possible cases:
      (a) a QT Application with an existing widget for rendering, in which
      case we do not want to control the rendering window ourself in a loop
      (b) a standalone `vtkRenderWindow` application, in which case we do
      want to create a window when our simulation starts and loop until the
      window is closed.
      (2) `SimulationManager::startSimulation()` can be launched with a debug
      boolean option (off by default), which will allow to not automatically
      simulate the dynamics of the scene, to be able to interact with the
      scene beforehand (using the mouse).
      (3) `imstk::InteractorStyle` is based on vtkInteractorStyle specifically
      the trackballCamera and allows to ignore mouse events in simulation mode,
      and uses key events to control the simulation:
      's' : start simulation
      'e' : end simulation
      ' ' (space) : pause/run simulation
      (4) The `Viewer` class and the `InteractorStyle` class have been moved
      to the `SimulationManager` module, since they are more drivers of the
      application themselves.
      (5) The 'Sandbox' example has been refactored to make it easier to test
      autonomous tests, and updated to use the new driver architecture brought
      with this commit.