VTK
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 "vtkRenderingCoreModule.h" // For export macro
32 #include "vtkObject.h"
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 
50  void DeepCopy(vtkImageProperty *p);
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,
122  vtkGetMacro(InterpolationType, int);
124  this->SetInterpolationType(VTK_NEAREST_INTERPOLATION); };
126  this->SetInterpolationType(VTK_LINEAR_INTERPOLATION); };
128  this->SetInterpolationType(VTK_CUBIC_INTERPOLATION); };
129  virtual const char *GetInterpolationTypeAsString();
131 
133 
137  vtkSetMacro(LayerNumber, int);
139  { return this->LayerNumber; }
141 
143 
147  vtkSetMacro(Checkerboard, vtkTypeBool);
148  vtkBooleanMacro(Checkerboard, vtkTypeBool);
149  vtkGetMacro(Checkerboard, vtkTypeBool);
151 
153 
156  vtkSetVector2Macro(CheckerboardSpacing, double);
157  vtkGetVector2Macro(CheckerboardSpacing, double);
159 
161 
165  vtkSetVector2Macro(CheckerboardOffset, double);
166  vtkGetVector2Macro(CheckerboardOffset, double);
168 
170 
176  vtkSetMacro(Backing, vtkTypeBool);
177  vtkBooleanMacro(Backing, vtkTypeBool);
178  vtkGetMacro(Backing, vtkTypeBool);
180 
182 
185  vtkSetVector3Macro(BackingColor, double);
186  vtkGetVector3Macro(BackingColor, double);
188 
193  vtkMTimeType GetMTime() override;
194 
195 protected:
197  ~vtkImageProperty() override;
198 
200  double ColorWindow;
201  double ColorLevel;
205  double Opacity;
206  double Ambient;
207  double Diffuse;
209  double CheckerboardSpacing[2];
210  double CheckerboardOffset[2];
212  double BackingColor[3];
213 
214 private:
215  vtkImageProperty(const vtkImageProperty&) = delete;
216  void operator=(const vtkImageProperty&) = delete;
217 };
218 
219 #endif
vtkScalarsToColors * LookupTable
int GetLayerNumber()
Set the layer number.
abstract base class for most VTK objects
Definition: vtkObject.h:53
void SetInterpolationTypeToCubic()
The interpolation type (default: nearest neighbor).
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302
#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:33
virtual vtkMTimeType GetMTime()
Return this object's modified time.
vtkTypeBool Checkerboard
vtkTypeBool UseLookupTableScalarRange
void SetInterpolationTypeToLinear()
The interpolation type (default: nearest neighbor).
void SetInterpolationTypeToNearest()
The interpolation type (default: nearest neighbor).
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
#define VTK_NEAREST_INTERPOLATION