vtkPVTransferFunction2DBox.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
9 #ifndef vtkPVTransferFunction2DBox_h
10 #define vtkPVTransferFunction2DBox_h
11 
12 // VTK includes
13 #include <vtkObject.h>
14 
15 #include "vtkRemotingViewsModule.h" // needed for export macro
16 
17 #include <vtkRect.h> // needed for ivar
18 
19 // Forward declarations
20 class vtkImageData;
21 
23 {
24 public:
29 
31 
35  void PrintSelf(ostream& os, vtkIndent indent) override;
37 
41  virtual const vtkRectd& GetBox();
42 
44 
47  virtual void SetBox(double x, double y, double width, double height);
48  virtual void SetBox(const vtkRectd& b);
50 
52 
56  vtkSetVector4Macro(Color, double);
57  vtkGetVector4Macro(Color, double);
59 
64  virtual vtkImageData* GetTexture();
65 
67 
71  vtkSetVector2Macro(TextureSize, int);
72  vtkGetVector2Macro(TextureSize, int);
74 
76 
80  vtkSetMacro(GaussianSigmaFactor, double);
81  vtkGetMacro(GaussianSigmaFactor, double);
83 
84 protected:
86  ~vtkPVTransferFunction2DBox() override;
87 
88  // Helper members
90  double Color[4] = { 1, 1, 1, 1 };
91  int TextureSize[2] = { 128, 128 };
92  double GaussianSigmaFactor = 30.0;
93 
94  vtkImageData* Texture = nullptr;
95 
99  virtual void ComputeTexture();
100 
101 private:
103  void operator=(const vtkPVTransferFunction2DBox) = delete;
104 };
105 
106 #endif // vtkPVTransferFunction2DBox_h
#define VTKREMOTINGVIEWS_EXPORT
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
Color
static vtkObject * New()
void operator=(const vtkObjectBase &)
Shape that represents an individual control node in a 2D transfer function.