VTK  9.2.6
vtkImageProperty.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImageProperty.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm 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 =========================================================================*/
40 #ifndef vtkImageProperty_h
41 #define vtkImageProperty_h
42 
43 #include "vtkObject.h"
44 #include "vtkRenderingCoreModule.h" // For export macro
45 
46 class vtkScalarsToColors;
47 
48 class VTKRENDERINGCORE_EXPORT vtkImageProperty : public vtkObject
49 {
50 public:
51  vtkTypeMacro(vtkImageProperty, vtkObject);
52  void PrintSelf(ostream& os, vtkIndent indent) override;
53 
57  static vtkImageProperty* New();
58 
63 
65 
68  vtkSetMacro(ColorWindow, double);
69  vtkGetMacro(ColorWindow, double);
71 
73 
76  vtkSetMacro(ColorLevel, double);
77  vtkGetMacro(ColorLevel, double);
79 
81 
86  virtual void SetLookupTable(vtkScalarsToColors* lut);
87  vtkGetObjectMacro(LookupTable, vtkScalarsToColors);
89 
91 
96  vtkSetMacro(UseLookupTableScalarRange, vtkTypeBool);
97  vtkGetMacro(UseLookupTableScalarRange, vtkTypeBool);
98  vtkBooleanMacro(UseLookupTableScalarRange, vtkTypeBool);
100 
102 
108  vtkSetClampMacro(Opacity, double, 0.0, 1.0);
109  vtkGetMacro(Opacity, double);
111 
113 
116  vtkSetClampMacro(Ambient, double, 0.0, 1.0);
117  vtkGetMacro(Ambient, double);
119 
121 
124  vtkSetClampMacro(Diffuse, double, 0.0, 1.0);
125  vtkGetMacro(Diffuse, double);
127 
129 
132  vtkSetClampMacro(InterpolationType, int, VTK_NEAREST_INTERPOLATION, VTK_CUBIC_INTERPOLATION);
133  vtkGetMacro(InterpolationType, int);
134  void SetInterpolationTypeToNearest() { this->SetInterpolationType(VTK_NEAREST_INTERPOLATION); }
135  void SetInterpolationTypeToLinear() { this->SetInterpolationType(VTK_LINEAR_INTERPOLATION); }
136  void SetInterpolationTypeToCubic() { this->SetInterpolationType(VTK_CUBIC_INTERPOLATION); }
137  virtual const char* GetInterpolationTypeAsString();
139 
141 
145  vtkSetMacro(LayerNumber, int);
146  int GetLayerNumber() { return this->LayerNumber; }
148 
150 
154  vtkSetMacro(Checkerboard, vtkTypeBool);
155  vtkBooleanMacro(Checkerboard, vtkTypeBool);
156  vtkGetMacro(Checkerboard, vtkTypeBool);
158 
160 
163  vtkSetVector2Macro(CheckerboardSpacing, double);
164  vtkGetVector2Macro(CheckerboardSpacing, double);
166 
168 
172  vtkSetVector2Macro(CheckerboardOffset, double);
173  vtkGetVector2Macro(CheckerboardOffset, double);
175 
177 
183  vtkSetMacro(Backing, vtkTypeBool);
184  vtkBooleanMacro(Backing, vtkTypeBool);
185  vtkGetMacro(Backing, vtkTypeBool);
187 
189 
192  vtkSetVector3Macro(BackingColor, double);
193  vtkGetVector3Macro(BackingColor, double);
195 
200  vtkMTimeType GetMTime() override;
201 
202 protected:
204  ~vtkImageProperty() override;
205 
207  double ColorWindow;
208  double ColorLevel;
212  double Opacity;
213  double Ambient;
214  double Diffuse;
216  double CheckerboardSpacing[2];
217  double CheckerboardOffset[2];
219  double BackingColor[3];
220 
221 private:
222  vtkImageProperty(const vtkImageProperty&) = delete;
223  void operator=(const vtkImageProperty&) = delete;
224 };
225 
226 #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:49
abstract base class for most VTK objects
Definition: vtkObject.h:72
Superclass for mapping scalar values to colors.
int vtkTypeBool
Definition: vtkABI.h:69
#define VTK_CUBIC_INTERPOLATION
#define VTK_NEAREST_INTERPOLATION
#define VTK_LINEAR_INTERPOLATION
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287