00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00038 #ifndef __vtkViewTheme_h
00039 #define __vtkViewTheme_h
00040
00041 #include "vtkObject.h"
00042
00043 class vtkScalarsToColors;
00044 class vtkTextProperty;
00045
00046 class VTK_RENDERING_EXPORT vtkViewTheme : public vtkObject
00047 {
00048 public:
00049 static vtkViewTheme* New();
00050 vtkTypeMacro(vtkViewTheme, vtkObject);
00051 void PrintSelf(ostream& os, vtkIndent indent);
00052
00054
00055 vtkSetMacro(PointSize, double);
00056 vtkGetMacro(PointSize, double);
00058
00060
00061 vtkSetMacro(LineWidth, double);
00062 vtkGetMacro(LineWidth, double);
00064
00066
00068 vtkSetVector3Macro(PointColor, double);
00069 vtkGetVector3Macro(PointColor, double);
00070 vtkSetMacro(PointOpacity, double);
00071 vtkGetMacro(PointOpacity, double);
00073
00075
00078 virtual void SetPointHueRange(double mn, double mx);
00079 virtual void SetPointHueRange(double rng[2]);
00080 virtual double* GetPointHueRange();
00081 virtual void GetPointHueRange(double& mn, double& mx);
00082 virtual void GetPointHueRange(double rng[2]);
00084
00085 virtual void SetPointSaturationRange(double mn, double mx);
00086 virtual void SetPointSaturationRange(double rng[2]);
00087 virtual double* GetPointSaturationRange();
00088 virtual void GetPointSaturationRange(double& mn, double& mx);
00089 virtual void GetPointSaturationRange(double rng[2]);
00090
00091 virtual void SetPointValueRange(double mn, double mx);
00092 virtual void SetPointValueRange(double rng[2]);
00093 virtual double* GetPointValueRange();
00094 virtual void GetPointValueRange(double& mn, double& mx);
00095 virtual void GetPointValueRange(double rng[2]);
00096
00097 virtual void SetPointAlphaRange(double mn, double mx);
00098 virtual void SetPointAlphaRange(double rng[2]);
00099 virtual double* GetPointAlphaRange();
00100 virtual void GetPointAlphaRange(double& mn, double& mx);
00101 virtual void GetPointAlphaRange(double rng[2]);
00102
00104
00105 vtkGetObjectMacro(PointLookupTable, vtkScalarsToColors);
00106 virtual void SetPointLookupTable(vtkScalarsToColors* lut);
00108
00110
00111 vtkSetMacro(ScalePointLookupTable, bool);
00112 vtkGetMacro(ScalePointLookupTable, bool);
00113 vtkBooleanMacro(ScalePointLookupTable, bool);
00115
00117
00119 vtkSetVector3Macro(CellColor, double);
00120 vtkGetVector3Macro(CellColor, double);
00121 vtkSetMacro(CellOpacity, double);
00122 vtkGetMacro(CellOpacity, double);
00124
00126
00129 virtual void SetCellHueRange(double mn, double mx);
00130 virtual void SetCellHueRange(double rng[2]);
00131 virtual double* GetCellHueRange();
00132 virtual void GetCellHueRange(double& mn, double& mx);
00133 virtual void GetCellHueRange(double rng[2]);
00135
00136 virtual void SetCellSaturationRange(double mn, double mx);
00137 virtual void SetCellSaturationRange(double rng[2]);
00138 virtual double* GetCellSaturationRange();
00139 virtual void GetCellSaturationRange(double& mn, double& mx);
00140 virtual void GetCellSaturationRange(double rng[2]);
00141
00142 virtual void SetCellValueRange(double mn, double mx);
00143 virtual void SetCellValueRange(double rng[2]);
00144 virtual double* GetCellValueRange();
00145 virtual void GetCellValueRange(double& mn, double& mx);
00146 virtual void GetCellValueRange(double rng[2]);
00147
00148 virtual void SetCellAlphaRange(double mn, double mx);
00149 virtual void SetCellAlphaRange(double rng[2]);
00150 virtual double* GetCellAlphaRange();
00151 virtual void GetCellAlphaRange(double& mn, double& mx);
00152 virtual void GetCellAlphaRange(double rng[2]);
00153
00155
00156 vtkGetObjectMacro(CellLookupTable, vtkScalarsToColors);
00157 virtual void SetCellLookupTable(vtkScalarsToColors* lut);
00159
00161
00162 vtkSetMacro(ScaleCellLookupTable, bool);
00163 vtkGetMacro(ScaleCellLookupTable, bool);
00164 vtkBooleanMacro(ScaleCellLookupTable, bool);
00166
00168
00169 vtkSetVector3Macro(OutlineColor, double);
00170 vtkGetVector3Macro(OutlineColor, double);
00172
00174
00175 vtkSetVector3Macro(SelectedPointColor, double);
00176 vtkGetVector3Macro(SelectedPointColor, double);
00177 vtkSetMacro(SelectedPointOpacity, double);
00178 vtkGetMacro(SelectedPointOpacity, double);
00180
00182
00183 vtkSetVector3Macro(SelectedCellColor, double);
00184 vtkGetVector3Macro(SelectedCellColor, double);
00185 vtkSetMacro(SelectedCellOpacity, double);
00186 vtkGetMacro(SelectedCellOpacity, double);
00188
00190
00191 vtkSetVector3Macro(BackgroundColor, double);
00192 vtkGetVector3Macro(BackgroundColor, double);
00194
00196
00197 vtkSetVector3Macro(BackgroundColor2, double);
00198 vtkGetVector3Macro(BackgroundColor2, double);
00200
00202
00203 virtual void SetPointTextProperty(vtkTextProperty* tprop);
00204 vtkGetObjectMacro(PointTextProperty, vtkTextProperty);
00206
00208
00209 virtual void SetCellTextProperty(vtkTextProperty* tprop);
00210 vtkGetObjectMacro(CellTextProperty, vtkTextProperty);
00212
00214
00216 virtual void SetVertexLabelColor(double r, double g, double b);
00217 virtual void SetVertexLabelColor(double c[3])
00218 { this->SetVertexLabelColor(c[0], c[1], c[2]); }
00219 virtual double *GetVertexLabelColor();
00220 virtual void GetVertexLabelColor(double &r, double &g, double &b)
00221 { double* c = this->GetVertexLabelColor(); if (c) { r = c[0]; g = c[1]; b = c[2]; } }
00222 virtual void GetVertexLabelColor(double c[3])
00223 { this->GetVertexLabelColor(c[0], c[1], c[2]); }
00225
00227
00229 virtual void SetEdgeLabelColor(double r, double g, double b);
00230 virtual void SetEdgeLabelColor(double c[3])
00231 { this->SetEdgeLabelColor(c[0], c[1], c[2]); }
00232 virtual double *GetEdgeLabelColor();
00233 virtual void GetEdgeLabelColor(double &r, double &g, double &b)
00234 { double* c = this->GetEdgeLabelColor(); if (c) { r = c[0]; g = c[1]; b = c[2]; } }
00235 virtual void GetEdgeLabelColor(double c[3])
00236 { this->GetEdgeLabelColor(c[0], c[1], c[2]); }
00238
00240
00243 static vtkViewTheme* CreateOceanTheme();
00244 static vtkViewTheme* CreateMellowTheme();
00245 static vtkViewTheme* CreateNeonTheme();
00247
00249
00251 bool LookupMatchesPointTheme(vtkScalarsToColors* s2c);
00252 bool LookupMatchesCellTheme(vtkScalarsToColors* s2c);
00254
00255 protected:
00256 vtkViewTheme();
00257 ~vtkViewTheme();
00258
00259 double PointSize;
00260 double LineWidth;
00261
00262 double PointColor[3];
00263 double PointOpacity;
00264
00265 double CellColor[3];
00266 double CellOpacity;
00267
00268 double OutlineColor[3];
00269
00270 double SelectedPointColor[3];
00271 double SelectedPointOpacity;
00272 double SelectedCellColor[3];
00273 double SelectedCellOpacity;
00274
00275 double BackgroundColor[3];
00276 double BackgroundColor2[3];
00277
00278 vtkScalarsToColors* PointLookupTable;
00279 vtkScalarsToColors* CellLookupTable;
00280
00281 bool ScalePointLookupTable;
00282 bool ScaleCellLookupTable;
00283
00284 vtkTextProperty* PointTextProperty;
00285 vtkTextProperty* CellTextProperty;
00286
00287 private:
00288 vtkViewTheme(const vtkViewTheme&);
00289 void operator=(const vtkViewTheme&);
00290 };
00291
00292 #endif
00293