VTK  9.3.0
vtkImageProperty.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
28 #ifndef vtkImageProperty_h
29 #define vtkImageProperty_h
30 
31 #include "vtkObject.h"
32 #include "vtkRenderingCoreModule.h" // For export macro
33 
34 VTK_ABI_NAMESPACE_BEGIN
35 class vtkScalarsToColors;
36 
37 class VTKRENDERINGCORE_EXPORT vtkImageProperty : public vtkObject
38 {
39 public:
40  vtkTypeMacro(vtkImageProperty, vtkObject);
41  void PrintSelf(ostream& os, vtkIndent indent) override;
42 
46  static vtkImageProperty* New();
47 
52 
54 
57  vtkSetMacro(ColorWindow, double);
58  vtkGetMacro(ColorWindow, double);
60 
62 
65  vtkSetMacro(ColorLevel, double);
66  vtkGetMacro(ColorLevel, double);
68 
70 
75  virtual void SetLookupTable(vtkScalarsToColors* lut);
76  vtkGetObjectMacro(LookupTable, vtkScalarsToColors);
78 
80 
85  vtkSetMacro(UseLookupTableScalarRange, vtkTypeBool);
86  vtkGetMacro(UseLookupTableScalarRange, vtkTypeBool);
87  vtkBooleanMacro(UseLookupTableScalarRange, vtkTypeBool);
89 
91 
97  vtkSetClampMacro(Opacity, double, 0.0, 1.0);
98  vtkGetMacro(Opacity, double);
100 
102 
105  vtkSetClampMacro(Ambient, double, 0.0, 1.0);
106  vtkGetMacro(Ambient, double);
108 
110 
113  vtkSetClampMacro(Diffuse, double, 0.0, 1.0);
114  vtkGetMacro(Diffuse, double);
116 
118 
121  vtkSetClampMacro(InterpolationType, int, VTK_NEAREST_INTERPOLATION, VTK_CUBIC_INTERPOLATION);
122  vtkGetMacro(InterpolationType, int);
123  void SetInterpolationTypeToNearest() { this->SetInterpolationType(VTK_NEAREST_INTERPOLATION); }
124  void SetInterpolationTypeToLinear() { this->SetInterpolationType(VTK_LINEAR_INTERPOLATION); }
125  void SetInterpolationTypeToCubic() { this->SetInterpolationType(VTK_CUBIC_INTERPOLATION); }
126  virtual const char* GetInterpolationTypeAsString();
128 
130 
134  vtkSetMacro(LayerNumber, int);
135  int GetLayerNumber() { return this->LayerNumber; }
137 
139 
143  vtkSetMacro(Checkerboard, vtkTypeBool);
144  vtkBooleanMacro(Checkerboard, vtkTypeBool);
145  vtkGetMacro(Checkerboard, vtkTypeBool);
147 
149 
152  vtkSetVector2Macro(CheckerboardSpacing, double);
153  vtkGetVector2Macro(CheckerboardSpacing, double);
155 
157 
161  vtkSetVector2Macro(CheckerboardOffset, double);
162  vtkGetVector2Macro(CheckerboardOffset, double);
164 
166 
172  vtkSetMacro(Backing, vtkTypeBool);
173  vtkBooleanMacro(Backing, vtkTypeBool);
174  vtkGetMacro(Backing, vtkTypeBool);
176 
178 
181  vtkSetVector3Macro(BackingColor, double);
182  vtkGetVector3Macro(BackingColor, double);
184 
189  vtkMTimeType GetMTime() override;
190 
191 protected:
193  ~vtkImageProperty() override;
194 
196  double ColorWindow;
197  double ColorLevel;
201  double Opacity;
202  double Ambient;
203  double Diffuse;
205  double CheckerboardSpacing[2];
206  double CheckerboardOffset[2];
208  double BackingColor[3];
209 
210 private:
211  vtkImageProperty(const vtkImageProperty&) = delete;
212  void operator=(const vtkImageProperty&) = delete;
213 };
214 
215 VTK_ABI_NAMESPACE_END
216 #endif
image display properties
vtkTypeBool Checkerboard
void DeepCopy(vtkImageProperty *p)
Assign one property to another.
virtual const char * GetInterpolationTypeAsString()
The interpolation type (default: VTK_LINEAR_INTERPOLATION).
static vtkImageProperty * New()
Construct a property with no lookup table.
virtual void SetLookupTable(vtkScalarsToColors *lut)
Specify a lookup table for the data.
void SetInterpolationTypeToLinear()
The interpolation type (default: VTK_LINEAR_INTERPOLATION).
vtkScalarsToColors * LookupTable
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int GetLayerNumber()
Set the layer number.
~vtkImageProperty() override
vtkTypeBool UseLookupTableScalarRange
vtkMTimeType GetMTime() override
Get the MTime for this property.
void SetInterpolationTypeToCubic()
The interpolation type (default: VTK_LINEAR_INTERPOLATION).
void SetInterpolationTypeToNearest()
The interpolation type (default: VTK_LINEAR_INTERPOLATION).
a simple class to control print indentation
Definition: vtkIndent.h:38
abstract base class for most VTK objects
Definition: vtkObject.h:61
Superclass for mapping scalar values to colors.
int vtkTypeBool
Definition: vtkABI.h:64
#define VTK_CUBIC_INTERPOLATION
#define VTK_NEAREST_INTERPOLATION
#define VTK_LINEAR_INTERPOLATION
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270