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
00080 #ifndef __vtkLabeledDataMapper_h
00081 #define __vtkLabeledDataMapper_h
00082
00083 #include "vtkMapper2D.h"
00084 #include "vtkTextMapper.h"
00085 #include "vtkDataSet.h"
00086
00087 #define VTK_LABEL_IDS 0
00088 #define VTK_LABEL_SCALARS 1
00089 #define VTK_LABEL_VECTORS 2
00090 #define VTK_LABEL_NORMALS 3
00091 #define VTK_LABEL_TCOORDS 4
00092 #define VTK_LABEL_TENSORS 5
00093 #define VTK_LABEL_FIELD_DATA 6
00094
00095 class VTK_RENDERING_EXPORT vtkLabeledDataMapper : public vtkMapper2D
00096 {
00097 public:
00101 static vtkLabeledDataMapper *New();
00102
00103 vtkTypeMacro(vtkLabeledDataMapper,vtkMapper2D);
00104 void PrintSelf(ostream& os, vtkIndent indent);
00105
00107
00108 void RenderOpaqueGeometry(vtkViewport* viewport, vtkActor2D* actor);
00109 void RenderOverlay(vtkViewport* viewport, vtkActor2D* actor);
00111
00113
00114 vtkSetObjectMacro(Input, vtkDataSet);
00115 vtkGetObjectMacro(Input, vtkDataSet);
00117
00121 virtual void ReleaseGraphicsResources(vtkWindow *);
00122
00124
00128 vtkSetMacro(LabelMode, int);
00129 vtkGetMacro(LabelMode, int);
00130 void SetLabelModeToLabelIds() {this->SetLabelMode(VTK_LABEL_IDS);};
00131 void SetLabelModeToLabelScalars() {this->SetLabelMode(VTK_LABEL_SCALARS);};
00132 void SetLabelModeToLabelVectors() {this->SetLabelMode(VTK_LABEL_VECTORS);};
00133 void SetLabelModeToLabelNormals() {this->SetLabelMode(VTK_LABEL_NORMALS);};
00134 void SetLabelModeToLabelTCoords() {this->SetLabelMode(VTK_LABEL_TCOORDS);};
00135 void SetLabelModeToLabelTensors() {this->SetLabelMode(VTK_LABEL_TENSORS);};
00136 void SetLabelModeToLabelFieldData()
00137 {this->SetLabelMode(VTK_LABEL_FIELD_DATA);};
00139
00141
00144 vtkSetClampMacro(FontSize,int,0,VTK_LARGE_INTEGER);
00145 vtkGetMacro(FontSize,int);
00147
00149
00150 vtkSetMacro(Bold, int);
00151 vtkGetMacro(Bold, int);
00152 vtkBooleanMacro(Bold, int);
00154
00156
00157 vtkSetMacro(Italic, int);
00158 vtkGetMacro(Italic, int);
00159 vtkBooleanMacro(Italic, int);
00161
00163
00165 vtkSetMacro(Shadow, int);
00166 vtkGetMacro(Shadow, int);
00167 vtkBooleanMacro(Shadow, int);
00169
00171
00174 vtkSetMacro(FontFamily, int);
00175 vtkGetMacro(FontFamily, int);
00176 void SetFontFamilyToArial() {this->SetFontFamily(VTK_ARIAL);};
00177 void SetFontFamilyToCourier() {this->SetFontFamily(VTK_COURIER);};
00178 void SetFontFamilyToTimes() {this->SetFontFamily(VTK_TIMES);};
00180
00182
00188 vtkSetStringMacro(LabelFormat);
00189 vtkGetStringMacro(LabelFormat);
00191
00193
00198 vtkSetMacro(LabeledComponent,int);
00199 vtkGetMacro(LabeledComponent,int);
00201
00203
00205 vtkSetClampMacro(FieldDataArray,int,0,VTK_LARGE_INTEGER);
00206 vtkGetMacro(FieldDataArray,int);
00208
00209 protected:
00210 vtkLabeledDataMapper();
00211 ~vtkLabeledDataMapper();
00212
00213 vtkDataSet *Input;
00214 int LabelMode;
00215
00216 int FontSize;
00217 int Bold;
00218 int Italic;
00219 int Shadow;
00220 int FontFamily;
00221
00222 char *LabelFormat;
00223 int LabeledComponent;
00224 int FieldDataArray;
00225
00226 vtkTimeStamp BuildTime;
00227
00228 private:
00229 int NumberOfLabels;
00230 int NumberOfLabelsAllocated;
00231 vtkTextMapper **TextMappers;
00232
00233 private:
00234 vtkLabeledDataMapper(const vtkLabeledDataMapper&);
00235 void operator=(const vtkLabeledDataMapper&);
00236 };
00237
00238 #endif
00239