VTK  9.2.6
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
44#ifndef vtkQtTreeRingLabelMapper_h
45#define vtkQtTreeRingLabelMapper_h
46
48#include "vtkRenderingQtModule.h" // For export macro
49
50class QImage;
51
53class vtkCoordinate;
54class vtkDoubleArray;
55class vtkPlaneSource;
57class vtkRenderer;
58class vtkStringArray;
59class vtkTexture;
61class vtkTree;
62
63class VTKRENDERINGQT_EXPORT vtkQtTreeRingLabelMapper : public vtkLabeledDataMapper
64{
65public:
68 void PrintSelf(ostream& os, vtkIndent indent) override;
69
71
74 void RenderOpaqueGeometry(vtkViewport* viewport, vtkActor2D* actor) override;
75 void RenderOverlay(vtkViewport* viewport, vtkActor2D* actor) override;
77
82
86 virtual void SetSectorsArrayName(const char* name);
87
89
96 void SetLabelTextProperty(vtkTextProperty* p, int type) override
97 {
99 }
101 {
102 return this->Superclass::GetLabelTextProperty(type);
103 }
104
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
130protected:
133 void LabelTree(vtkTree* tree, vtkDataArray* sectorInfo, vtkDataArray* numericData,
134 vtkStringArray* stringData, int activeComp, int numComps, vtkViewport* viewport);
135 void GetVertexLabel(vtkIdType vertex, vtkDataArray* numericData, vtkStringArray* stringData,
136 int activeComp, int numComps, char* string, size_t stringSize);
137
138 // Returns true if the center of the sector is in the window
139 // along with the pixel dimensions (width, height) of the sector
140 bool PointInWindow(double* sinfo, double* newDim, double* textPosDC, vtkViewport* viewport);
141
152 QImage* QtImage;
154
155private:
157 void operator=(const vtkQtTreeRingLabelMapper&) = delete;
158};
159
160#endif
a actor that draws 2D data
Definition vtkActor2D.h:46
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems
dynamic, self-adjusting array of double
a simple class to control print indentation
Definition vtkIndent.h:40
virtual vtkTextProperty * GetLabelTextProperty()
Set/Get the text property.
virtual void SetLabelTextProperty(vtkTextProperty *p)
Set/Get the text property.
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.
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
Definition vtkRenderer.h:73
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:69
A rooted tree data structure.
Definition vtkTree.h:61
abstract specification for Viewports
Definition vtkViewport.h:56
#define vtkDataArray
int vtkIdType
Definition vtkType.h:332
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:287