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

vtkLabeledDataMapper.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkLabeledDataMapper.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
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 
00109   virtual void SetInput(vtkDataSet*);
00110   vtkDataSet *GetInput();
00112 
00114 
00118   vtkSetMacro(LabelMode, int);
00119   vtkGetMacro(LabelMode, int);
00120   void SetLabelModeToLabelIds() {this->SetLabelMode(VTK_LABEL_IDS);};
00121   void SetLabelModeToLabelScalars() {this->SetLabelMode(VTK_LABEL_SCALARS);};
00122   void SetLabelModeToLabelVectors() {this->SetLabelMode(VTK_LABEL_VECTORS);};
00123   void SetLabelModeToLabelNormals() {this->SetLabelMode(VTK_LABEL_NORMALS);};
00124   void SetLabelModeToLabelTCoords() {this->SetLabelMode(VTK_LABEL_TCOORDS);};
00125   void SetLabelModeToLabelTensors() {this->SetLabelMode(VTK_LABEL_TENSORS);};
00126   void SetLabelModeToLabelFieldData()
00127             {this->SetLabelMode(VTK_LABEL_FIELD_DATA);};
00129 
00131 
00132   virtual void SetLabelTextProperty(vtkTextProperty *p);
00133   vtkGetObjectMacro(LabelTextProperty,vtkTextProperty);
00135 
00137 
00138   void RenderOpaqueGeometry(vtkViewport* viewport, vtkActor2D* actor);
00139   void RenderOverlay(vtkViewport* viewport, vtkActor2D* actor);
00141 
00143   virtual void ReleaseGraphicsResources(vtkWindow *);
00144 
00145 protected:
00146   vtkLabeledDataMapper();
00147   ~vtkLabeledDataMapper();
00148 
00149   vtkDataSet *Input;
00150   vtkTextProperty *LabelTextProperty;
00151 
00152   char  *LabelFormat;
00153   int   LabelMode;
00154   int   LabeledComponent;
00155   int   FieldDataArray;
00156 
00157   vtkTimeStamp BuildTime;
00158 
00159 private:
00160   int NumberOfLabels;
00161   int NumberOfLabelsAllocated;
00162   vtkTextMapper **TextMappers;
00163 
00164   virtual int FillInputPortInformation(int, vtkInformation*);
00165 
00166 private:
00167   vtkLabeledDataMapper(const vtkLabeledDataMapper&);  // Not implemented.
00168   void operator=(const vtkLabeledDataMapper&);  // Not implemented.
00169 };
00170 
00171 #endif
00172 

Generated on Mon Jan 21 23:07:35 2008 for VTK by  doxygen 1.4.3-20050530