Rendering/vtkLabeledDataMapper.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00051 #ifndef __vtkLabeledDataMapper_h
00052 #define __vtkLabeledDataMapper_h
00053
00054 #include "vtkMapper2D.h"
00055
00056 class vtkDataSet;
00057 class vtkTextMapper;
00058 class vtkTextProperty;
00059
00060 #define VTK_LABEL_IDS 0
00061 #define VTK_LABEL_SCALARS 1
00062 #define VTK_LABEL_VECTORS 2
00063 #define VTK_LABEL_NORMALS 3
00064 #define VTK_LABEL_TCOORDS 4
00065 #define VTK_LABEL_TENSORS 5
00066 #define VTK_LABEL_FIELD_DATA 6
00067
00068 class VTK_RENDERING_EXPORT vtkLabeledDataMapper : public vtkMapper2D
00069 {
00070 public:
00073 static vtkLabeledDataMapper *New();
00074
00075 vtkTypeRevisionMacro(vtkLabeledDataMapper,vtkMapper2D);
00076 void PrintSelf(ostream& os, vtkIndent indent);
00077
00079
00085 vtkSetStringMacro(LabelFormat);
00086 vtkGetStringMacro(LabelFormat);
00088
00090
00095 vtkSetMacro(LabeledComponent,int);
00096 vtkGetMacro(LabeledComponent,int);
00098
00100
00102 vtkSetClampMacro(FieldDataArray,int,0,VTK_LARGE_INTEGER);
00103 vtkGetMacro(FieldDataArray,int);
00105
00107
00108 virtual void SetInput(vtkDataSet*);
00109 vtkGetObjectMacro(Input, vtkDataSet);
00111
00113
00117 vtkSetMacro(LabelMode, int);
00118 vtkGetMacro(LabelMode, int);
00119 void SetLabelModeToLabelIds() {this->SetLabelMode(VTK_LABEL_IDS);};
00120 void SetLabelModeToLabelScalars() {this->SetLabelMode(VTK_LABEL_SCALARS);};
00121 void SetLabelModeToLabelVectors() {this->SetLabelMode(VTK_LABEL_VECTORS);};
00122 void SetLabelModeToLabelNormals() {this->SetLabelMode(VTK_LABEL_NORMALS);};
00123 void SetLabelModeToLabelTCoords() {this->SetLabelMode(VTK_LABEL_TCOORDS);};
00124 void SetLabelModeToLabelTensors() {this->SetLabelMode(VTK_LABEL_TENSORS);};
00125 void SetLabelModeToLabelFieldData()
00126 {this->SetLabelMode(VTK_LABEL_FIELD_DATA);};
00128
00130
00131 virtual void SetLabelTextProperty(vtkTextProperty *p);
00132 vtkGetObjectMacro(LabelTextProperty,vtkTextProperty);
00134
00136
00137 void RenderOpaqueGeometry(vtkViewport* viewport, vtkActor2D* actor);
00138 void RenderOverlay(vtkViewport* viewport, vtkActor2D* actor);
00140
00144 virtual void ReleaseGraphicsResources(vtkWindow *);
00145
00146 protected:
00147 vtkLabeledDataMapper();
00148 ~vtkLabeledDataMapper();
00149
00150 vtkDataSet *Input;
00151 vtkTextProperty *LabelTextProperty;
00152
00153 char *LabelFormat;
00154 int LabelMode;
00155 int LabeledComponent;
00156 int FieldDataArray;
00157
00158 vtkTimeStamp BuildTime;
00159
00160 private:
00161 int NumberOfLabels;
00162 int NumberOfLabelsAllocated;
00163 vtkTextMapper **TextMappers;
00164
00165 private:
00166 vtkLabeledDataMapper(const vtkLabeledDataMapper&);
00167 void operator=(const vtkLabeledDataMapper&);
00168 };
00169
00170 #endif
00171