VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkImageProperty.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00033 #ifndef __vtkImageProperty_h 00034 #define __vtkImageProperty_h 00035 00036 #include "vtkRenderingCoreModule.h" // For export macro 00037 #include "vtkObject.h" 00038 00039 class vtkScalarsToColors; 00040 00041 class VTKRENDERINGCORE_EXPORT vtkImageProperty : public vtkObject 00042 { 00043 public: 00044 vtkTypeMacro(vtkImageProperty,vtkObject); 00045 void PrintSelf(ostream& os, vtkIndent indent); 00046 00048 static vtkImageProperty *New(); 00049 00051 void DeepCopy(vtkImageProperty *p); 00052 00054 00055 vtkSetMacro(ColorWindow, double); 00056 vtkGetMacro(ColorWindow, double); 00058 00060 00061 vtkSetMacro(ColorLevel, double); 00062 vtkGetMacro(ColorLevel, double); 00064 00066 00069 virtual void SetLookupTable(vtkScalarsToColors *lut); 00070 vtkGetObjectMacro(LookupTable, vtkScalarsToColors); 00072 00074 00076 vtkSetMacro(UseLookupTableScalarRange, int); 00077 vtkGetMacro(UseLookupTableScalarRange, int); 00078 vtkBooleanMacro(UseLookupTableScalarRange, int); 00080 00082 00085 vtkSetClampMacro(Opacity, double, 0.0, 1.0); 00086 vtkGetMacro(Opacity, double); 00088 00090 00091 vtkSetClampMacro(Ambient, double, 0.0, 1.0); 00092 vtkGetMacro(Ambient, double); 00094 00096 00097 vtkSetClampMacro(Diffuse, double, 0.0, 1.0); 00098 vtkGetMacro(Diffuse, double); 00100 00102 00103 vtkSetClampMacro(InterpolationType, int, 00104 VTK_NEAREST_INTERPOLATION, VTK_CUBIC_INTERPOLATION); 00105 vtkGetMacro(InterpolationType, int); 00106 void SetInterpolationTypeToNearest() { 00107 this->SetInterpolationType(VTK_NEAREST_INTERPOLATION); }; 00108 void SetInterpolationTypeToLinear() { 00109 this->SetInterpolationType(VTK_LINEAR_INTERPOLATION); }; 00110 void SetInterpolationTypeToCubic() { 00111 this->SetInterpolationType(VTK_CUBIC_INTERPOLATION); }; 00112 virtual const char *GetInterpolationTypeAsString(); 00114 00116 00118 vtkSetMacro(LayerNumber, int); 00119 int GetLayerNumber() 00120 { return this->LayerNumber; } 00122 00124 00126 vtkSetMacro(Checkerboard, int); 00127 vtkBooleanMacro(Checkerboard, int); 00128 vtkGetMacro(Checkerboard, int); 00130 00132 00133 vtkSetVector2Macro(CheckerboardSpacing, double); 00134 vtkGetVector2Macro(CheckerboardSpacing, double); 00136 00138 00140 vtkSetVector2Macro(CheckerboardOffset, double); 00141 vtkGetVector2Macro(CheckerboardOffset, double); 00143 00145 00149 vtkSetMacro(Backing, int); 00150 vtkBooleanMacro(Backing, int); 00151 vtkGetMacro(Backing, int); 00153 00155 00156 vtkSetVector3Macro(BackingColor, double); 00157 vtkGetVector3Macro(BackingColor, double); 00159 00162 unsigned long GetMTime(); 00163 00164 protected: 00165 vtkImageProperty(); 00166 ~vtkImageProperty(); 00167 00168 vtkScalarsToColors *LookupTable; 00169 double ColorWindow; 00170 double ColorLevel; 00171 int UseLookupTableScalarRange; 00172 int InterpolationType; 00173 int LayerNumber; 00174 double Opacity; 00175 double Ambient; 00176 double Diffuse; 00177 int Checkerboard; 00178 double CheckerboardSpacing[2]; 00179 double CheckerboardOffset[2]; 00180 int Backing; 00181 double BackingColor[3]; 00182 00183 private: 00184 vtkImageProperty(const vtkImageProperty&); // Not implemented. 00185 void operator=(const vtkImageProperty&); // Not implemented. 00186 }; 00187 00188 #endif