VTK  9.1.0
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-------------------------------------------------------------------------*/
44#ifndef vtkQtTreeRingLabelMapper_h
45#define vtkQtTreeRingLabelMapper_h
46
47#include "vtkDeprecation.h" // for deprecation macros
49#include "vtkRenderingQtModule.h" // For export macro
50
51class QImage;
52
54class vtkCoordinate;
55class vtkDoubleArray;
56class vtkPlaneSource;
58class vtkRenderer;
59class vtkStringArray;
60class vtkTexture;
62class vtkTree;
64
65class VTKRENDERINGQT_EXPORT vtkQtTreeRingLabelMapper : public vtkLabeledDataMapper
66{
67public:
70 void PrintSelf(ostream& os, vtkIndent indent) override;
71
73
76 void RenderOpaqueGeometry(vtkViewport* viewport, vtkActor2D* actor) override;
77 void RenderOverlay(vtkViewport* viewport, vtkActor2D* actor) override;
79
84
88 virtual void SetSectorsArrayName(const char* name);
89
91
97 vtkTextProperty* GetLabelTextProperty() override { return this->LabelTextProperty; }
99 {
100 this->Superclass::SetLabelTextProperty(p, type);
101 }
103 {
104 return this->Superclass::GetLabelTextProperty(type);
105 }
107
109
112 vtkSetStringMacro(TextRotationArrayName);
113 vtkGetStringMacro(TextRotationArrayName);
115
121
123 {
124 if (this->Renderer != ren)
125 {
126 this->Renderer = ren;
127 this->Modified();
128 }
129 }
130 vtkRenderer* GetRenderer() { return this->Renderer; }
131
132protected:
135 void LabelTree(vtkTree* tree, vtkDataArray* sectorInfo, vtkDataArray* numericData,
136 vtkStringArray* stringData, int activeComp, int numComps, vtkViewport* viewport);
138 "Use void LabelTree(vtkTree* tree, vtkDataArray* sectorInfo, vtkDataArray* numericData, "
139 "vtkStringArray* stringData, int activeComp, int numComps, vtkViewport* viewport)")
140 void LabelTree(vtkTree* tree, vtkDataArray* sectorInfo, vtkDataArray* numericData,
141 vtkStringArray* stringData, vtkUnicodeStringArray* uStringData, int activeComp, int numComps,
142 vtkViewport* viewport);
143 void GetVertexLabel(vtkIdType vertex, vtkDataArray* numericData, vtkStringArray* stringData,
144 int activeComp, int numComps, char* string, size_t stringSize);
146 "Use void GetVertexLabel(vtkIdType vertex, vtkDataArray* numericData, vtkStringArray* "
147 "stringData, int activeComp, int numComps, char* string, size_t stringSize)")
148 void GetVertexLabel(vtkIdType vertex, vtkDataArray* numericData, vtkStringArray* stringData,
149 vtkUnicodeStringArray* uStringData, int activeComp, int numComps, char* string,
150 size_t stringSize);
151
152 // Returns true if the center of the sector is in the window
153 // along with the pixel dimensions (width, height) of the sector
154 bool PointInWindow(double* sinfo, double* newDim, double* textPosDC, vtkViewport* viewport);
155
156 vtkViewport* CurrentViewPort;
159 vtkPlaneSource* PlaneSource;
160 vtkRenderer* Renderer;
161 vtkTextProperty* LabelTextProperty;
162 vtkTexture* LabelTexture;
163 vtkTextureMapToPlane* TextureMapToPlane;
164 char* TextRotationArrayName;
165 vtkPolyDataMapper2D* polyDataMapper;
166 QImage* QtImage;
167 int WindowSize[2];
168
169private:
171 void operator=(const vtkQtTreeRingLabelMapper&) = delete;
172};
173
174#endif
a actor that draws 2D data
Definition: vtkActor2D.h:149
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:159
dynamic, self-adjusting array of double
a simple class to control print indentation
Definition: vtkIndent.h:113
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 void SetSectorsArrayName(const char *name)
The name of the 4-tuple array used for.
virtual vtkTree * GetInputTree()
The input to this filter.
void SetLabelTextProperty(vtkTextProperty *p, int type) override
Set/Get the text property.
void RenderOverlay(vtkViewport *viewport, vtkActor2D *actor) override
Draw the text to the screen at each input point.
static vtkQtTreeRingLabelMapper * New()
void LabelTree(vtkTree *tree, vtkDataArray *sectorInfo, vtkDataArray *numericData, vtkStringArray *stringData, int activeComp, int numComps, vtkViewport *viewport)
void SetRenderer(vtkRenderer *ren)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTextProperty * GetLabelTextProperty() override
Set/Get the text property.
vtkTextProperty * GetLabelTextProperty(int type) override
Set/Get the text property.
void SetLabelTextProperty(vtkTextProperty *p) override
Set/Get the text property.
void RenderOpaqueGeometry(vtkViewport *viewport, vtkActor2D *actor) override
Draw the text to the screen at each input point.
vtkMTimeType GetMTime() override
Return the object's MTime.
~vtkQtTreeRingLabelMapper() override
abstract specification for renderers
Definition: vtkRenderer.h:173
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:175
A rooted tree data structure.
Definition: vtkTree.h:164
Subclass of vtkAbstractArray that holds vtkUnicodeStrings.
abstract specification for Viewports
Definition: vtkViewport.h:47
@ type
Definition: vtkX3D.h:522
@ name
Definition: vtkX3D.h:225
#define VTK_DEPRECATED_IN_9_1_0(reason)
int vtkIdType
Definition: vtkType.h:332
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287