VTK  9.2.6
vtkLabelPlacer.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkLabelPlacer.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-------------------------------------------------------------------------*/
41
42#ifndef vtkLabelPlacer_h
43#define vtkLabelPlacer_h
44
46#include "vtkRenderingLabelModule.h" // For export macro
47
48class vtkRenderer;
49class vtkCoordinate;
51
52class VTKRENDERINGLABEL_EXPORT vtkLabelPlacer : public vtkPolyDataAlgorithm
53{
54public:
57 void PrintSelf(ostream& os, vtkIndent indent) override;
58
59 vtkGetObjectMacro(Renderer, vtkRenderer);
60 virtual void SetRenderer(vtkRenderer*);
61
62 vtkGetObjectMacro(AnchorTransform, vtkCoordinate);
63
100
103 {
104 WORLD = 0,
107 };
108
110
113 virtual void SetGravity(int gravity);
114 vtkGetMacro(Gravity, int);
116
118
122 vtkSetClampMacro(MaximumLabelFraction, double, 0., 1.);
123 vtkGetMacro(MaximumLabelFraction, double);
125
127
131 vtkSetMacro(IteratorType, int);
132 vtkGetMacro(IteratorType, int);
134
136
138
143 vtkGetMacro(PositionsAsNormals, bool);
144 vtkSetMacro(PositionsAsNormals, bool);
145 vtkBooleanMacro(PositionsAsNormals, bool);
147
149
155 vtkBooleanMacro(GeneratePerturbedLabelSpokes, bool);
157
159
163 vtkGetMacro(UseDepthBuffer, bool);
164 vtkSetMacro(UseDepthBuffer, bool);
165 vtkBooleanMacro(UseDepthBuffer, bool);
167
169
172 vtkGetMacro(OutputTraversedBounds, bool);
173 vtkSetMacro(OutputTraversedBounds, bool);
174 vtkBooleanMacro(OutputTraversedBounds, bool);
176
178
182 vtkGetMacro(OutputCoordinateSystem, int);
183 vtkSetClampMacro(OutputCoordinateSystem, int, WORLD, DISPLAY);
187
188protected:
190 ~vtkLabelPlacer() override;
191
193
194 int FillInputPortInformation(int port, vtkInformation* info) override;
196 vtkInformationVector* outputVector) override;
197
198 class Internal;
199 Internal* Buckets;
200
210
218
219private:
220 vtkLabelPlacer(const vtkLabelPlacer&) = delete;
221 void operator=(const vtkLabelPlacer&) = delete;
222};
223
224#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:34
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.
@ CenterLeft
The anchor is at the far left edge of the label at the vertical center of the bounding box.
@ BaselineCenter
The anchor is centered left-to-right at the text baseline of the bounding box, or the bottom for imag...
@ 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.
@ BaselineLeft
The anchor is on the text baseline (or bottom for images) at the left edge of the label's bounding bo...
@ 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.
@ CenterRight
The anchor is at the far right edge of the label at the vertical center 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.
@ BaselineRight
The anchor is on the text baseline (or bottom for images) at the right edge of the label's bounding b...
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.
@ DISPLAY
Output 2-D display coordinates for each label anchor (3 components but only 2 are significant).
@ 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:67
extract points that are visible (based on z-buffer calculation)
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:287