VTK  9.7.1
vtkPiecewiseFunctionItem.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 
4 #ifndef vtkPiecewiseFunctionItem_h
5 #define vtkPiecewiseFunctionItem_h
6 
7 #include "vtkChartsCoreModule.h" // For export macro
9 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
10 
11 VTK_ABI_NAMESPACE_BEGIN
13 class vtkImageData;
14 
17 {
18 public:
19  static vtkPiecewiseFunctionItem* New();
21  void PrintSelf(ostream& os, vtkIndent indent) override;
22 
23  void SetPiecewiseFunction(vtkPiecewiseFunction* t);
24  vtkGetObjectMacro(PiecewiseFunction, vtkPiecewiseFunction);
25 
26 protected:
28  ~vtkPiecewiseFunctionItem() override;
29 
30  // Description:
31  // Reimplemented to return the range of the piecewise function
32  void ComputeBounds(double bounds[4]) override;
33 
34  // Description
35  // Compute the texture from the PiecewiseFunction
36  void ComputeTexture() override;
37 
39 
40 private:
42  void operator=(const vtkPiecewiseFunctionItem&) = delete;
43 };
44 
45 VTK_ABI_NAMESPACE_END
46 #endif
Defines a 1D piecewise function.
virtual void ComputeTexture()=0
Need to be reimplemented by subclasses, ComputeTexture() is called at paint time if the texture is no...
Abstract class for ScalarsToColors items.
vtkPiecewiseFunction * PiecewiseFunction
vtkPiecewiseFunctionItem internal uses vtkPlot::Color, white by default
a simple class to control print indentation
Definition: vtkIndent.h:28
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
virtual void ComputeBounds(double *bounds)
Bounds of the item, by default (0, 1, 0, 1) but it depends on the range of the ScalarsToColors functi...
#define VTK_MARSHALAUTO
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.