VTK  9.3.20240327
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
128 #ifndef vtkImageProperty_h
129 #define vtkImageProperty_h
130 
131 #include "vtkObject.h"
132 #include "vtkRenderingCoreModule.h" // For export macro
133 
134 VTK_ABI_NAMESPACE_BEGIN
135 class vtkScalarsToColors;
136 
137 class VTKRENDERINGCORE_EXPORT vtkImageProperty : public vtkObject
138 {
139 public:
140  vtkTypeMacro(vtkImageProperty, vtkObject);
141  void PrintSelf(ostream& os, vtkIndent indent) override;
142 
147 
152 
154 
157  vtkSetMacro(ColorWindow, double);
158  vtkGetMacro(ColorWindow, double);
160 
162 
165  vtkSetMacro(ColorLevel, double);
166  vtkGetMacro(ColorLevel, double);
168 
170 
175  virtual void SetLookupTable(vtkScalarsToColors* lut);
176  vtkGetObjectMacro(LookupTable, vtkScalarsToColors);
178 
180 
185  vtkSetMacro(UseLookupTableScalarRange, vtkTypeBool);
186  vtkGetMacro(UseLookupTableScalarRange, vtkTypeBool);
187  vtkBooleanMacro(UseLookupTableScalarRange, vtkTypeBool);
189 
191 
197  vtkSetClampMacro(Opacity, double, 0.0, 1.0);
198  vtkGetMacro(Opacity, double);
200 
202 
205  vtkSetClampMacro(Ambient, double, 0.0, 1.0);
206  vtkGetMacro(Ambient, double);
208 
210 
213  vtkSetClampMacro(Diffuse, double, 0.0, 1.0);
214  vtkGetMacro(Diffuse, double);
216 
218 
221  vtkSetClampMacro(InterpolationType, int, VTK_NEAREST_INTERPOLATION, VTK_CUBIC_INTERPOLATION);
222  vtkGetMacro(InterpolationType, int);
223  void SetInterpolationTypeToNearest() { this->SetInterpolationType(VTK_NEAREST_INTERPOLATION); }
224  void SetInterpolationTypeToLinear() { this->SetInterpolationType(VTK_LINEAR_INTERPOLATION); }
225  void SetInterpolationTypeToCubic() { this->SetInterpolationType(VTK_CUBIC_INTERPOLATION); }
226  virtual const char* GetInterpolationTypeAsString();
228 
230 
234  vtkSetMacro(LayerNumber, int);
235  int GetLayerNumber() { return this->LayerNumber; }
237 
239 
243  vtkSetMacro(Checkerboard, vtkTypeBool);
244  vtkBooleanMacro(Checkerboard, vtkTypeBool);
245  vtkGetMacro(Checkerboard, vtkTypeBool);
247 
249 
252  vtkSetVector2Macro(CheckerboardSpacing, double);
253  vtkGetVector2Macro(CheckerboardSpacing, double);
255 
257 
261  vtkSetVector2Macro(CheckerboardOffset, double);
262  vtkGetVector2Macro(CheckerboardOffset, double);
264 
266 
272  vtkSetMacro(Backing, vtkTypeBool);
273  vtkBooleanMacro(Backing, vtkTypeBool);
274  vtkGetMacro(Backing, vtkTypeBool);
276 
278 
281  vtkSetVector3Macro(BackingColor, double);
282  vtkGetVector3Macro(BackingColor, double);
284 
289  vtkMTimeType GetMTime() override;
290 
291 protected:
293  ~vtkImageProperty() override;
294 
296  double ColorWindow;
297  double ColorLevel;
301  double Opacity;
302  double Ambient;
303  double Diffuse;
305  double CheckerboardSpacing[2];
306  double CheckerboardOffset[2];
308  double BackingColor[3];
309 
310 private:
311  vtkImageProperty(const vtkImageProperty&) = delete;
312  void operator=(const vtkImageProperty&) = delete;
313 };
314 
315 VTK_ABI_NAMESPACE_END
316 #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:108
abstract base class for most VTK objects
Definition: vtkObject.h:161
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