VTK  9.0.2
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 =========================================================================*/
28 #ifndef vtkImageProperty_h
29 #define vtkImageProperty_h
30 
31 #include "vtkObject.h"
32 #include "vtkRenderingCoreModule.h" // For export macro
33 
34 class vtkScalarsToColors;
35 
36 class VTKRENDERINGCORE_EXPORT vtkImageProperty : public vtkObject
37 {
38 public:
39  vtkTypeMacro(vtkImageProperty, vtkObject);
40  void PrintSelf(ostream& os, vtkIndent indent) override;
41 
45  static vtkImageProperty* New();
46 
51 
53 
56  vtkSetMacro(ColorWindow, double);
57  vtkGetMacro(ColorWindow, double);
59 
61 
64  vtkSetMacro(ColorLevel, double);
65  vtkGetMacro(ColorLevel, double);
67 
69 
74  virtual void SetLookupTable(vtkScalarsToColors* lut);
75  vtkGetObjectMacro(LookupTable, vtkScalarsToColors);
77 
79 
84  vtkSetMacro(UseLookupTableScalarRange, vtkTypeBool);
85  vtkGetMacro(UseLookupTableScalarRange, vtkTypeBool);
86  vtkBooleanMacro(UseLookupTableScalarRange, vtkTypeBool);
88 
90 
96  vtkSetClampMacro(Opacity, double, 0.0, 1.0);
97  vtkGetMacro(Opacity, double);
99 
101 
104  vtkSetClampMacro(Ambient, double, 0.0, 1.0);
105  vtkGetMacro(Ambient, double);
107 
109 
112  vtkSetClampMacro(Diffuse, double, 0.0, 1.0);
113  vtkGetMacro(Diffuse, double);
115 
117 
120  vtkSetClampMacro(InterpolationType, int, VTK_NEAREST_INTERPOLATION, VTK_CUBIC_INTERPOLATION);
121  vtkGetMacro(InterpolationType, int);
122  void SetInterpolationTypeToNearest() { this->SetInterpolationType(VTK_NEAREST_INTERPOLATION); }
123  void SetInterpolationTypeToLinear() { this->SetInterpolationType(VTK_LINEAR_INTERPOLATION); }
124  void SetInterpolationTypeToCubic() { this->SetInterpolationType(VTK_CUBIC_INTERPOLATION); }
125  virtual const char* GetInterpolationTypeAsString();
127 
129 
133  vtkSetMacro(LayerNumber, int);
134  int GetLayerNumber() { return this->LayerNumber; }
136 
138 
142  vtkSetMacro(Checkerboard, vtkTypeBool);
143  vtkBooleanMacro(Checkerboard, vtkTypeBool);
144  vtkGetMacro(Checkerboard, vtkTypeBool);
146 
148 
151  vtkSetVector2Macro(CheckerboardSpacing, double);
152  vtkGetVector2Macro(CheckerboardSpacing, double);
154 
156 
160  vtkSetVector2Macro(CheckerboardOffset, double);
161  vtkGetVector2Macro(CheckerboardOffset, double);
163 
165 
171  vtkSetMacro(Backing, vtkTypeBool);
172  vtkBooleanMacro(Backing, vtkTypeBool);
173  vtkGetMacro(Backing, vtkTypeBool);
175 
177 
180  vtkSetVector3Macro(BackingColor, double);
181  vtkGetVector3Macro(BackingColor, double);
183 
188  vtkMTimeType GetMTime() override;
189 
190 protected:
192  ~vtkImageProperty() override;
193 
195  double ColorWindow;
196  double ColorLevel;
200  double Opacity;
201  double Ambient;
202  double Diffuse;
204  double CheckerboardSpacing[2];
205  double CheckerboardOffset[2];
207  double BackingColor[3];
208 
209 private:
210  vtkImageProperty(const vtkImageProperty&) = delete;
211  void operator=(const vtkImageProperty&) = delete;
212 };
213 
214 #endif
image display properties
vtkTypeBool Checkerboard
void DeepCopy(vtkImageProperty *p)
Assign one property to another.
virtual const char * GetInterpolationTypeAsString()
static vtkImageProperty * New()
Construct a property with no lookup table.
virtual void SetLookupTable(vtkScalarsToColors *lut)
Specify a lookup table for the data.
void SetInterpolationTypeToLinear()
vtkScalarsToColors * LookupTable
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkImageProperty() override
vtkTypeBool UseLookupTableScalarRange
vtkMTimeType GetMTime() override
Get the MTime for this property.
void SetInterpolationTypeToCubic()
void SetInterpolationTypeToNearest()
a simple class to control print indentation
Definition: vtkIndent.h:34
abstract base class for most VTK objects
Definition: vtkObject.h:63
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:293