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 =========================================================================*/
31 #ifndef vtkImageProperty_h
32 #define vtkImageProperty_h
33 
34 #include "vtkObject.h"
35 #include "vtkRenderingCoreModule.h" // For export macro
36 
37 class vtkScalarsToColors;
38 
39 class VTKRENDERINGCORE_EXPORT vtkImageProperty : public vtkObject
40 {
41 public:
42  vtkTypeMacro(vtkImageProperty, vtkObject);
43  void PrintSelf(ostream& os, vtkIndent indent) override;
44 
48  static vtkImageProperty* New();
49 
53  void DeepCopy(vtkImageProperty* p);
54 
56 
59  vtkSetMacro(ColorWindow, double);
60  vtkGetMacro(ColorWindow, double);
62 
64 
67  vtkSetMacro(ColorLevel, double);
68  vtkGetMacro(ColorLevel, double);
70 
72 
77  virtual void SetLookupTable(vtkScalarsToColors* lut);
78  vtkGetObjectMacro(LookupTable, vtkScalarsToColors);
80 
82 
87  vtkSetMacro(UseLookupTableScalarRange, vtkTypeBool);
88  vtkGetMacro(UseLookupTableScalarRange, vtkTypeBool);
89  vtkBooleanMacro(UseLookupTableScalarRange, vtkTypeBool);
91 
93 
99  vtkSetClampMacro(Opacity, double, 0.0, 1.0);
100  vtkGetMacro(Opacity, double);
102 
104 
107  vtkSetClampMacro(Ambient, double, 0.0, 1.0);
108  vtkGetMacro(Ambient, double);
110 
112 
115  vtkSetClampMacro(Diffuse, double, 0.0, 1.0);
116  vtkGetMacro(Diffuse, double);
118 
120 
123  vtkSetClampMacro(InterpolationType, int, VTK_NEAREST_INTERPOLATION, VTK_CUBIC_INTERPOLATION);
124  vtkGetMacro(InterpolationType, int);
125  void SetInterpolationTypeToNearest() { this->SetInterpolationType(VTK_NEAREST_INTERPOLATION); }
126  void SetInterpolationTypeToLinear() { this->SetInterpolationType(VTK_LINEAR_INTERPOLATION); }
127  void SetInterpolationTypeToCubic() { this->SetInterpolationType(VTK_CUBIC_INTERPOLATION); }
128  virtual const char* GetInterpolationTypeAsString();
130 
132 
136  vtkSetMacro(LayerNumber, int);
137  int GetLayerNumber() { return this->LayerNumber; }
139 
141 
145  vtkSetMacro(Checkerboard, vtkTypeBool);
146  vtkBooleanMacro(Checkerboard, vtkTypeBool);
147  vtkGetMacro(Checkerboard, vtkTypeBool);
149 
151 
154  vtkSetVector2Macro(CheckerboardSpacing, double);
155  vtkGetVector2Macro(CheckerboardSpacing, double);
157 
159 
163  vtkSetVector2Macro(CheckerboardOffset, double);
164  vtkGetVector2Macro(CheckerboardOffset, double);
166 
168 
174  vtkSetMacro(Backing, vtkTypeBool);
175  vtkBooleanMacro(Backing, vtkTypeBool);
176  vtkGetMacro(Backing, vtkTypeBool);
178 
180 
183  vtkSetVector3Macro(BackingColor, double);
184  vtkGetVector3Macro(BackingColor, double);
186 
191  vtkMTimeType GetMTime() override;
192 
193 protected:
195  ~vtkImageProperty() override;
196 
198  double ColorWindow;
199  double ColorLevel;
203  double Opacity;
204  double Ambient;
205  double Diffuse;
207  double CheckerboardSpacing[2];
208  double CheckerboardOffset[2];
210  double BackingColor[3];
211 
212 private:
213  vtkImageProperty(const vtkImageProperty&) = delete;
214  void operator=(const vtkImageProperty&) = delete;
215 };
216 
217 #endif
vtkScalarsToColors * LookupTable
int GetLayerNumber()
Set the layer number.
abstract base class for most VTK objects
Definition: vtkObject.h:62
void SetInterpolationTypeToCubic()
The interpolation type (default: VTK_LINEAR_INTERPOLATION).
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287
#define VTK_LINEAR_INTERPOLATION
image display properties
#define VTK_CUBIC_INTERPOLATION
int vtkTypeBool
Definition: vtkABI.h:69
Superclass for mapping scalar values to colors.
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual vtkMTimeType GetMTime()
Return this object's modified time.
vtkTypeBool Checkerboard
vtkTypeBool UseLookupTableScalarRange
void SetInterpolationTypeToLinear()
The interpolation type (default: VTK_LINEAR_INTERPOLATION).
void SetInterpolationTypeToNearest()
The interpolation type (default: VTK_LINEAR_INTERPOLATION).
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
#define VTK_NEAREST_INTERPOLATION