vtkPVDiscretizableColorTransferFunction.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkPVDiscretizableColorTransferFunction.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
26 #ifndef vtkPVDiscretizableColorTransferFunction_h
27 #define vtkPVDiscretizableColorTransferFunction_h
28 
30 
31 #include "vtkRemotingViewsModule.h" // needed for export macro
32 
33 // Forward declarations
34 class vtkAbstractArray;
35 class vtkDoubleArray;
37 class vtkVariantArray;
38 
41 {
42 public:
45  void PrintSelf(ostream& os, vtkIndent indent) override;
46 
48 
52  virtual void SetAnnotationsInFullSet(vtkAbstractArray* values, vtkStringArray* annotations);
53  vtkGetObjectMacro(AnnotatedValuesInFullSet, vtkAbstractArray);
54  vtkGetObjectMacro(AnnotationsInFullSet, vtkStringArray);
55  virtual vtkIdType SetAnnotationInFullSet(vtkVariant value, std::string annotation);
56  virtual vtkIdType SetAnnotationInFullSet(std::string value, std::string annotation);
57  virtual void ResetAnnotationsInFullSet();
59 
60  void ResetActiveAnnotatedValues();
61  void SetActiveAnnotatedValue(std::string value);
62 
63  void SetNumberOfIndexedColorsInFullSet(int n);
64  int GetNumberOfIndexedColorsInFullSet();
65  void SetIndexedColorInFullSet(unsigned int index, double r, double g, double b);
66  void GetIndexedColorInFullSet(unsigned int index, double rgb[3]);
67 
68  void SetNumberOfIndexedOpacitiesInFullSet(int n);
69  int GetNumberOfIndexedOpacitiesInFullSet();
70  void SetIndexedOpacityInFullSet(unsigned int index, double alpha);
71  void GetIndexedOpacityInFullSet(unsigned int index, double* alpha);
72 
74 
78  vtkSetMacro(UseActiveValues, bool);
79  vtkGetMacro(UseActiveValues, bool);
80  vtkBooleanMacro(UseActiveValues, bool);
82 
86  void Build() override;
87 
89 
92  virtual void SetTransferFunction2D(vtkPVTransferFunction2D* f);
93  virtual vtkPVTransferFunction2D* GetTransferFunction2D() const;
95 
96 protected:
99 
100 private:
103 
105 
108  vtkAbstractArray* AnnotatedValuesInFullSet;
109  vtkStringArray* AnnotationsInFullSet;
111 
112  vtkDoubleArray* IndexedColorsInFullSet;
113  vtkDoubleArray* IndexedOpacitiesInFullSet;
114 
118  vtkVariantArray* ActiveAnnotatedValues;
119 
124  bool UseActiveValues;
125 
130 
134  vtkSmartPointer<vtkPVTransferFunction2D> TransferFunction2D;
135 };
136 
137 #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 &)