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-------------------------------------------------------------------------*/
44
45#ifndef vtkLabelPlacer_h
46#define vtkLabelPlacer_h
47
49#include "vtkRenderingLabelModule.h" // For export macro
50
51class vtkRenderer;
52class vtkCoordinate;
54
55class VTKRENDERINGLABEL_EXPORT vtkLabelPlacer : public vtkPolyDataAlgorithm
56{
57public:
60 void PrintSelf(ostream& os, vtkIndent indent) override;
61
62 vtkGetObjectMacro(Renderer, vtkRenderer);
63 virtual void SetRenderer(vtkRenderer*);
64
65 vtkGetObjectMacro(AnchorTransform, vtkCoordinate);
66
103
106 {
107 WORLD = 0,
110 };
111
113
116 virtual void SetGravity(int gravity);
117 vtkGetMacro(Gravity, int);
119
121
125 vtkSetClampMacro(MaximumLabelFraction, double, 0., 1.);
126 vtkGetMacro(MaximumLabelFraction, double);
128
130
134 vtkSetMacro(IteratorType, int);
135 vtkGetMacro(IteratorType, int);
137
139
141
146 vtkGetMacro(PositionsAsNormals, bool);
147 vtkSetMacro(PositionsAsNormals, bool);
148 vtkBooleanMacro(PositionsAsNormals, bool);
150
152
158 vtkBooleanMacro(GeneratePerturbedLabelSpokes, bool);
160
162
166 vtkGetMacro(UseDepthBuffer, bool);
167 vtkSetMacro(UseDepthBuffer, bool);
168 vtkBooleanMacro(UseDepthBuffer, bool);
170
172
175 vtkGetMacro(OutputTraversedBounds, bool);
176 vtkSetMacro(OutputTraversedBounds, bool);
177 vtkBooleanMacro(OutputTraversedBounds, bool);
179
181
185 vtkGetMacro(OutputCoordinateSystem, int);
186 vtkSetClampMacro(OutputCoordinateSystem, int, WORLD, DISPLAY);
190
191protected:
193 ~vtkLabelPlacer() override;
194
196
197 int FillInputPortInformation(int port, vtkInformation* info) override;
199 vtkInformationVector* outputVector) override;
200
201 class Internal;
202 Internal* Buckets;
203
213
221
222private:
223 vtkLabelPlacer(const vtkLabelPlacer&) = delete;
224 void operator=(const vtkLabelPlacer&) = delete;
225};
226
227#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:40
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:73
extract points that are visible (based on z-buffer calculation)
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:287