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-2001 Ken Martin, Will Schroeder, Bill Lorensen 
00008 All rights reserved.
00009 
00010 Redistribution and use in source and binary forms, with or without
00011 modification, are permitted provided that the following conditions are met:
00012 
00013  * Redistributions of source code must retain the above copyright notice,
00014    this list of conditions and the following disclaimer.
00015 
00016  * Redistributions in binary form must reproduce the above copyright notice,
00017    this list of conditions and the following disclaimer in the documentation
00018    and/or other materials provided with the distribution.
00019 
00020  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00021    of any contributors may be used to endorse or promote products derived
00022    from this software without specific prior written permission.
00023 
00024  * Modified source versions must be plainly marked as such, and must not be
00025    misrepresented as being the original software.
00026 
00027 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00028 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00029 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00030 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00031 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00032 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00033 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00034 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00035 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00036 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00037 
00038 =========================================================================*/
00080 #ifndef __vtkLabeledDataMapper_h
00081 #define __vtkLabeledDataMapper_h
00082 
00083 #include "vtkMapper2D.h"
00084 #include "vtkTextMapper.h"
00085 #include "vtkDataSet.h"
00086 
00087 #define VTK_LABEL_IDS        0
00088 #define VTK_LABEL_SCALARS    1
00089 #define VTK_LABEL_VECTORS    2
00090 #define VTK_LABEL_NORMALS    3
00091 #define VTK_LABEL_TCOORDS    4
00092 #define VTK_LABEL_TENSORS    5
00093 #define VTK_LABEL_FIELD_DATA 6
00094 
00095 class VTK_RENDERING_EXPORT vtkLabeledDataMapper : public vtkMapper2D
00096 {
00097 public:
00101   static vtkLabeledDataMapper *New();
00102 
00103   vtkTypeMacro(vtkLabeledDataMapper,vtkMapper2D);
00104   void PrintSelf(ostream& os, vtkIndent indent);
00105   
00107 
00108   void RenderOpaqueGeometry(vtkViewport* viewport, vtkActor2D* actor);
00109   void RenderOverlay(vtkViewport* viewport, vtkActor2D* actor);
00111 
00113 
00114   vtkSetObjectMacro(Input, vtkDataSet);
00115   vtkGetObjectMacro(Input, vtkDataSet);
00117 
00121   virtual void ReleaseGraphicsResources(vtkWindow *);
00122 
00124 
00128   vtkSetMacro(LabelMode, int);
00129   vtkGetMacro(LabelMode, int);
00130   void SetLabelModeToLabelIds() {this->SetLabelMode(VTK_LABEL_IDS);};
00131   void SetLabelModeToLabelScalars() {this->SetLabelMode(VTK_LABEL_SCALARS);};
00132   void SetLabelModeToLabelVectors() {this->SetLabelMode(VTK_LABEL_VECTORS);};
00133   void SetLabelModeToLabelNormals() {this->SetLabelMode(VTK_LABEL_NORMALS);};
00134   void SetLabelModeToLabelTCoords() {this->SetLabelMode(VTK_LABEL_TCOORDS);};
00135   void SetLabelModeToLabelTensors() {this->SetLabelMode(VTK_LABEL_TENSORS);};
00136   void SetLabelModeToLabelFieldData()
00137             {this->SetLabelMode(VTK_LABEL_FIELD_DATA);};
00139 
00141 
00144   vtkSetClampMacro(FontSize,int,0,VTK_LARGE_INTEGER);
00145   vtkGetMacro(FontSize,int);
00147 
00149 
00150   vtkSetMacro(Bold, int);
00151   vtkGetMacro(Bold, int);
00152   vtkBooleanMacro(Bold, int);
00154 
00156 
00157   vtkSetMacro(Italic, int);
00158   vtkGetMacro(Italic, int);
00159   vtkBooleanMacro(Italic, int);
00161 
00163 
00165   vtkSetMacro(Shadow, int);
00166   vtkGetMacro(Shadow, int);
00167   vtkBooleanMacro(Shadow, int);
00169 
00171 
00174   vtkSetMacro(FontFamily, int);
00175   vtkGetMacro(FontFamily, int);
00176   void SetFontFamilyToArial() {this->SetFontFamily(VTK_ARIAL);};
00177   void SetFontFamilyToCourier() {this->SetFontFamily(VTK_COURIER);};
00178   void SetFontFamilyToTimes() {this->SetFontFamily(VTK_TIMES);};
00180 
00182 
00188   vtkSetStringMacro(LabelFormat);
00189   vtkGetStringMacro(LabelFormat);
00191 
00193 
00198   vtkSetMacro(LabeledComponent,int);
00199   vtkGetMacro(LabeledComponent,int);
00201 
00203 
00205   vtkSetClampMacro(FieldDataArray,int,0,VTK_LARGE_INTEGER);
00206   vtkGetMacro(FieldDataArray,int);
00208 
00209 protected:
00210   vtkLabeledDataMapper();
00211   ~vtkLabeledDataMapper();
00212 
00213   vtkDataSet *Input;
00214   int LabelMode;
00215 
00216   int   FontSize;
00217   int   Bold;
00218   int   Italic;
00219   int   Shadow;
00220   int   FontFamily;
00221 
00222   char  *LabelFormat;
00223   int   LabeledComponent;
00224   int   FieldDataArray;
00225 
00226   vtkTimeStamp BuildTime;
00227 
00228 private:
00229   int NumberOfLabels;
00230   int NumberOfLabelsAllocated;
00231   vtkTextMapper **TextMappers;
00232 
00233 private:
00234   vtkLabeledDataMapper(const vtkLabeledDataMapper&);  // Not implemented.
00235   void operator=(const vtkLabeledDataMapper&);  // Not implemented.
00236 };
00237 
00238 #endif
00239 

Generated on Thu Mar 28 14:19:32 2002 for VTK by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001