-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvtkIndependentOpacityScalarsToColors.h
83 lines (64 loc) · 3.02 KB
/
vtkIndependentOpacityScalarsToColors.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/*=========================================================================
Name: vtkIndependentOpacityScalarsToColors.h
Author: David Borland, The Renaissance Computing Institute (RENCI)
Copyright: The Renaissance Computing Institute (RENCI)
License: Licensed under the RENCI Open Source Software License v. 1.0.
See included License.txt or
http://www.renci.org/resources/open-source-software-license
for details.
=========================================================================*/
// .NAME vtkIndependentOpacityScalarsToColors
// .SECTION Description
// vtkIndependentOpacityScalarsToColors assumes a two-component data
// array. The first component is mapped to rgb color via the supplied
// lookup table (opacity is ignored), and the second component is mapped
// to opacity via another lookup table (rgb is ignored).
//
// .SECTION see also
// vtkMergeFields
#ifndef __vtkIndependentOpacityScalarsToColors
#define __vtkIndependentOpacityScalarsToColors
#include "vtkMolConfigure.h"
#include "vtkScalarsToColors.h"
class VTK_MOL_EXPORT vtkIndependentOpacityScalarsToColors : public vtkScalarsToColors
{
public:
vtkTypeRevisionMacro(vtkIndependentOpacityScalarsToColors,vtkScalarsToColors);
void PrintSelf(ostream& os, vtkIndent indent);
static vtkIndependentOpacityScalarsToColors *New();
// Description:
// Set/get the separate lookup tables to use for rgb and opacity
vtkSetObjectMacro(ColorLookupTable,vtkScalarsToColors);
vtkGetObjectMacro(ColorLookupTable,vtkScalarsToColors);
vtkSetObjectMacro(OpacityLookupTable,vtkScalarsToColors);
vtkGetObjectMacro(OpacityLookupTable,vtkScalarsToColors);
// Description:
// Implement parent-class methods
virtual double* GetRange();
virtual void SetRange(double min, double max);
virtual unsigned char* MapValue(double v);
virtual void GetColor(double v, double rgb[3]);
virtual double GetOpacity(double v);
// Description:
// Build the member lookup tables
virtual void Build();
// Description:
// An internal method maps a data array into a 4-component, unsigned char
// RGBA array, using one component for rgb, and the other for alpha.
virtual vtkUnsignedCharArray* MapScalars(vtkDataArray* scalars, int colorMode,
int component);
// Description:
// An internal method typically not used in applications.
virtual void MapScalarsThroughTable2(void* input, unsigned char* output,
int inputDataType, int numberOfValues,
int inputIncrement, int outputFormat);
protected:
vtkIndependentOpacityScalarsToColors();
~vtkIndependentOpacityScalarsToColors();
vtkScalarsToColors* ColorLookupTable;
vtkScalarsToColors* OpacityLookupTable;
private:
vtkIndependentOpacityScalarsToColors(const vtkIndependentOpacityScalarsToColors&); // Not implemented.
void operator=(const vtkIndependentOpacityScalarsToColors&); // Not implemented.
};
#endif