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 
68 class VTKRENDERINGQT_EXPORT vtkQtTreeRingLabelMapper : public vtkLabeledDataMapper
69 {
70 public:
71  static vtkQtTreeRingLabelMapper *New();
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 
91  virtual void SetLabelTextProperty(vtkTextProperty *p);
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
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:46
virtual unsigned long GetMTime()
a actor that draws 2D data
Definition: vtkActor2D.h:44
a vtkAbstractArray subclass for strings
abstract specification for renderers
Definition: vtkRenderer.h:63
int vtkIdType
Definition: vtkType.h:275
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:38
void SetRenderer(vtkRenderer *ren)
virtual vtkTextProperty * GetLabelTextProperty(int type)
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
handles properties associated with a texture map
Definition: vtkTexture.h:69
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:69
vtkTextureMapToPlane * TextureMapToPlane
void PrintSelf(ostream &os, vtkIndent indent)
vtkPolyDataMapper2D * polyDataMapper
A rooted tree data structure.
Definition: vtkTree.h:59
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)