ParaView
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 
29 #include "vtkDiscretizableColorTransferFunction.h"
30 
31 #include "vtkPVVTKExtensionsRenderingModule.h" // needed for export macro
32 
33 class vtkAbstractArray;
34 class vtkDoubleArray;
35 class vtkVariantArray;
36 
37 class VTKPVVTKEXTENSIONSRENDERING_EXPORT vtkPVDiscretizableColorTransferFunction
38  : public vtkDiscretizableColorTransferFunction
39 {
40 public:
42  vtkTypeMacro(vtkPVDiscretizableColorTransferFunction, vtkDiscretizableColorTransferFunction);
43  void PrintSelf(ostream& os, vtkIndent indent);
44 
46 
50  virtual void SetAnnotationsInFullSet(vtkAbstractArray* values, vtkStringArray* annotations);
51  vtkGetObjectMacro(AnnotatedValuesInFullSet, vtkAbstractArray);
52  vtkGetObjectMacro(AnnotationsInFullSet, vtkStringArray);
53  virtual vtkIdType SetAnnotationInFullSet(vtkVariant value, vtkStdString annotation);
54  virtual vtkIdType SetAnnotationInFullSet(vtkStdString value, vtkStdString annotation);
55  virtual void ResetAnnotationsInFullSet();
57 
58  void ResetActiveAnnotatedValues();
59  void SetActiveAnnotatedValue(vtkStdString value);
60 
61  void SetNumberOfIndexedColorsInFullSet(int n);
62  int GetNumberOfIndexedColorsInFullSet();
63  void SetIndexedColorInFullSet(unsigned int index, double r, double g, double b);
64  void GetIndexedColorInFullSet(unsigned int index, double rgb[3]);
65 
67 
71  vtkSetMacro(UseActiveValues, bool);
72  vtkGetMacro(UseActiveValues, bool);
73  vtkBooleanMacro(UseActiveValues, bool);
75 
79  virtual void Build();
80 
81 protected:
84 
85 private:
87  const vtkPVDiscretizableColorTransferFunction&) VTK_DELETE_FUNCTION;
88  void operator=(const vtkPVDiscretizableColorTransferFunction&) VTK_DELETE_FUNCTION;
89 
90  // All annotations.
91  vtkAbstractArray* AnnotatedValuesInFullSet;
92  vtkStringArray* AnnotationsInFullSet;
93 
94  vtkDoubleArray* IndexedColorsInFullSet;
95 
96  // Set of active annotations
97  vtkVariantArray* ActiveAnnotatedValues;
98 
99  // Set whether only "active" annotations should be display. If off, show all annotations.
100  bool UseActiveValues;
101 
102  // Build time for this subclass
103  vtkTimeStamp BuildTime;
104 };
105 
106 #endif
custom version of vtkDiscretizableColorTransferFunction that adds some functionality.