VTK
dox/Rendering/vtkImageProperty.h
Go to the documentation of this file.
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 "vtkObject.h"
00037 
00038 class vtkScalarsToColors;
00039 
00040 class VTK_RENDERING_EXPORT vtkImageProperty : public vtkObject
00041 {
00042 public:
00043   vtkTypeMacro(vtkImageProperty,vtkObject);
00044   void PrintSelf(ostream& os, vtkIndent indent);
00045 
00047   static vtkImageProperty *New();
00048 
00050   void DeepCopy(vtkImageProperty *p);
00051 
00053 
00054   vtkSetMacro(ColorWindow, double);
00055   vtkGetMacro(ColorWindow, double);
00057 
00059 
00060   vtkSetMacro(ColorLevel, double);
00061   vtkGetMacro(ColorLevel, double);
00063 
00065 
00068   virtual void SetLookupTable(vtkScalarsToColors *lut);
00069   vtkGetObjectMacro(LookupTable, vtkScalarsToColors);
00071 
00073 
00075   vtkSetMacro(UseLookupTableScalarRange, int);
00076   vtkGetMacro(UseLookupTableScalarRange, int);
00077   vtkBooleanMacro(UseLookupTableScalarRange, int);
00079 
00081 
00084   vtkSetClampMacro(Opacity, double, 0.0, 1.0);
00085   vtkGetMacro(Opacity, double);
00087 
00089 
00090   vtkSetClampMacro(Ambient, double, 0.0, 1.0);
00091   vtkGetMacro(Ambient, double);
00093 
00095 
00096   vtkSetClampMacro(Diffuse, double, 0.0, 1.0);
00097   vtkGetMacro(Diffuse, double);
00099 
00101 
00102   vtkSetClampMacro(InterpolationType, int,
00103                    VTK_NEAREST_INTERPOLATION, VTK_CUBIC_INTERPOLATION);
00104   vtkGetMacro(InterpolationType, int);
00105   void SetInterpolationTypeToNearest() {
00106     this->SetInterpolationType(VTK_NEAREST_INTERPOLATION); };
00107   void SetInterpolationTypeToLinear() {
00108     this->SetInterpolationType(VTK_LINEAR_INTERPOLATION); };
00109   void SetInterpolationTypeToCubic() {
00110     this->SetInterpolationType(VTK_CUBIC_INTERPOLATION); };
00111   virtual const char *GetInterpolationTypeAsString();
00113 
00115 
00117   vtkSetMacro(LayerNumber, int);
00118   int GetLayerNumber() { return this->LayerNumber; }
00120 
00122 
00124   vtkSetMacro(Checkerboard, int);
00125   vtkBooleanMacro(Checkerboard, int);
00126   vtkGetMacro(Checkerboard, int);
00128 
00130 
00131   vtkSetVector2Macro(CheckerboardSpacing, double);
00132   vtkGetVector2Macro(CheckerboardSpacing, double);
00134 
00136 
00138   vtkSetVector2Macro(CheckerboardOffset, double);
00139   vtkGetVector2Macro(CheckerboardOffset, double);
00141 
00143 
00147   vtkSetMacro(Backing, int);
00148   vtkBooleanMacro(Backing, int);
00149   vtkGetMacro(Backing, int);
00151 
00153 
00154   vtkSetVector3Macro(BackingColor, double);
00155   vtkGetVector3Macro(BackingColor, double);
00157 
00160   unsigned long GetMTime();
00161 
00162 protected:
00163   vtkImageProperty();
00164   ~vtkImageProperty();
00165 
00166   vtkScalarsToColors *LookupTable;
00167   double ColorWindow;
00168   double ColorLevel;
00169   int UseLookupTableScalarRange;
00170   int InterpolationType;
00171   int LayerNumber;
00172   double Opacity;
00173   double Ambient;
00174   double Diffuse;
00175   int Checkerboard;
00176   double CheckerboardSpacing[2];
00177   double CheckerboardOffset[2];
00178   int Backing;
00179   double BackingColor[3];
00180 
00181 private:
00182   vtkImageProperty(const vtkImageProperty&);  // Not implemented.
00183   void operator=(const vtkImageProperty&);  // Not implemented.
00184 };
00185 
00186 #endif