VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 "vtkRenderingQtModule.h" // For export macro
47 #include "vtkLabeledDataMapper.h"
48 
49 //BTX
50 class QImage;
51 //ETX
52 
54 class vtkCoordinate;
55 class vtkDoubleArray;
56 class vtkPlaneSource;
58 class vtkRenderer;
59 class vtkStringArray;
60 class vtkTexture;
62 class vtkTree;
64 
66 {
67 public:
68  static vtkQtTreeRingLabelMapper *New();
70  void PrintSelf(ostream& os, vtkIndent indent);
71 
73 
74  virtual void RenderOpaqueGeometry(vtkViewport* viewport, vtkActor2D* actor);
75  virtual void RenderOverlay(vtkViewport *viewport, vtkActor2D *actor);
77 
79  virtual vtkTree *GetInputTree();
80 
82  virtual void SetSectorsArrayName(const char* name);
83 
85 
88  virtual void SetLabelTextProperty(vtkTextProperty *p);
89  vtkGetObjectMacro(LabelTextProperty,vtkTextProperty);
91  { this->Superclass::SetLabelTextProperty(p, type); }
93  { return this->Superclass::GetLabelTextProperty(type); }
95 
97 
98  vtkSetStringMacro(TextRotationArrayName);
99  vtkGetStringMacro(TextRotationArrayName);
101 
104  virtual unsigned long GetMTime();
105 
107  {
108  if (this->Renderer != ren)
109  {
110  this->Renderer = ren;
111  this->Modified();
112  }
113  }
114  vtkRenderer* GetRenderer() { return this->Renderer; }
115 
116 protected:
119  void LabelTree(vtkTree *tree, vtkDataArray *sectorInfo,
120  vtkDataArray *numericData, vtkStringArray *stringData, vtkUnicodeStringArray *uStringData,
121  int activeComp, int numComps, vtkViewport* viewport);
122  void GetVertexLabel(vtkIdType vertex, vtkDataArray *numericData,
123  vtkStringArray *stringData,
124  vtkUnicodeStringArray *uStringData,
125  int activeComp, int numComps,
126  char *string);
127 
128  //Returns true if the center of the sector is in the window
129  // along with the pixel dimensions (width, height) of the sector
130  bool PointInWindow(double *sinfo, double *newDim, double *textPosDC, vtkViewport *viewport);
131 
142  QImage* QtImage;
143  int WindowSize[2];
144 
145 private:
146  vtkQtTreeRingLabelMapper(const vtkQtTreeRingLabelMapper&); // Not implemented.
147  void operator=(const vtkQtTreeRingLabelMapper&); // Not implemented.
148 };
149 
150 
151 #endif
Create image data from a QImage.
virtual void SetLabelTextProperty(vtkTextProperty *p, int type)
draw text labels on a tree map
GLuint GLuint GLsizei GLenum type
Definition: vtkgl.h:11315
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:268
#define vtkSetStringMacro(name)
Definition: vtkSetGet.h:94
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:619
dynamic, self-adjusting array of double
draw text labels at dataset points
void RenderOverlay(vtkViewport *viewport, vtkActor2D *actor)
GLuint const GLchar * name
Definition: vtkgl.h:11983
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:53
handles properties associated with a texture map
Definition: vtkTexture.h:69
virtual void Modified()
vtkQImageToImageSource * QtImageSource
#define vtkGetStringMacro(name)
Definition: vtkSetGet.h:120
represent text properties.
#define vtkGetObjectMacro(name, type)
Definition: vtkSetGet.h:222
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)
#define VTKRENDERINGQT_EXPORT
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)
GLfloat GLfloat p
Definition: vtkgl.h:15717