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 "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 
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, 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
vtkImageProperty::ColorWindow
double ColorWindow
Definition: vtkImageProperty.h:195
vtkImageProperty::UseLookupTableScalarRange
vtkTypeBool UseLookupTableScalarRange
Definition: vtkImageProperty.h:197
vtkImageProperty::Checkerboard
vtkTypeBool Checkerboard
Definition: vtkImageProperty.h:203
vtkImageProperty::ColorLevel
double ColorLevel
Definition: vtkImageProperty.h:196
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:53
VTK_CUBIC_INTERPOLATION
#define VTK_CUBIC_INTERPOLATION
Definition: vtkSystemIncludes.h:96
vtkImageProperty::Opacity
double Opacity
Definition: vtkImageProperty.h:200
VTK_NEAREST_INTERPOLATION
#define VTK_NEAREST_INTERPOLATION
Definition: vtkSystemIncludes.h:94
vtkImageProperty::GetLayerNumber
int GetLayerNumber()
Definition: vtkImageProperty.h:134
vtkImageProperty::Diffuse
double Diffuse
Definition: vtkImageProperty.h:202
vtkImageProperty::Backing
vtkTypeBool Backing
Definition: vtkImageProperty.h:206
vtkImageProperty::LayerNumber
int LayerNumber
Definition: vtkImageProperty.h:199
vtkImageProperty
image display properties
Definition: vtkImageProperty.h:36
vtkImageProperty::SetInterpolationTypeToLinear
void SetInterpolationTypeToLinear()
Definition: vtkImageProperty.h:123
vtkObject::GetMTime
virtual vtkMTimeType GetMTime()
Return this object's modified time.
vtkImageProperty::SetInterpolationTypeToNearest
void SetInterpolationTypeToNearest()
Definition: vtkImageProperty.h:122
vtkImageProperty::SetInterpolationTypeToCubic
void SetInterpolationTypeToCubic()
Definition: vtkImageProperty.h:124
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkImageProperty::LookupTable
vtkScalarsToColors * LookupTable
Definition: vtkImageProperty.h:194
VTK_LINEAR_INTERPOLATION
#define VTK_LINEAR_INTERPOLATION
Definition: vtkSystemIncludes.h:95
vtkObject::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkScalarsToColors
Superclass for mapping scalar values to colors.
Definition: vtkScalarsToColors.h:59
vtkObject.h
vtkImageProperty::Ambient
double Ambient
Definition: vtkImageProperty.h:201
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkImageProperty::InterpolationType
int InterpolationType
Definition: vtkImageProperty.h:198
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:298