vtkPVDiscretizableColorTransferFunction.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
14 #ifndef vtkPVDiscretizableColorTransferFunction_h
15 #define vtkPVDiscretizableColorTransferFunction_h
16 
18 
19 #include "vtkRemotingViewsModule.h" // needed for export macro
20 
21 // Forward declarations
22 class vtkAbstractArray;
23 class vtkDoubleArray;
25 class vtkVariantArray;
26 
29 {
30 public:
33  void PrintSelf(ostream& os, vtkIndent indent) override;
34 
36 
40  virtual void SetAnnotationsInFullSet(vtkAbstractArray* values, vtkStringArray* annotations);
41  vtkGetObjectMacro(AnnotatedValuesInFullSet, vtkAbstractArray);
42  vtkGetObjectMacro(AnnotationsInFullSet, vtkStringArray);
43  virtual vtkIdType SetAnnotationInFullSet(vtkVariant value, std::string annotation);
44  virtual vtkIdType SetAnnotationInFullSet(std::string value, std::string annotation);
45  virtual void ResetAnnotationsInFullSet();
47 
48  void ResetActiveAnnotatedValues();
49  void SetActiveAnnotatedValue(std::string value);
50 
51  void SetNumberOfIndexedColorsInFullSet(int n);
52  int GetNumberOfIndexedColorsInFullSet();
53  void SetIndexedColorInFullSet(unsigned int index, double r, double g, double b);
54  void GetIndexedColorInFullSet(unsigned int index, double rgb[3]);
55 
56  void SetNumberOfIndexedOpacitiesInFullSet(int n);
57  int GetNumberOfIndexedOpacitiesInFullSet();
58  void SetIndexedOpacityInFullSet(unsigned int index, double alpha);
59  void GetIndexedOpacityInFullSet(unsigned int index, double* alpha);
60 
62 
66  vtkSetMacro(UseActiveValues, bool);
67  vtkGetMacro(UseActiveValues, bool);
68  vtkBooleanMacro(UseActiveValues, bool);
70 
74  void Build() override;
75 
77 
80  virtual void SetTransferFunction2D(vtkPVTransferFunction2D* f);
81  virtual vtkPVTransferFunction2D* GetTransferFunction2D() const;
83 
84 protected:
87 
88 private:
91 
93 
96  vtkAbstractArray* AnnotatedValuesInFullSet;
97  vtkStringArray* AnnotationsInFullSet;
99 
100  vtkDoubleArray* IndexedColorsInFullSet;
101  vtkDoubleArray* IndexedOpacitiesInFullSet;
102 
106  vtkVariantArray* ActiveAnnotatedValues;
107 
112  bool UseActiveValues;
113 
118 
122  vtkSmartPointer<vtkPVTransferFunction2D> TransferFunction2D;
123 };
124 
125 #endif
static vtkDiscretizableColorTransferFunction * New()
custom version of vtkDiscretizableColorTransferFunction that adds some functionality.
#define VTKREMOTINGVIEWS_EXPORT
void PrintSelf(ostream &os, vtkIndent indent)
int vtkIdType
Defines a 2D transfer function for mapping to RGBA values for volume rendering.
void operator=(const vtkObjectBase &)