VTK
vtkLabeledContourMapper.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkLabeledContourMapper.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=========================================================================*/
32#ifndef vtkLabeledContourMapper_h
33#define vtkLabeledContourMapper_h
34
35#include "vtkRenderingCoreModule.h" // For export macro
36
37#include "vtkMapper.h"
38#include "vtkNew.h" // For vtkNew
39#include "vtkSmartPointer.h" // For vtkSmartPointer
40
41class vtkDoubleArray;
42class vtkTextActor3D;
43class vtkTextProperty;
45class vtkPolyData;
47
48class VTKRENDERINGCORE_EXPORT vtkLabeledContourMapper : public vtkMapper
49{
50public:
53 void PrintSelf(ostream& os, vtkIndent indent);
54
55 virtual void Render(vtkRenderer *ren, vtkActor *act);
56
58
61 void SetInputData(vtkPolyData *in);
62 vtkPolyData *GetInput();
64
66
70 virtual double *GetBounds();
71 virtual void GetBounds(double bounds[6]);
73
81 virtual void SetTextProperty(vtkTextProperty *tprop);
82
84
101 virtual void SetTextProperties(vtkTextPropertyCollection *coll);
102 virtual vtkTextPropertyCollection *GetTextProperties();
104
106
112 virtual vtkDoubleArray* GetTextPropertyMapping();
113 virtual void SetTextPropertyMapping(vtkDoubleArray *mapping);
115
117
122 vtkSetMacro(LabelVisibility, bool)
123 vtkGetMacro(LabelVisibility, bool)
124 vtkBooleanMacro(LabelVisibility, bool)
126
128
132 vtkSetMacro(SkipDistance, double)
133 vtkGetMacro(SkipDistance, double)
135
137
140 vtkGetNewMacro(PolyDataMapper, vtkPolyDataMapper)
142
143 virtual void ReleaseGraphicsResources(vtkWindow *);
144
145protected:
148
149 virtual void ComputeBounds();
150
151 virtual int FillInputPortInformation(int, vtkInformation*);
152
153 void Reset();
154
155 bool CheckInputs(vtkRenderer *ren);
156 bool CheckRebuild(vtkRenderer *ren, vtkActor *act);
157 bool PrepareRender(vtkRenderer *ren, vtkActor *act);
158 bool PlaceLabels();
159 bool ResolveLabels();
160 virtual bool CreateLabels(vtkActor *actor);
161 bool BuildStencilQuads();
162 virtual bool ApplyStencil(vtkRenderer *ren, vtkActor *act);
163 bool RenderPolyData(vtkRenderer *ren, vtkActor *act);
164 virtual bool RemoveStencil();
165 bool RenderLabels(vtkRenderer *ren, vtkActor *act);
166
167 bool AllocateTextActors(vtkIdType num);
168 bool FreeTextActors();
169
170 double SkipDistance;
171
172 bool LabelVisibility;
173 vtkIdType NumberOfTextActors;
174 vtkIdType NumberOfUsedTextActors;
175 vtkTextActor3D **TextActors;
176
177 vtkNew<vtkPolyDataMapper> PolyDataMapper;
179 vtkSmartPointer<vtkDoubleArray> TextPropertyMapping;
180
181 float *StencilQuads;
182 vtkIdType StencilQuadsSize;
183 unsigned int *StencilQuadIndices;
184 vtkIdType StencilQuadIndicesSize;
185 void FreeStencilQuads();
186
187 vtkTimeStamp LabelBuildTime;
188
189private:
190 vtkLabeledContourMapper(const vtkLabeledContourMapper&) VTK_DELETE_FUNCTION;
191 void operator=(const vtkLabeledContourMapper&) VTK_DELETE_FUNCTION;
192
193 struct Private;
194 Private *Internal;
195};
196
197#endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:52
dynamic, self-adjusting array of double
a simple class to control print indentation
Definition: vtkIndent.h:40
Store vtkAlgorithm input/output information.
Draw labeled isolines.
static vtkLabeledContourMapper * New()
abstract class specifies interface to map data to graphics primitives
Definition: vtkMapper.h:92
Allocate and hold a VTK object.
Definition: vtkNew.h:68
map vtkPolyData to graphics primitives
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:86
abstract specification for renderers
Definition: vtkRenderer.h:64
Hold a reference to a vtkObjectBase instance.
An actor that displays text.
a list of vtkTextProperty objects.
represent text properties.
record modification and/or execution time
Definition: vtkTimeStamp.h:36
window superclass for vtkRenderWindow
Definition: vtkWindow.h:35
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
int vtkIdType
Definition: vtkType.h:287