VTK  9.4.20251007
vtkLabelPlacer.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
29#ifndef vtkLabelPlacer_h
30#define vtkLabelPlacer_h
31
33#include "vtkRenderingLabelModule.h" // For export macro
34
35VTK_ABI_NAMESPACE_BEGIN
36class vtkRenderer;
37class vtkCoordinate;
39
40class VTKRENDERINGLABEL_EXPORT vtkLabelPlacer : public vtkPolyDataAlgorithm
41{
42public:
45 void PrintSelf(ostream& os, vtkIndent indent) override;
46
47 vtkGetObjectMacro(Renderer, vtkRenderer);
48 virtual void SetRenderer(vtkRenderer*);
49
50 vtkGetObjectMacro(AnchorTransform, vtkCoordinate);
51
88
91 {
92 WORLD = 0,
95 };
96
98
101 virtual void SetGravity(int gravity);
102 vtkGetMacro(Gravity, int);
104
106
110 vtkSetClampMacro(MaximumLabelFraction, double, 0., 1.);
111 vtkGetMacro(MaximumLabelFraction, double);
113
115
119 vtkSetMacro(IteratorType, int);
120 vtkGetMacro(IteratorType, int);
122
124
126
131 vtkGetMacro(PositionsAsNormals, bool);
132 vtkSetMacro(PositionsAsNormals, bool);
133 vtkBooleanMacro(PositionsAsNormals, bool);
135
137
143 vtkBooleanMacro(GeneratePerturbedLabelSpokes, bool);
145
147
151 vtkGetMacro(UseDepthBuffer, bool);
152 vtkSetMacro(UseDepthBuffer, bool);
153 vtkBooleanMacro(UseDepthBuffer, bool);
155
157
160 vtkGetMacro(OutputTraversedBounds, bool);
161 vtkSetMacro(OutputTraversedBounds, bool);
162 vtkBooleanMacro(OutputTraversedBounds, bool);
164
166
170 vtkGetMacro(OutputCoordinateSystem, int);
171 vtkSetClampMacro(OutputCoordinateSystem, int, WORLD, DISPLAY);
175
176protected:
178 ~vtkLabelPlacer() override;
179
181
182 int FillInputPortInformation(int port, vtkInformation* info) override;
184 vtkInformationVector* outputVector) override;
185
186 class Internal;
187 Internal* Buckets;
188
198
206
207private:
208 vtkLabelPlacer(const vtkLabelPlacer&) = delete;
209 void operator=(const vtkLabelPlacer&) = delete;
210};
211
212VTK_ABI_NAMESPACE_END
213#endif // vtkLabelPlacer_h
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems
a simple class to control print indentation
Definition vtkIndent.h:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
virtual void SetRenderer(vtkRenderer *)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Internal * Buckets
double MaximumLabelFraction
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
LabelGravity
Specifications for the placement of the label relative to an anchor point.
@ LowerLeft
The anchor is at the lower left corner of the label's bounding box.
@ LowerRight
The anchor is at the lower right corner of the label's bounding box.
@ UpperLeft
The anchor is at the upper left corner of the label's bounding box.
@ LowerCenter
The anchor is centered left-to-right at the lower edge of the bounding box.
@ CenterCenter
The anchor is centered left-to-right at the vertical midpoint of the bounding box.
@ UpperRight
The anchor is at the upper right corner of the label's bounding box.
@ UpperCenter
The anchor is centered left-to-right at the top edge of the bounding box.
void OutputCoordinateSystemWorld()
Set/get the coordinate system used for output labels.
double LastCameraPosition[3]
static vtkLabelPlacer * New()
vtkCoordinate * AnchorTransform
virtual void SetAnchorTransform(vtkCoordinate *)
~vtkLabelPlacer() override
double LastCameraViewUp[3]
vtkMTimeType GetMTime() override
Return this object's modified time.
void OutputCoordinateSystemDisplay()
Set/get the coordinate system used for output labels.
vtkRenderer * Renderer
OutputCoordinates
Coordinate systems that output dataset may use.
@ WORLD
Output 3-D world-space coordinates for each label anchor.
virtual void SetGravity(int gravity)
The placement of the label relative to the anchor point.
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called by the superclass.
vtkSelectVisiblePoints * VisiblePoints
double LastCameraParallelScale
bool GeneratePerturbedLabelSpokes
double LastCameraFocalPoint[3]
virtual void SetOutputCoordinateSystem(int)
Set/get the coordinate system used for output labels.
abstract specification for renderers
Definition vtkRenderer.h:63
extract points that are visible (based on z-buffer calculation)
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:270