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:
70  static vtkQtTreeRingLabelMapper *New();
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 
98  virtual void SetLabelTextProperty(vtkTextProperty *p);
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 
118  virtual vtkMTimeType GetMTime();
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
Create image data from a QImage.
virtual void SetLabelTextProperty(vtkTextProperty *p, int type)
Set/Get the text property.
draw text labels on a tree map
Subclass of vtkAbstractArray that holds vtkUnicodeStrings.
static vtkLabeledDataMapper * New()
Instantiate object with %%-#6.3g label format.
abstract specification for Viewports
Definition: vtkViewport.h:47
virtual vtkMTimeType GetMTime()
Return the modified time for this object.
a actor that draws 2D data
Definition: vtkActor2D.h:45
a vtkAbstractArray subclass for strings
abstract specification for renderers
Definition: vtkRenderer.h:63
int vtkIdType
Definition: vtkType.h:287
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248
dynamic, self-adjusting array of double
draw text labels at dataset points
void RenderOverlay(vtkViewport *viewport, vtkActor2D *actor)
Draw the text to the screen at each input point.
a simple class to control print indentation
Definition: vtkIndent.h:39
void SetRenderer(vtkRenderer *ren)
virtual vtkTextProperty * GetLabelTextProperty(int type)
Set/Get the text property.
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
handles properties associated with a texture map
Definition: vtkTexture.h:70
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
virtual void Modified()
Update the modification time for this object.
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:70
vtkTextureMapToPlane * TextureMapToPlane
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkPolyDataMapper2D * polyDataMapper
A rooted tree data structure.
Definition: vtkTree.h:60
void RenderOpaqueGeometry(vtkViewport *viewport, vtkActor2D *actor)
Draw the text to the screen at each input point.
draw vtkPolyData onto the image plane
generate texture coordinates by mapping points to plane
virtual void SetLabelTextProperty(vtkTextProperty *p)
Set/Get the text property.