vtkLabeledDataMapper.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00064 #ifndef __vtkLabeledDataMapper_h
00065 #define __vtkLabeledDataMapper_h
00066
00067 #include "vtkMapper2D.h"
00068
00069 class vtkDataSet;
00070 class vtkTextMapper;
00071 class vtkTextProperty;
00072
00073 #define VTK_LABEL_IDS 0
00074 #define VTK_LABEL_SCALARS 1
00075 #define VTK_LABEL_VECTORS 2
00076 #define VTK_LABEL_NORMALS 3
00077 #define VTK_LABEL_TCOORDS 4
00078 #define VTK_LABEL_TENSORS 5
00079 #define VTK_LABEL_FIELD_DATA 6
00080
00081 class VTK_RENDERING_EXPORT vtkLabeledDataMapper : public vtkMapper2D
00082 {
00083 public:
00086 static vtkLabeledDataMapper *New();
00087
00088 vtkTypeRevisionMacro(vtkLabeledDataMapper,vtkMapper2D);
00089 void PrintSelf(ostream& os, vtkIndent indent);
00090
00092
00098 vtkSetStringMacro(LabelFormat);
00099 vtkGetStringMacro(LabelFormat);
00101
00103
00108 vtkSetMacro(LabeledComponent,int);
00109 vtkGetMacro(LabeledComponent,int);
00111
00113
00115 vtkSetClampMacro(FieldDataArray,int,0,VTK_LARGE_INTEGER);
00116 vtkGetMacro(FieldDataArray,int);
00118
00120
00121 virtual void SetInput(vtkDataSet*);
00122 vtkGetObjectMacro(Input, vtkDataSet);
00124
00126
00130 vtkSetMacro(LabelMode, int);
00131 vtkGetMacro(LabelMode, int);
00132 void SetLabelModeToLabelIds() {this->SetLabelMode(VTK_LABEL_IDS);};
00133 void SetLabelModeToLabelScalars() {this->SetLabelMode(VTK_LABEL_SCALARS);};
00134 void SetLabelModeToLabelVectors() {this->SetLabelMode(VTK_LABEL_VECTORS);};
00135 void SetLabelModeToLabelNormals() {this->SetLabelMode(VTK_LABEL_NORMALS);};
00136 void SetLabelModeToLabelTCoords() {this->SetLabelMode(VTK_LABEL_TCOORDS);};
00137 void SetLabelModeToLabelTensors() {this->SetLabelMode(VTK_LABEL_TENSORS);};
00138 void SetLabelModeToLabelFieldData()
00139 {this->SetLabelMode(VTK_LABEL_FIELD_DATA);};
00141
00143
00144 virtual void SetLabelTextProperty(vtkTextProperty *p);
00145 vtkGetObjectMacro(LabelTextProperty,vtkTextProperty);
00147
00149
00150 void RenderOpaqueGeometry(vtkViewport* viewport, vtkActor2D* actor);
00151 void RenderOverlay(vtkViewport* viewport, vtkActor2D* actor);
00153
00157 virtual void ReleaseGraphicsResources(vtkWindow *);
00158
00159 protected:
00160 vtkLabeledDataMapper();
00161 ~vtkLabeledDataMapper();
00162
00163 vtkDataSet *Input;
00164 vtkTextProperty *LabelTextProperty;
00165
00166 char *LabelFormat;
00167 int LabelMode;
00168 int LabeledComponent;
00169 int FieldDataArray;
00170
00171 vtkTimeStamp BuildTime;
00172
00173 private:
00174 int NumberOfLabels;
00175 int NumberOfLabelsAllocated;
00176 vtkTextMapper **TextMappers;
00177
00178 private:
00179 vtkLabeledDataMapper(const vtkLabeledDataMapper&);
00180 void operator=(const vtkLabeledDataMapper&);
00181 };
00182
00183 #endif
00184