VTK
vtkQtTreeRingLabelMapper.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkQtTreeRingLabelMapper.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 /*-------------------------------------------------------------------------
16  Copyright 2008 Sandia Corporation.
17  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18  the U.S. Government retains certain rights in this software.
19 -------------------------------------------------------------------------*/
46 #ifndef vtkQtTreeRingLabelMapper_h
47 #define vtkQtTreeRingLabelMapper_h
48 
49 #include "vtkRenderingQtModule.h" // For export macro
50 #include "vtkLabeledDataMapper.h"
51 
52 //BTX
53 class QImage;
54 //ETX
55 
57 class vtkCoordinate;
58 class vtkDoubleArray;
59 class vtkPlaneSource;
61 class vtkRenderer;
62 class vtkStringArray;
63 class vtkTexture;
65 class vtkTree;
67 
69 {
70 public:
73  void PrintSelf(ostream& os, vtkIndent indent);
74 
76 
77  virtual void RenderOpaqueGeometry(vtkViewport* viewport, vtkActor2D* actor);
78  virtual void RenderOverlay(vtkViewport *viewport, vtkActor2D *actor);
80 
82  virtual vtkTree *GetInputTree();
83 
85  virtual void SetSectorsArrayName(const char* name);
86 
88 
92  vtkGetObjectMacro(LabelTextProperty,vtkTextProperty);
94  { this->Superclass::SetLabelTextProperty(p, type); }
96  { return this->Superclass::GetLabelTextProperty(type); }
98 
100 
101  vtkSetStringMacro(TextRotationArrayName);
102  vtkGetStringMacro(TextRotationArrayName);
104 
107  virtual unsigned long GetMTime();
108 
110  {
111  if (this->Renderer != ren)
112  {
113  this->Renderer = ren;
114  this->Modified();
115  }
116  }
117  vtkRenderer* GetRenderer() { return this->Renderer; }
118 
119 protected:
122  void LabelTree(vtkTree *tree, vtkDataArray *sectorInfo,
123  vtkDataArray *numericData, vtkStringArray *stringData, vtkUnicodeStringArray *uStringData,
124  int activeComp, int numComps, vtkViewport* viewport);
125  void GetVertexLabel(vtkIdType vertex, vtkDataArray *numericData,
126  vtkStringArray *stringData,
127  vtkUnicodeStringArray *uStringData,
128  int activeComp, int numComps,
129  char *string);
130 
131  //Returns true if the center of the sector is in the window
132  // along with the pixel dimensions (width, height) of the sector
133  bool PointInWindow(double *sinfo, double *newDim, double *textPosDC, vtkViewport *viewport);
134 
145  QImage* QtImage;
146  int WindowSize[2];
147 
148 private:
149  vtkQtTreeRingLabelMapper(const vtkQtTreeRingLabelMapper&); // Not implemented.
150  void operator=(const vtkQtTreeRingLabelMapper&); // Not implemented.
151 };
152 
153 
154 #endif
vtkQtTreeRingLabelMapper::RenderOverlay
virtual void RenderOverlay(vtkViewport *viewport, vtkActor2D *actor)
vtkGetObjectMacro
#define vtkGetObjectMacro(name, type)
Definition: vtkSetGet.h:232
vtkQtTreeRingLabelMapper::SetSectorsArrayName
virtual void SetSectorsArrayName(const char *name)
vtkPolyDataMapper2D
draw vtkPolyData onto the image plane
Definition: vtkPolyDataMapper2D.h:51
vtkQtTreeRingLabelMapper::Renderer
vtkRenderer * Renderer
Definition: vtkQtTreeRingLabelMapper.h:139
vtkUnicodeStringArray
Subclass of vtkAbstractArray that holds vtkUnicodeStrings.
Definition: vtkUnicodeStringArray.h:43
vtkIdType
int vtkIdType
Definition: vtkType.h:275
vtkQtTreeRingLabelMapper::TextRotationArrayName
char * TextRotationArrayName
Definition: vtkQtTreeRingLabelMapper.h:143
vtkPlaneSource
create an array of quadrilaterals located in a plane
Definition: vtkPlaneSource.h:60
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkObject::Modified
virtual void Modified()
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
VTKRENDERINGQT_EXPORT
#define VTKRENDERINGQT_EXPORT
Definition: vtkRenderingQtModule.h:15
vtkQtTreeRingLabelMapper::PlaneSource
vtkPlaneSource * PlaneSource
Definition: vtkQtTreeRingLabelMapper.h:138
vtkQtTreeRingLabelMapper::GetRenderer
vtkRenderer * GetRenderer()
Definition: vtkQtTreeRingLabelMapper.h:117
vtkQtTreeRingLabelMapper::RenderOpaqueGeometry
virtual void RenderOpaqueGeometry(vtkViewport *viewport, vtkActor2D *actor)
vtkQtTreeRingLabelMapper::SetLabelTextProperty
virtual void SetLabelTextProperty(vtkTextProperty *p)
vtkTree
A rooted tree data structure.
Definition: vtkTree.h:60
vtkTextureMapToPlane
generate texture coordinates by mapping points to plane
Definition: vtkTextureMapToPlane.h:52
vtkgl::name
GLuint const GLchar * name
Definition: vtkgl.h:11983
vtkTexture
handles properties associated with a texture map
Definition: vtkTexture.h:70
vtkQtTreeRingLabelMapper::QtImageSource
vtkQImageToImageSource * QtImageSource
Definition: vtkQtTreeRingLabelMapper.h:137
vtkQtTreeRingLabelMapper::PointInWindow
bool PointInWindow(double *sinfo, double *newDim, double *textPosDC, vtkViewport *viewport)
vtkQtTreeRingLabelMapper::~vtkQtTreeRingLabelMapper
~vtkQtTreeRingLabelMapper()
vtkQtTreeRingLabelMapper::VCoord
vtkCoordinate * VCoord
Definition: vtkQtTreeRingLabelMapper.h:136
vtkQtTreeRingLabelMapper::LabelTexture
vtkTexture * LabelTexture
Definition: vtkQtTreeRingLabelMapper.h:141
vtkQImageToImageSource
Create image data from a QImage.
Definition: vtkQImageToImageSource.h:35
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkSetStringMacro
#define vtkSetStringMacro(name)
Definition: vtkSetGet.h:104
vtkCoordinate
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems
Definition: vtkCoordinate.h:70
vtkQtTreeRingLabelMapper::GetVertexLabel
void GetVertexLabel(vtkIdType vertex, vtkDataArray *numericData, vtkStringArray *stringData, vtkUnicodeStringArray *uStringData, int activeComp, int numComps, char *string)
vtkQtTreeRingLabelMapper::LabelTree
void LabelTree(vtkTree *tree, vtkDataArray *sectorInfo, vtkDataArray *numericData, vtkStringArray *stringData, vtkUnicodeStringArray *uStringData, int activeComp, int numComps, vtkViewport *viewport)
vtkQtTreeRingLabelMapper::SetLabelTextProperty
virtual void SetLabelTextProperty(vtkTextProperty *p, int type)
Definition: vtkQtTreeRingLabelMapper.h:93
vtkQtTreeRingLabelMapper::New
static vtkQtTreeRingLabelMapper * New()
vtkGetStringMacro
vtkGetStringMacro(ExtensionsString)
vtkQtTreeRingLabelMapper::QtImage
QImage * QtImage
Definition: vtkQtTreeRingLabelMapper.h:145
vtkQtTreeRingLabelMapper::LabelTextProperty
vtkTextProperty * LabelTextProperty
Definition: vtkQtTreeRingLabelMapper.h:140
vtkQtTreeRingLabelMapper::CurrentViewPort
vtkViewport * CurrentViewPort
Definition: vtkQtTreeRingLabelMapper.h:135
vtkViewport
abstract specification for Viewports
Definition: vtkViewport.h:47
vtkTextProperty
represent text properties.
Definition: vtkTextProperty.h:39
vtkQtTreeRingLabelMapper::vtkQtTreeRingLabelMapper
vtkQtTreeRingLabelMapper()
vtkActor2D
a actor that draws 2D data
Definition: vtkActor2D.h:45
vtkLabeledDataMapper
draw text labels at dataset points
Definition: vtkLabeledDataMapper.h:74
vtkQtTreeRingLabelMapper::GetLabelTextProperty
virtual vtkTextProperty * GetLabelTextProperty(int type)
Definition: vtkQtTreeRingLabelMapper.h:95
vtkQtTreeRingLabelMapper::polyDataMapper
vtkPolyDataMapper2D * polyDataMapper
Definition: vtkQtTreeRingLabelMapper.h:144
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:64
vtkStringArray
a vtkAbstractArray subclass for strings
Definition: vtkStringArray.h:45
vtkQtTreeRingLabelMapper::GetMTime
virtual unsigned long GetMTime()
vtkgl::p
GLfloat GLfloat p
Definition: vtkgl.h:15717
vtkDoubleArray
dynamic, self-adjusting array of double
Definition: vtkDoubleArray.h:49
vtkQtTreeRingLabelMapper::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkQtTreeRingLabelMapper::TextureMapToPlane
vtkTextureMapToPlane * TextureMapToPlane
Definition: vtkQtTreeRingLabelMapper.h:142
vtkgl::type
GLuint GLuint GLsizei GLenum type
Definition: vtkgl.h:11315
vtkRenderingQtModule.h
vtkQtTreeRingLabelMapper::SetRenderer
void SetRenderer(vtkRenderer *ren)
Definition: vtkQtTreeRingLabelMapper.h:109
vtkQtTreeRingLabelMapper::GetInputTree
virtual vtkTree * GetInputTree()
vtkQtTreeRingLabelMapper
draw text labels on a tree map
Definition: vtkQtTreeRingLabelMapper.h:69
vtkLabeledDataMapper.h