Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

dox/Rendering/vtkLabeledDataMapper.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkLabeledDataMapper.h,v $ 00005 Language: C++ 00006 00007 Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 00008 All rights reserved. 00009 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00010 00011 This software is distributed WITHOUT ANY WARRANTY; without even 00012 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00013 PURPOSE. See the above copyright notice for more information. 00014 00015 =========================================================================*/ 00055 #ifndef __vtkLabeledDataMapper_h 00056 #define __vtkLabeledDataMapper_h 00057 00058 #include "vtkMapper2D.h" 00059 00060 class vtkDataSet; 00061 class vtkTextMapper; 00062 class vtkTextProperty; 00063 00064 #define VTK_LABEL_IDS 0 00065 #define VTK_LABEL_SCALARS 1 00066 #define VTK_LABEL_VECTORS 2 00067 #define VTK_LABEL_NORMALS 3 00068 #define VTK_LABEL_TCOORDS 4 00069 #define VTK_LABEL_TENSORS 5 00070 #define VTK_LABEL_FIELD_DATA 6 00071 00072 class VTK_RENDERING_EXPORT vtkLabeledDataMapper : public vtkMapper2D 00073 { 00074 public: 00077 static vtkLabeledDataMapper *New(); 00078 00079 vtkTypeRevisionMacro(vtkLabeledDataMapper,vtkMapper2D); 00080 void PrintSelf(ostream& os, vtkIndent indent); 00081 00083 00089 vtkSetStringMacro(LabelFormat); 00090 vtkGetStringMacro(LabelFormat); 00092 00094 00099 vtkSetMacro(LabeledComponent,int); 00100 vtkGetMacro(LabeledComponent,int); 00102 00104 00106 vtkSetClampMacro(FieldDataArray,int,0,VTK_LARGE_INTEGER); 00107 vtkGetMacro(FieldDataArray,int); 00109 00111 00112 virtual void SetInput(vtkDataSet*); 00113 vtkGetObjectMacro(Input, vtkDataSet); 00115 00117 00121 vtkSetMacro(LabelMode, int); 00122 vtkGetMacro(LabelMode, int); 00123 void SetLabelModeToLabelIds() {this->SetLabelMode(VTK_LABEL_IDS);}; 00124 void SetLabelModeToLabelScalars() {this->SetLabelMode(VTK_LABEL_SCALARS);}; 00125 void SetLabelModeToLabelVectors() {this->SetLabelMode(VTK_LABEL_VECTORS);}; 00126 void SetLabelModeToLabelNormals() {this->SetLabelMode(VTK_LABEL_NORMALS);}; 00127 void SetLabelModeToLabelTCoords() {this->SetLabelMode(VTK_LABEL_TCOORDS);}; 00128 void SetLabelModeToLabelTensors() {this->SetLabelMode(VTK_LABEL_TENSORS);}; 00129 void SetLabelModeToLabelFieldData() 00130 {this->SetLabelMode(VTK_LABEL_FIELD_DATA);}; 00132 00134 00135 virtual void SetLabelTextProperty(vtkTextProperty *p); 00136 vtkGetObjectMacro(LabelTextProperty,vtkTextProperty); 00138 00139 #ifndef VTK_REMOVE_LEGACY_CODE 00140 00141 00145 virtual void SetFontFamily(int val); 00146 virtual int GetFontFamily(); 00147 void SetFontFamilyToArial() { this->SetFontFamily(VTK_ARIAL); }; 00148 void SetFontFamilyToCourier() { this->SetFontFamily(VTK_COURIER);}; 00149 void SetFontFamilyToTimes() { this->SetFontFamily(VTK_TIMES); }; 00151 #endif 00152 00153 #ifndef VTK_REMOVE_LEGACY_CODE 00154 00155 00158 virtual void SetFontSize(int size); 00159 virtual int GetFontSize(); 00161 #endif 00162 00163 #ifndef VTK_REMOVE_LEGACY_CODE 00164 00165 00168 virtual void SetBold(int val); 00169 virtual int GetBold(); 00170 vtkBooleanMacro(Bold, int); 00172 #endif 00173 00174 #ifndef VTK_REMOVE_LEGACY_CODE 00175 00176 00179 virtual void SetItalic(int val); 00180 virtual int GetItalic(); 00181 vtkBooleanMacro(Italic, int); 00183 #endif 00184 00185 #ifndef VTK_REMOVE_LEGACY_CODE 00186 00187 00190 virtual void SetShadow(int val); 00191 virtual int GetShadow(); 00192 vtkBooleanMacro(Shadow, int); 00194 #endif 00195 00197 00198 void RenderOpaqueGeometry(vtkViewport* viewport, vtkActor2D* actor); 00199 void RenderOverlay(vtkViewport* viewport, vtkActor2D* actor); 00201 00205 virtual void ReleaseGraphicsResources(vtkWindow *); 00206 00207 protected: 00208 vtkLabeledDataMapper(); 00209 ~vtkLabeledDataMapper(); 00210 00211 vtkDataSet *Input; 00212 vtkTextProperty *LabelTextProperty; 00213 00214 char *LabelFormat; 00215 int LabelMode; 00216 int LabeledComponent; 00217 int FieldDataArray; 00218 00219 vtkTimeStamp BuildTime; 00220 00221 private: 00222 int NumberOfLabels; 00223 int NumberOfLabelsAllocated; 00224 vtkTextMapper **TextMappers; 00225 00226 private: 00227 vtkLabeledDataMapper(const vtkLabeledDataMapper&); // Not implemented. 00228 void operator=(const vtkLabeledDataMapper&); // Not implemented. 00229 }; 00230 00231 #endif 00232