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

imaging/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 =========================================================================*/
00076 #ifndef __vtkLabeledDataMapper_h
00077 #define __vtkLabeledDataMapper_h
00078 
00079 #include "vtkMapper2D.h"
00080 #include "vtkTextMapper.h"
00081 #include "vtkDataSet.h"
00082 
00083 #define VTK_LABEL_IDS        0
00084 #define VTK_LABEL_SCALARS    1
00085 #define VTK_LABEL_VECTORS    2
00086 #define VTK_LABEL_NORMALS    3
00087 #define VTK_LABEL_TCOORDS    4
00088 #define VTK_LABEL_TENSORS    5
00089 #define VTK_LABEL_FIELD_DATA 6
00090 
00091 class VTK_EXPORT vtkLabeledDataMapper : public vtkMapper2D
00092 {
00093 public:
00097   static vtkLabeledDataMapper *New();
00098 
00099   vtkTypeMacro(vtkLabeledDataMapper,vtkMapper2D);
00100   void PrintSelf(ostream& os, vtkIndent indent);
00101   
00103   void RenderOpaqueGeometry(vtkViewport* viewport, vtkActor2D* actor);
00104   void RenderOverlay(vtkViewport* viewport, vtkActor2D* actor);
00105 
00107   vtkSetObjectMacro(Input, vtkDataSet);
00108   vtkGetObjectMacro(Input, vtkDataSet);
00109 
00113   virtual void ReleaseGraphicsResources(vtkWindow *);
00114 
00119   vtkSetMacro(LabelMode, int);
00120   vtkGetMacro(LabelMode, int);
00121   void SetLabelModeToLabelIds() {this->SetLabelMode(VTK_LABEL_IDS);};
00122   void SetLabelModeToLabelScalars() {this->SetLabelMode(VTK_LABEL_SCALARS);};
00123   void SetLabelModeToLabelVectors() {this->SetLabelMode(VTK_LABEL_VECTORS);};
00124   void SetLabelModeToLabelNormals() {this->SetLabelMode(VTK_LABEL_NORMALS);};
00125   void SetLabelModeToLabelTCoords() {this->SetLabelMode(VTK_LABEL_TCOORDS);};
00126   void SetLabelModeToLabelTensors() {this->SetLabelMode(VTK_LABEL_TENSORS);};
00127   void SetLabelModeToLabelFieldData()
00128             {this->SetLabelMode(VTK_LABEL_FIELD_DATA);};
00129 
00133   vtkSetClampMacro(FontSize,int,0,VTK_LARGE_INTEGER);
00134   vtkGetMacro(FontSize,int);
00135 
00137   vtkSetMacro(Bold, int);
00138   vtkGetMacro(Bold, int);
00139   vtkBooleanMacro(Bold, int);
00140 
00142   vtkSetMacro(Italic, int);
00143   vtkGetMacro(Italic, int);
00144   vtkBooleanMacro(Italic, int);
00145 
00148   vtkSetMacro(Shadow, int);
00149   vtkGetMacro(Shadow, int);
00150   vtkBooleanMacro(Shadow, int);
00151 
00155   vtkSetMacro(FontFamily, int);
00156   vtkGetMacro(FontFamily, int);
00157   void SetFontFamilyToArial() {this->SetFontFamily(VTK_ARIAL);};
00158   void SetFontFamilyToCourier() {this->SetFontFamily(VTK_COURIER);};
00159   void SetFontFamilyToTimes() {this->SetFontFamily(VTK_TIMES);};
00160 
00167   vtkSetStringMacro(LabelFormat);
00168   vtkGetStringMacro(LabelFormat);
00169 
00175   vtkSetMacro(LabeledComponent,int);
00176   vtkGetMacro(LabeledComponent,int);
00177 
00180   vtkSetClampMacro(FieldDataArray,int,0,VTK_LARGE_INTEGER);
00181   vtkGetMacro(FieldDataArray,int);
00182 
00183 protected:
00184   vtkLabeledDataMapper();
00185   ~vtkLabeledDataMapper();
00186   vtkLabeledDataMapper(const vtkLabeledDataMapper&) {};
00187   void operator=(const vtkLabeledDataMapper&) {};
00188 
00189   vtkDataSet *Input;
00190   int LabelMode;
00191 
00192   int   FontSize;
00193   int Bold;
00194   int   Italic;
00195   int   Shadow;
00196   int   FontFamily;
00197 
00198   char  *LabelFormat;
00199   int   LabeledComponent;
00200   int   FieldDataArray;
00201 
00202   vtkTimeStamp BuildTime;
00203 
00204 private:
00205   int NumberOfLabels;
00206   int NumberOfLabelsAllocated;
00207   vtkTextMapper **TextMappers;
00208 
00209 };
00210 
00211 #endif
00212 

Generated on Wed Nov 21 12:27:08 2001 for VTK by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001