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 -------------------------------------------------------------------------*/
43 #ifndef __vtkQtTreeRingLabelMapper_h
44 #define __vtkQtTreeRingLabelMapper_h
45 
46 #include "vtkLabeledDataMapper.h"
47 
48 //BTX
49 class QImage;
50 //ETX
51 
53 class vtkCoordinate;
54 class vtkDoubleArray;
55 class vtkPlaneSource;
57 class vtkRenderer;
58 class vtkStringArray;
59 class vtkTexture;
61 class vtkTree;
63 
65 {
66 public:
67  static vtkQtTreeRingLabelMapper *New();
69  void PrintSelf(ostream& os, vtkIndent indent);
70 
72 
73  virtual void RenderOpaqueGeometry(vtkViewport* viewport, vtkActor2D* actor);
74  virtual void RenderOverlay(vtkViewport *viewport, vtkActor2D *actor);
76 
78  virtual vtkTree *GetInputTree();
79 
81  virtual void SetSectorsArrayName(const char* name);
82 
84 
87  virtual void SetLabelTextProperty(vtkTextProperty *p);
88  vtkGetObjectMacro(LabelTextProperty,vtkTextProperty);
90  { this->Superclass::SetLabelTextProperty(p, type); }
92  { return this->Superclass::GetLabelTextProperty(type); }
94 
96 
97  vtkSetStringMacro(TextRotationArrayName);
98  vtkGetStringMacro(TextRotationArrayName);
100 
103  virtual unsigned long GetMTime();
104 
106  {
107  if (this->Renderer != ren)
108  {
109  this->Renderer = ren;
110  this->Modified();
111  }
112  }
113  vtkRenderer* GetRenderer() { return this->Renderer; }
114 
115 protected:
118  void LabelTree(vtkTree *tree, vtkDataArray *sectorInfo,
119  vtkDataArray *numericData, vtkStringArray *stringData, vtkUnicodeStringArray *uStringData,
120  int activeComp, int numComps, vtkViewport* viewport);
121  void GetVertexLabel(vtkIdType vertex, vtkDataArray *numericData,
122  vtkStringArray *stringData,
123  vtkUnicodeStringArray *uStringData,
124  int activeComp, int numComps,
125  char *string);
126 
127  //Returns true if the center of the sector is in the window
128  // along with the pixel dimensions (width, height) of the sector
129  bool PointInWindow(double *sinfo, double *newDim, double *textPosDC, vtkViewport *viewport);
130 
141  QImage* QtImage;
142  int WindowSize[2];
143 
144 private:
145  vtkQtTreeRingLabelMapper(const vtkQtTreeRingLabelMapper&); // Not implemented.
146  void operator=(const vtkQtTreeRingLabelMapper&); // Not implemented.
147 };
148 
149 
150 #endif
Create image data from a QImage.
virtual void SetLabelTextProperty(vtkTextProperty *p, int type)
draw text labels on a tree map
Subclass of vtkAbstractArray that holds vtkUnicodeStrings.
static vtkLabeledDataMapper * New()
abstract specification for Viewports
Definition: vtkViewport.h:45
virtual unsigned long GetMTime()
a actor that draws 2D data
Definition: vtkActor2D.h:43
a vtkAbstractArray subclass for strings
abstract specification for renderers
Definition: vtkRenderer.h:69
int vtkIdType
Definition: vtkType.h:255
dynamic, self-adjusting array of double
draw text labels at dataset points
void RenderOverlay(vtkViewport *viewport, vtkActor2D *actor)
a simple class to control print indentation
Definition: vtkIndent.h:37
void SetRenderer(vtkRenderer *ren)
virtual vtkTextProperty * GetLabelTextProperty(int type)
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:53
handles properties associated with a texture map
Definition: vtkTexture.h:68
virtual void Modified()
vtkQImageToImageSource * QtImageSource
represent text properties.
create an array of quadrilaterals located in a plane
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems ...
Definition: vtkCoordinate.h:68
#define VTK_RENDERING_EXPORT
vtkTextureMapToPlane * TextureMapToPlane
void PrintSelf(ostream &os, vtkIndent indent)
vtkPolyDataMapper2D * polyDataMapper
A rooted tree data structure.
Definition: vtkTree.h:58
void RenderOpaqueGeometry(vtkViewport *viewport, vtkActor2D *actor)
draw vtkPolyData onto the image plane
generate texture coordinates by mapping points to plane
virtual void SetLabelTextProperty(vtkTextProperty *p)