Rendering/vtkLabeledDataMapper.h Source File

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

# 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 =========================================================================*/
    00068 #ifndef __vtkLabeledDataMapper_h
    00069 #define __vtkLabeledDataMapper_h
    00070
    00071 #include "vtkMapper2D.h"
    00072
    00073 class vtkDataSet;
    00074 class vtkTextMapper;
    00075 class vtkTextProperty;
    00076
    00077 #define VTK_LABEL_IDS        0
    00078 #define VTK_LABEL_SCALARS    1
    00079 #define VTK_LABEL_VECTORS    2
    00080 #define VTK_LABEL_NORMALS    3
    00081 #define VTK_LABEL_TCOORDS    4
    00082 #define VTK_LABEL_TENSORS    5
    00083 #define VTK_LABEL_FIELD_DATA 6
    00084
    00085 class VTK_RENDERING_EXPORT vtkLabeledDataMapper : public vtkMapper2D
    00086 {
    00087 public:
    00090   static vtkLabeledDataMapper *New();
    00091
    00092   vtkTypeRevisionMacro(vtkLabeledDataMapper,vtkMapper2D);
    00093   void PrintSelf(ostream& os, vtkIndent indent);
    00094
    00096
    00102   vtkSetStringMacro(LabelFormat);
    00103   vtkGetStringMacro(LabelFormat);
    00105
    00107
    00112   vtkSetMacro(LabeledComponent,int);
    00113   vtkGetMacro(LabeledComponent,int);
    00115
    00117
    00119   vtkSetClampMacro(FieldDataArray,int,0,VTK_LARGE_INTEGER);
    00120   vtkGetMacro(FieldDataArray,int);
    00122
    00124
    00125   virtual void SetInput(vtkDataSet*);
    00126   vtkGetObjectMacro(Input, vtkDataSet);
    00128
    00130
    00134   vtkSetMacro(LabelMode, int);
    00135   vtkGetMacro(LabelMode, int);
    00136   void SetLabelModeToLabelIds() {this->SetLabelMode(VTK_LABEL_IDS);};
    00137   void SetLabelModeToLabelScalars() {this->SetLabelMode(VTK_LABEL_SCALARS);};
    00138   void SetLabelModeToLabelVectors() {this->SetLabelMode(VTK_LABEL_VECTORS);};
    00139   void SetLabelModeToLabelNormals() {this->SetLabelMode(VTK_LABEL_NORMALS);};
    00140   void SetLabelModeToLabelTCoords() {this->SetLabelMode(VTK_LABEL_TCOORDS);};
    00141   void SetLabelModeToLabelTensors() {this->SetLabelMode(VTK_LABEL_TENSORS);};
    00142   void SetLabelModeToLabelFieldData()
    00143             {this->SetLabelMode(VTK_LABEL_FIELD_DATA);};
    00145
    00147
    00148   virtual void SetLabelTextProperty(vtkTextProperty *p);
    00149   vtkGetObjectMacro(LabelTextProperty,vtkTextProperty);
    00151
    00152 #ifndef VTK_REMOVE_LEGACY_CODE
    00153
    00154
    00158   virtual void SetFontFamily(int val);
    00159   virtual int GetFontFamily();
    00160   void SetFontFamilyToArial()   { this->SetFontFamily(VTK_ARIAL);  };
    00161   void SetFontFamilyToCourier() { this->SetFontFamily(VTK_COURIER);};
    00162   void SetFontFamilyToTimes()   { this->SetFontFamily(VTK_TIMES);  };
    00164 #endif
    00165
    00166 #ifndef VTK_REMOVE_LEGACY_CODE
    00167
    00168
    00171   virtual void SetFontSize(int size);
    00172   virtual int GetFontSize();
    00174 #endif
    00175
    00176 #ifndef VTK_REMOVE_LEGACY_CODE
    00177
    00178
    00181   virtual void SetBold(int val);
    00182   virtual int GetBold();
    00183   vtkBooleanMacro(Bold, int);
    00185 #endif
    00186
    00187 #ifndef VTK_REMOVE_LEGACY_CODE
    00188
    00189
    00192   virtual void SetItalic(int val);
    00193   virtual int GetItalic();
    00194   vtkBooleanMacro(Italic, int);
    00196 #endif
    00197
    00198 #ifndef VTK_REMOVE_LEGACY_CODE
    00199
    00200
    00203   virtual void SetShadow(int val);
    00204   virtual int GetShadow();
    00205   vtkBooleanMacro(Shadow, int);
    00207 #endif
    00208
    00210
    00211   void RenderOpaqueGeometry(vtkViewport* viewport, vtkActor2D* actor);
    00212   void RenderOverlay(vtkViewport* viewport, vtkActor2D* actor);
    00214
    00218   virtual void ReleaseGraphicsResources(vtkWindow *);
    00219
    00220 protected:
    00221   vtkLabeledDataMapper();
    00222   ~vtkLabeledDataMapper();
    00223
    00224   vtkDataSet *Input;
    00225   vtkTextProperty *LabelTextProperty;
    00226
    00227   char  *LabelFormat;
    00228   int   LabelMode;
    00229   int   LabeledComponent;
    00230   int   FieldDataArray;
    00231
    00232   vtkTimeStamp BuildTime;
    00233
    00234 private:
    00235   int NumberOfLabels;
    00236   int NumberOfLabelsAllocated;
    00237   vtkTextMapper **TextMappers;
    00238
    00239 private:
    00240   vtkLabeledDataMapper(const vtkLabeledDataMapper&);  // Not implemented.
    00241   void operator=(const vtkLabeledDataMapper&);  // Not implemented.
    00242 };
    00243
    00244 #endif
    00245