00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00061 #ifndef __vtkPolyDataMapper2D_h
00062 #define __vtkPolyDataMapper2D_h
00063
00064
00065 #include "vtkMapper2D.h"
00066 #include "vtkWindow.h"
00067 #include "vtkViewport.h"
00068 #include "vtkActor2D.h"
00069 #include "vtkProperty2D.h"
00070 #include "vtkScalarsToColors.h"
00071 #include "vtkPolyData.h"
00072
00073 class VTK_EXPORT vtkPolyDataMapper2D : public vtkMapper2D
00074 {
00075 public:
00076 vtkTypeMacro(vtkPolyDataMapper2D,vtkMapper2D);
00077 static vtkPolyDataMapper2D *New();
00078 void PrintSelf(ostream& os, vtkIndent indent);
00079
00081 vtkSetObjectMacro(Input, vtkPolyData);
00082 vtkGetObjectMacro(Input, vtkPolyData);
00083
00085 void SetLookupTable(vtkScalarsToColors *lut);
00086 vtkScalarsToColors *GetLookupTable();
00087
00090 virtual void CreateDefaultLookupTable();
00091
00094 vtkSetMacro(ScalarVisibility,int);
00095 vtkGetMacro(ScalarVisibility,int);
00096 vtkBooleanMacro(ScalarVisibility,int);
00097
00107 vtkSetMacro(ColorMode,int);
00108 vtkGetMacro(ColorMode,int);
00109 void SetColorModeToDefault()
00110 {this->SetColorMode(VTK_COLOR_MODE_DEFAULT);};
00111 void SetColorModeToMapScalars()
00112 {this->SetColorMode(VTK_COLOR_MODE_MAP_SCALARS);};
00113 void SetColorModeToLuminance()
00114 {this->SetColorMode(VTK_COLOR_MODE_LUMINANCE);};
00115 const char *GetColorModeAsString();
00116
00119 vtkSetVector2Macro(ScalarRange,float);
00120 vtkGetVectorMacro(ScalarRange,float,2);
00121
00125 vtkScalars *GetColors();
00126
00129 virtual unsigned long GetMTime();
00130
00135 vtkSetObjectMacro(TransformCoordinate, vtkCoordinate);
00136 vtkGetObjectMacro(TransformCoordinate, vtkCoordinate);
00137
00139 void ShallowCopy(vtkPolyDataMapper2D *m);
00140
00141 protected:
00142 vtkPolyDataMapper2D();
00143 ~vtkPolyDataMapper2D();
00144 vtkPolyDataMapper2D(const vtkPolyDataMapper2D&) {};
00145 void operator=(const vtkPolyDataMapper2D&) {};
00146
00147 vtkPolyData* Input;
00148 vtkScalars *Colors;
00149 vtkScalarsToColors *LookupTable;
00150 int ScalarVisibility;
00151 vtkTimeStamp BuildTime;
00152 float ScalarRange[2];
00153 int ColorMode;
00154
00155 vtkCoordinate *TransformCoordinate;
00156
00157 };
00158
00159
00160 #endif
00161