VTK  9.4.20250206
vtkQtTreeRingLabelMapper.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-FileCopyrightText: Copyright 2008 Sandia Corporation
3// SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
28#ifndef vtkQtTreeRingLabelMapper_h
29#define vtkQtTreeRingLabelMapper_h
30
32#include "vtkRenderingQtModule.h" // For export macro
33
34class QImage;
35
36VTK_ABI_NAMESPACE_BEGIN
37
39class vtkCoordinate;
40class vtkDoubleArray;
41class vtkPlaneSource;
43class vtkRenderer;
44class vtkStringArray;
45class vtkTexture;
47class vtkTree;
48
49class VTKRENDERINGQT_EXPORT vtkQtTreeRingLabelMapper : public vtkLabeledDataMapper
50{
51public:
54 void PrintSelf(ostream& os, vtkIndent indent) override;
55
57
60 void RenderOpaqueGeometry(vtkViewport* viewport, vtkActor2D* actor) override;
61 void RenderOverlay(vtkViewport* viewport, vtkActor2D* actor) override;
63
68
72 virtual void SetSectorsArrayName(const char* name);
73
75
81 vtkTextProperty* GetLabelTextProperty() override { return this->LabelTextProperty; }
82 void SetLabelTextProperty(vtkTextProperty* p, int type) override
83 {
84 this->Superclass::SetLabelTextProperty(p, type);
85 }
87 {
88 return this->Superclass::GetLabelTextProperty(type);
89 }
91
93
96 vtkSetStringMacro(TextRotationArrayName);
97 vtkGetStringMacro(TextRotationArrayName);
99
105
107 {
108 if (this->Renderer != ren)
109 {
110 this->Renderer = ren;
111 this->Modified();
112 }
113 }
114 vtkRenderer* GetRenderer() { return this->Renderer; }
115
116protected:
119 void LabelTree(vtkTree* tree, vtkDataArray* sectorInfo, vtkDataArray* numericData,
120 vtkStringArray* stringData, int activeComp, int numComps, vtkViewport* viewport);
121 void GetVertexLabel(vtkIdType vertex, vtkDataArray* numericData, vtkStringArray* stringData,
122 int activeComp, int numComps, char* string, size_t stringSize);
123
124 // Returns true if the center of the sector is in the window
125 // along with the pixel dimensions (width, height) of the sector
126 bool PointInWindow(double* sinfo, double* newDim, double* textPosDC, vtkViewport* viewport);
127
138 QImage* QtImage;
139 int WindowSize[2];
140
141private:
143 void operator=(const vtkQtTreeRingLabelMapper&) = delete;
144};
145
146VTK_ABI_NAMESPACE_END
147#endif
a actor that draws 2D data
Definition vtkActor2D.h:145
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems
abstract superclass for arrays of numeric data
dynamic, self-adjusting array of double
a simple class to control print indentation
Definition vtkIndent.h:108
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
vtkQImageToImageSource * QtImageSource
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.
vtkTextureMapToPlane * TextureMapToPlane
void GetVertexLabel(vtkIdType vertex, vtkDataArray *numericData, vtkStringArray *stringData, int activeComp, int numComps, char *string, size_t stringSize)
vtkPolyDataMapper2D * polyDataMapper
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.
bool PointInWindow(double *sinfo, double *newDim, double *textPosDC, vtkViewport *viewport)
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
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:168
A rooted tree data structure.
Definition vtkTree.h:155
abstract specification for Viewports
Definition vtkViewport.h:65
int vtkIdType
Definition vtkType.h:315
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:270