VTK  9.6.20260520
vtkContour3DLinearGrid.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
85
86#ifndef vtkContour3DLinearGrid_h
87#define vtkContour3DLinearGrid_h
88
89#include "vtkContourValues.h" // Needed for inline methods
91#include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_7_0
92#include "vtkFiltersCoreModule.h" // For export macro
93#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
94
95VTK_ABI_NAMESPACE_BEGIN
96class vtkPolyData;
98class vtkScalarTree;
99struct vtkScalarTreeMap;
100
102{
103public:
105
110 void PrintSelf(ostream& os, vtkIndent indent) override;
112
114
117 void SetValue(int i, double value);
118 double GetValue(int i);
119 double* GetValues();
120 void GetValues(double* contourValues);
121 void SetNumberOfContours(int number);
123 void GenerateValues(int numContours, double range[2]);
124 void GenerateValues(int numContours, double rangeStart, double rangeEnd);
126
128
133 VTK_DEPRECATED_IN_9_7_0("No longer needed, points are always merged")
135 VTK_DEPRECATED_IN_9_7_0("No longer needed, points are always merged")
137 VTK_DEPRECATED_IN_9_7_0("No longer needed, points are always merged")
138 virtual void SetMergePointsOn();
139 VTK_DEPRECATED_IN_9_7_0("No longer needed, points are always merged")
140 virtual void SetMergePointsOff();
142
144
152
154
161 vtkBooleanMacro(ComputeNormals, vtkTypeBool);
163
165
173 vtkBooleanMacro(ComputeScalars, vtkTypeBool);
175
177
182 vtkSetMacro(OutputPointsPrecision, int);
183 vtkGetMacro(OutputPointsPrecision, int);
185
191
193
200 vtkBooleanMacro(UseScalarTree, vtkTypeBool);
202
204
209 vtkGetObjectMacro(ScalarTree, vtkScalarTree);
211
213
225
227
237
243
252 bool GetLargeIds() { return this->LargeIds; }
253
260 static bool CanFullyProcessDataObject(vtkDataObject* object, const char* scalarArrayName);
261
262protected:
265
275 bool LargeIds; // indicate whether integral ids are large(==true) or not
276
277 // Manage scalar trees, including mapping scalar tree to input dataset
280 struct vtkScalarTreeMap* ScalarTreeMap;
281
282 // Process the data: input unstructured grid and output polydata
283 void ProcessPiece(vtkUnstructuredGrid* input, vtkDataArray* inScalars, vtkPolyData* output);
284
286 vtkInformationVector* outputVector) override;
288 vtkInformationVector* outputVector) override;
289 int FillInputPortInformation(int port, vtkInformation* info) override;
290
291private:
293 void operator=(const vtkContour3DLinearGrid&) = delete;
294};
295
300inline void vtkContour3DLinearGrid::SetValue(int i, double value)
301{
302 this->ContourValues->SetValue(i, value);
303}
304
309{
310 return this->ContourValues->GetValue(i);
311}
312
318{
319 return this->ContourValues->GetValues();
320}
321
327inline void vtkContour3DLinearGrid::GetValues(double* contourValues)
328{
329 this->ContourValues->GetValues(contourValues);
330}
331
338{
339 this->ContourValues->SetNumberOfContours(number);
340}
341
346{
347 return this->ContourValues->GetNumberOfContours();
348}
349
354inline void vtkContour3DLinearGrid::GenerateValues(int numContours, double range[2])
355{
356 this->ContourValues->GenerateValues(numContours, range);
357}
358
364 int numContours, double rangeStart, double rangeEnd)
365{
366 this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);
367}
368
369VTK_ABI_NAMESPACE_END
370#endif
static bool CanFullyProcessDataObject(vtkDataObject *object, const char *scalarArrayName)
Returns true if the data object passed in is fully supported by this filter, i.e.,...
bool GetLargeIds()
Inform the user as to whether large ids were used during filter execution.
static vtkContour3DLinearGrid * New()
Standard methods for construction, type info, and printing.
vtkMTimeType GetMTime() override
Overloaded GetMTime() because of delegation to the internal vtkContourValues class.
double * GetValues()
Get a pointer to an array of contour values.
virtual void SetScalarTree(vtkScalarTree *)
Specify the scalar tree to use.
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
void ProcessPiece(vtkUnstructuredGrid *input, vtkDataArray *inScalars, vtkPolyData *output)
void SetNumberOfContours(int number)
Set the number of contours to place into the list.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkIdType GetNumberOfContours()
Get the number of contours in the list of contour values.
int RequestDataObject(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called by the superclass.
void SetValue(int i, double value)
Methods to set / get contour values.
struct vtkScalarTreeMap * ScalarTreeMap
~vtkContour3DLinearGrid() override
virtual void SetMergePointsOn()
Indicate whether to merge coincident points.
double GetValue(int i)
Get the ith contour value.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for construction, type info, and printing.
int GetNumberOfThreadsUsed()
Return the number of threads actually used during execution.
void GenerateValues(int numContours, double range[2])
Generate numContours equally spaced contour values between specified range.
virtual void SetMergePointsOff()
Indicate whether to merge coincident points.
helper object to manage setting and generating contour values
general representation of visualization data
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
concrete dataset represents vertices, lines, polygons, and triangle strips
organize data according to scalar values (used to accelerate contouring operations)
dataset represents arbitrary combinations of all possible cell types
int vtkTypeBool
Definition vtkABI.h:64
#define vtkDataArray
#define VTK_DEPRECATED_IN_9_7_0(reason)
int vtkIdType
Definition vtkType.h:363
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:318
#define VTK_MARSHALAUTO