iMSTK
Interactive Medical Simulation Toolkit
imstkVTKChartRenderDelegate.h
1 /*
2 ** This file is part of the Interactive Medical Simulation Toolkit (iMSTK)
3 ** iMSTK is distributed under the Apache License, Version 2.0.
4 ** See accompanying NOTICE for details.
5 */
6 
7 #pragma once
8 
9 #include "imstkChartVisualModel.h"
10 #include "imstkVTKRenderDelegate.h"
11 
12 #include <unordered_map>
13 
14 class vtkChartXY;
15 class vtkContextActor;
16 class vtkContextScene;
17 class vtkPlot;
18 class vtkTable;
19 
20 namespace imstk
21 {
22 class AbstractDataArray;
23 } // namespace imstk
24 
25 using namespace imstk;
26 
33 {
34 public:
36  ~VTKChartRenderDelegate() override = default;
37 
41  void processEvents() override;
42 
43  void updateRenderProperties() override { }
44 
45 protected:
46  void init() override;
47 
48  vtkSmartPointer<vtkTable> m_table;
49  vtkSmartPointer<vtkChartXY> m_chart;
50 
51  std::unordered_map<std::shared_ptr<Plot2d>, vtkPlot*> m_plots;
52 
53  vtkSmartPointer<vtkContextActor> m_chartActor;
54  vtkSmartPointer<vtkContextScene> m_contextScene;
55 };
Compound Geometry.
void updateRenderProperties() override
Updates the actor and mapper properties from the currently set VisualModel.
This class serves as the base class of DataArray, for typeless use.
Render delegate to render graphs.
Base class for VTK render delegates.