ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
vtkDiscretizableColorTransferFunctionCustom.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 #include "qPCL.h"
11 #include "vtkDiscretizableColorTransferFunction.h"
12 
13 class vtkAbstractArray;
14 class vtkDoubleArray;
15 class vtkVariantArray;
16 
18  : public vtkDiscretizableColorTransferFunction {
19 public:
22  vtkDiscretizableColorTransferFunction);
23  void PrintSelf(ostream& os, vtkIndent indent) override;
24 
26 
30  virtual void SetAnnotationsInFullSet(vtkAbstractArray* values,
31  vtkStringArray* annotations);
32  vtkGetObjectMacro(AnnotatedValuesInFullSet, vtkAbstractArray);
33  vtkGetObjectMacro(AnnotationsInFullSet, vtkStringArray);
34  virtual vtkIdType SetAnnotationInFullSet(vtkVariant value,
35  std::string annotation);
36  virtual vtkIdType SetAnnotationInFullSet(std::string value,
37  std::string annotation);
38  virtual void ResetAnnotationsInFullSet();
40 
48  void SetIndexedColorRGB(unsigned int index, const double rgb[3]) {
49  this->SetIndexedColor(index, rgb[0], rgb[1], rgb[2]);
50  }
51  void SetIndexedColorRGBA(unsigned int index, const double rgba[4]) {
52  this->SetIndexedColor(index, rgba[0], rgba[1], rgba[2]);
53  }
54 
55  void ResetActiveAnnotatedValues();
56  void SetActiveAnnotatedValue(std::string value);
57 
58  void SetNumberOfIndexedColorsInFullSet(int n);
59  int GetNumberOfIndexedColorsInFullSet();
60  void SetIndexedColorInFullSet(unsigned int index,
61  double r,
62  double g,
63  double b);
64  void GetIndexedColorInFullSet(unsigned int index, double rgb[3]);
65 
66  void SetNumberOfIndexedOpacitiesInFullSet(int n);
67  int GetNumberOfIndexedOpacitiesInFullSet();
68  void SetIndexedOpacityInFullSet(unsigned int index, double alpha);
69  void GetIndexedOpacityInFullSet(unsigned int index, double* alpha);
70 
72 
76  vtkSetMacro(UseActiveValues, bool);
77  vtkGetMacro(UseActiveValues, bool);
78  vtkBooleanMacro(UseActiveValues, bool);
80 
84  void Build() override;
85 
86 protected:
89 
90 private:
93  void operator=(const vtkDiscretizableColorTransferFunctionCustom&) = delete;
94 
96 
99  vtkAbstractArray* AnnotatedValuesInFullSet;
100  vtkStringArray* AnnotationsInFullSet;
102 
103  vtkDoubleArray* IndexedColorsInFullSet;
104  vtkDoubleArray* IndexedOpacitiesInFullSet;
105 
109  vtkVariantArray* ActiveAnnotatedValues;
110 
115  bool UseActiveValues;
116 
120  vtkTimeStamp BuildTime;
121 };
rgb
normal_z rgb
Definition: my_point_types.h:168
x
normal_z x
Definition: my_point_types.h:165
NULL
#define NULL
Definition: UVUnwrapping.cpp:40
vtkDiscretizableColorTransferFunctionCustom::SetAnnotationsInFullSet
virtual void SetAnnotationsInFullSet(vtkAbstractArray *values, vtkStringArray *annotations)
Definition: vtkDiscretizableColorTransferFunctionCustom.cpp:59
vtkDiscretizableColorTransferFunctionCustom::SetNumberOfIndexedColorsInFullSet
void SetNumberOfIndexedColorsInFullSet(int n)
Definition: vtkDiscretizableColorTransferFunctionCustom.cpp:184
vtkDiscretizableColorTransferFunctionCustom::SetAnnotationInFullSet
virtual vtkIdType SetAnnotationInFullSet(vtkVariant value, std::string annotation)
Definition: vtkDiscretizableColorTransferFunctionCustom.cpp:109
vtkDiscretizableColorTransferFunctionCustom::GetIndexedOpacityInFullSet
void GetIndexedOpacityInFullSet(unsigned int index, double *alpha)
Definition: vtkDiscretizableColorTransferFunctionCustom.cpp:276
color
math::float4 color
Definition: LineSetBuffers.cpp:46
qPCL.h
vtkDiscretizableColorTransferFunctionCustom::SetIndexedColorInFullSet
void SetIndexedColorInFullSet(unsigned int index, double r, double g, double b)
Definition: vtkDiscretizableColorTransferFunctionCustom.cpp:199
vtkDiscretizableColorTransferFunctionCustom::vtkDiscretizableColorTransferFunctionCustom
vtkDiscretizableColorTransferFunctionCustom()
Definition: vtkDiscretizableColorTransferFunctionCustom.cpp:21
vtkDiscretizableColorTransferFunctionCustom::~vtkDiscretizableColorTransferFunctionCustom
~vtkDiscretizableColorTransferFunctionCustom() override
Definition: vtkDiscretizableColorTransferFunctionCustom.cpp:36
vtkDiscretizableColorTransferFunctionCustom::SetNumberOfIndexedOpacitiesInFullSet
void SetNumberOfIndexedOpacitiesInFullSet(int n)
Definition: vtkDiscretizableColorTransferFunctionCustom.cpp:238
vtkDiscretizableColorTransferFunctionCustom.h
vtkDiscretizableColorTransferFunctionCustom::GetIndexedColorInFullSet
void GetIndexedColorInFullSet(unsigned int index, double rgb[3])
Definition: vtkDiscretizableColorTransferFunctionCustom.cpp:225
vtkDiscretizableColorTransferFunctionCustom::GetNumberOfIndexedColorsInFullSet
int GetNumberOfIndexedColorsInFullSet()
Definition: vtkDiscretizableColorTransferFunctionCustom.cpp:220
vtkDiscretizableColorTransferFunctionCustom::Build
void Build() override
Definition: vtkDiscretizableColorTransferFunctionCustom.cpp:289
vtkDiscretizableColorTransferFunctionCustom::ResetAnnotationsInFullSet
virtual void ResetAnnotationsInFullSet()
Definition: vtkDiscretizableColorTransferFunctionCustom.cpp:154
vtkDiscretizableColorTransferFunctionCustom::ResetActiveAnnotatedValues
void ResetActiveAnnotatedValues()
Definition: vtkDiscretizableColorTransferFunctionCustom.cpp:168
vtkDiscretizableColorTransferFunctionCustom::SetActiveAnnotatedValue
void SetActiveAnnotatedValue(std::string value)
Definition: vtkDiscretizableColorTransferFunctionCustom.cpp:176
vtkDiscretizableColorTransferFunctionCustom
Definition: vtkDiscretizableColorTransferFunctionCustom.h:17
QPCL_ENGINE_LIB_API
#define QPCL_ENGINE_LIB_API
Definition: qPCL.h:15
vtkDiscretizableColorTransferFunctionCustom::SetIndexedColorRGB
void SetIndexedColorRGB(unsigned int index, const double rgb[3])
Definition: vtkDiscretizableColorTransferFunctionCustom.h:48
vtkDiscretizableColorTransferFunctionCustom::SetIndexedOpacityInFullSet
void SetIndexedOpacityInFullSet(unsigned int index, double alpha)
Definition: vtkDiscretizableColorTransferFunctionCustom.cpp:251
vtkDiscretizableColorTransferFunctionCustom::SetIndexedColorRGBA
void SetIndexedColorRGBA(unsigned int index, const double rgba[4])
Definition: vtkDiscretizableColorTransferFunctionCustom.h:51
vtkDiscretizableColorTransferFunctionCustom::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Definition: vtkDiscretizableColorTransferFunctionCustom.cpp:346
vtkStandardNewMacro
vtkStandardNewMacro(vtkDiscretizableColorTransferFunctionCustom)
vtkDiscretizableColorTransferFunctionCustom::GetNumberOfIndexedOpacitiesInFullSet
int GetNumberOfIndexedOpacitiesInFullSet()
Definition: vtkDiscretizableColorTransferFunctionCustom.cpp:270