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 -------------------------------------------------------------------------*/
47 #ifndef vtkQtTreeRingLabelMapper_h
48 #define vtkQtTreeRingLabelMapper_h
49 
50 #include "vtkRenderingQtModule.h" // For export macro
51 #include "vtkLabeledDataMapper.h"
52 
53 class QImage;
54 
56 class vtkCoordinate;
57 class vtkDoubleArray;
58 class vtkPlaneSource;
60 class vtkRenderer;
61 class vtkStringArray;
62 class vtkTexture;
64 class vtkTree;
66 
67 class VTKRENDERINGQT_EXPORT vtkQtTreeRingLabelMapper : public vtkLabeledDataMapper
68 {
69 public:
72  void PrintSelf(ostream& os, vtkIndent indent);
73 
75 
78  virtual void RenderOpaqueGeometry(vtkViewport* viewport, vtkActor2D* actor);
79  virtual void RenderOverlay(vtkViewport *viewport, vtkActor2D *actor);
81 
85  virtual vtkTree *GetInputTree();
86 
90  virtual void SetSectorsArrayName(const char* name);
91 
93 
99  vtkGetObjectMacro(LabelTextProperty,vtkTextProperty);
101  { this->Superclass::SetLabelTextProperty(p, type); }
103  { return this->Superclass::GetLabelTextProperty(type); }
105 
107 
110  vtkSetStringMacro(TextRotationArrayName);
111  vtkGetStringMacro(TextRotationArrayName);
113 
119 
121  {
122  if (this->Renderer != ren)
123  {
124  this->Renderer = ren;
125  this->Modified();
126  }
127  }
128  vtkRenderer* GetRenderer() { return this->Renderer; }
129 
130 protected:
133  void LabelTree(vtkTree *tree, vtkDataArray *sectorInfo,
134  vtkDataArray *numericData, vtkStringArray *stringData, vtkUnicodeStringArray *uStringData,
135  int activeComp, int numComps, vtkViewport* viewport);
136  void GetVertexLabel(vtkIdType vertex, vtkDataArray *numericData,
137  vtkStringArray *stringData,
138  vtkUnicodeStringArray *uStringData,
139  int activeComp, int numComps,
140  char *string);
141 
142  //Returns true if the center of the sector is in the window
143  // along with the pixel dimensions (width, height) of the sector
144  bool PointInWindow(double *sinfo, double *newDim, double *textPosDC, vtkViewport *viewport);
145 
156  QImage* QtImage;
157  int WindowSize[2];
158 
159 private:
160  vtkQtTreeRingLabelMapper(const vtkQtTreeRingLabelMapper&) VTK_DELETE_FUNCTION;
161  void operator=(const vtkQtTreeRingLabelMapper&) VTK_DELETE_FUNCTION;
162 };
163 
164 
165 #endif
a actor that draws 2D data
Definition: vtkActor2D.h:46
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems
Definition: vtkCoordinate.h:71
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
dynamic, self-adjusting array of double
a simple class to control print indentation
Definition: vtkIndent.h:40
draw text labels at dataset points
virtual void Modified()
Update the modification time for this object.
create an array of quadrilaterals located in a plane
draw vtkPolyData onto the image plane
Create image data from a QImage.
draw text labels on a tree map
virtual vtkMTimeType GetMTime()
Return the object's MTime.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkQImageToImageSource * QtImageSource
virtual void SetSectorsArrayName(const char *name)
The name of the 4-tuple array used for.
void LabelTree(vtkTree *tree, vtkDataArray *sectorInfo, vtkDataArray *numericData, vtkStringArray *stringData, vtkUnicodeStringArray *uStringData, int activeComp, int numComps, vtkViewport *viewport)
vtkTextureMapToPlane * TextureMapToPlane
virtual void SetLabelTextProperty(vtkTextProperty *p, int type)
virtual vtkTextProperty * GetLabelTextProperty(int type)
vtkPolyDataMapper2D * polyDataMapper
void SetRenderer(vtkRenderer *ren)
static vtkQtTreeRingLabelMapper * New()
virtual void RenderOverlay(vtkViewport *viewport, vtkActor2D *actor)
virtual void SetLabelTextProperty(vtkTextProperty *p)
Set/Get the text property.
virtual void RenderOpaqueGeometry(vtkViewport *viewport, vtkActor2D *actor)
Draw the text to the screen at each input point.
bool PointInWindow(double *sinfo, double *newDim, double *textPosDC, vtkViewport *viewport)
virtual vtkTree * GetInputTree()
The input to this filter.
void GetVertexLabel(vtkIdType vertex, vtkDataArray *numericData, vtkStringArray *stringData, vtkUnicodeStringArray *uStringData, int activeComp, int numComps, char *string)
abstract specification for renderers
Definition: vtkRenderer.h:64
a vtkAbstractArray subclass for strings
represent text properties.
generate texture coordinates by mapping points to plane
handles properties associated with a texture map
Definition: vtkTexture.h:71
A rooted tree data structure.
Definition: vtkTree.h:61
Subclass of vtkAbstractArray that holds vtkUnicodeStrings.
abstract specification for Viewports
Definition: vtkViewport.h:48
@ type
Definition: vtkX3D.h:516
@ name
Definition: vtkX3D.h:219
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
int vtkIdType
Definition: vtkType.h:287
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248