VTK  9.3.20240327
vtkOTScatterPlotMatrix.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
3 
19 #ifndef vtkOTScatterPlotMatrix_h
20 #define vtkOTScatterPlotMatrix_h
21 
22 #include "vtkFiltersOpenTURNSModule.h" // For export macro
23 #include "vtkScatterPlotMatrix.h"
24 #include "vtkSmartPointer.h" // For SmartPointer
25 
26 VTK_ABI_NAMESPACE_BEGIN
27 class vtkOTDensityMap;
28 class vtkScalarsToColors;
29 
30 class VTKFILTERSOPENTURNS_EXPORT vtkOTScatterPlotMatrix : public vtkScatterPlotMatrix
31 {
32 public:
34  void PrintSelf(ostream& os, vtkIndent indent) override;
35 
40 
44  void SetDensityMapVisibility(int plotType, bool visible);
45 
49  void SetDensityLineSize(int plotType, float size);
50 
54  void SetDensityMapColor(int plotType, unsigned int densityLineIndex, const vtkColor4ub& color);
55 
57 
64 
65 protected:
68 
74  void AddSupplementaryPlot(vtkChart* chart, int plotType, vtkStdString row, vtkStdString column,
75  int plotCorner = 0) override;
76 
77 private:
79  void operator=(const vtkOTScatterPlotMatrix&) = delete;
80 
81  class DensityMapSettings;
82  std::map<int, DensityMapSettings*> DensityMapsSettings;
83  typedef std::map<std::pair<std::string, std::string>, vtkSmartPointer<vtkOTDensityMap>>
84  DensityMapCacheMap;
85  DensityMapCacheMap DensityMapCache;
86 
87  vtkSmartPointer<vtkScalarsToColors> TransferFunction;
88 };
89 
90 VTK_ABI_NAMESPACE_END
91 #endif // vtkOTScatterPlotMatrix_h
Factory class for drawing 2D charts.
Definition: vtkChart.h:150
a simple class to control print indentation
Definition: vtkIndent.h:108
A VTK Filter to compute density map on any pair of numeric data arrays with the same number of tuples...
container for a matrix of charts.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetTransferFunction(vtkScalarsToColors *stc)
Get/Set a custom color transfer function.
static vtkOTScatterPlotMatrix * New()
Creates a new object.
void SetDensityMapColor(int plotType, unsigned int densityLineIndex, const vtkColor4ub &color)
Set the color for the specified plotType, automatically distributed on HSV by default.
void AddSupplementaryPlot(vtkChart *chart, int plotType, vtkStdString row, vtkStdString column, int plotCorner=0) override
Add a density map as a supplementary plot, with provided row and column, computed with OpenTURNS if D...
~vtkOTScatterPlotMatrix() override
void SetDensityLineSize(int plotType, float size)
Set the density line size for the specified plotType, 2 by default.
vtkScalarsToColors * GetTransferFunction()
Get/Set a custom color transfer function.
void SetDensityMapVisibility(int plotType, bool visible)
Set the visibility of density map for the specific plotType, false by default.
Superclass for mapping scalar values to colors.
container for a matrix of charts.
Hold a reference to a vtkObjectBase instance.
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:78
@ color
Definition: vtkX3D.h:221
@ size
Definition: vtkX3D.h:253