VTK  9.4.20241218
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
104#ifndef vtkContour3DLinearGrid_h
105#define vtkContour3DLinearGrid_h
106
107#include "vtkContourValues.h" // Needed for inline methods
109#include "vtkFiltersCoreModule.h" // For export macro
110
111VTK_ABI_NAMESPACE_BEGIN
112class vtkPolyData;
114class vtkScalarTree;
115struct vtkScalarTreeMap;
116
117class VTKFILTERSCORE_EXPORT vtkContour3DLinearGrid : public vtkDataObjectAlgorithm
118{
119public:
121
126 void PrintSelf(ostream& os, vtkIndent indent) override;
128
130
133 void SetValue(int i, double value);
134 double GetValue(int i);
135 double* GetValues();
136 void GetValues(double* contourValues);
137 void SetNumberOfContours(int number);
138 vtkIdType GetNumberOfContours();
139 void GenerateValues(int numContours, double range[2]);
140 void GenerateValues(int numContours, double rangeStart, double rangeEnd);
142
144
149 vtkSetMacro(MergePoints, vtkTypeBool);
150 vtkGetMacro(MergePoints, vtkTypeBool);
151 vtkBooleanMacro(MergePoints, vtkTypeBool);
153
155
159 vtkSetMacro(InterpolateAttributes, vtkTypeBool);
160 vtkGetMacro(InterpolateAttributes, vtkTypeBool);
161 vtkBooleanMacro(InterpolateAttributes, vtkTypeBool);
163
165
170 vtkSetMacro(ComputeNormals, vtkTypeBool);
171 vtkGetMacro(ComputeNormals, vtkTypeBool);
172 vtkBooleanMacro(ComputeNormals, vtkTypeBool);
174
176
182 vtkSetMacro(ComputeScalars, vtkTypeBool);
183 vtkGetMacro(ComputeScalars, vtkTypeBool);
184 vtkBooleanMacro(ComputeScalars, vtkTypeBool);
186
188
193 vtkSetMacro(OutputPointsPrecision, int);
194 vtkGetMacro(OutputPointsPrecision, int);
196
202
204
209 vtkSetMacro(UseScalarTree, vtkTypeBool);
210 vtkGetMacro(UseScalarTree, vtkTypeBool);
211 vtkBooleanMacro(UseScalarTree, vtkTypeBool);
213
215
220 vtkGetObjectMacro(ScalarTree, vtkScalarTree);
222
224
232 vtkSetMacro(SequentialProcessing, vtkTypeBool);
233 vtkGetMacro(SequentialProcessing, vtkTypeBool);
234 vtkBooleanMacro(SequentialProcessing, vtkTypeBool);
236
241 int GetNumberOfThreadsUsed() { return this->NumberOfThreadsUsed; }
242
251 bool GetLargeIds() { return this->LargeIds; }
252
259 static bool CanFullyProcessDataObject(vtkDataObject* object, const char* scalarArrayName);
260
261protected:
264
273 bool LargeIds; // indicate whether integral ids are large(==true) or not
274
275 // Manage scalar trees, including mapping scalar tree to input dataset
278 struct vtkScalarTreeMap* ScalarTreeMap;
279
280 // Process the data: input unstructured grid and output polydata
281 void ProcessPiece(vtkUnstructuredGrid* input, vtkDataArray* inScalars, vtkPolyData* output);
282
284 vtkInformationVector* outputVector) override;
286 vtkInformationVector* outputVector) override;
287 int FillInputPortInformation(int port, vtkInformation* info) override;
288
289private:
291 void operator=(const vtkContour3DLinearGrid&) = delete;
292};
293
298inline void vtkContour3DLinearGrid::SetValue(int i, double value)
299{
300 this->ContourValues->SetValue(i, value);
301}
302
307{
308 return this->ContourValues->GetValue(i);
309}
310
316{
317 return this->ContourValues->GetValues();
318}
319
325inline void vtkContour3DLinearGrid::GetValues(double* contourValues)
326{
327 this->ContourValues->GetValues(contourValues);
328}
329
336{
337 this->ContourValues->SetNumberOfContours(number);
338}
339
344{
345 return this->ContourValues->GetNumberOfContours();
346}
347
352inline void vtkContour3DLinearGrid::GenerateValues(int numContours, double range[2])
353{
354 this->ContourValues->GenerateValues(numContours, range);
355}
356
362 int numContours, double rangeStart, double rangeEnd)
363{
364 this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);
365}
366
367VTK_ABI_NAMESPACE_END
368#endif
fast generation of isosurface from 3D linear cells
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
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.
helper object to manage setting and generating contour values
double * GetValues()
Return a pointer to a list of contour values.
int GetNumberOfContours()
Return the number of contours in the.
void SetNumberOfContours(int number)
Set the number of contours to place into the list.
void GenerateValues(int numContours, double range[2])
Generate numContours equally spaced contour values between specified range.
void SetValue(int i, double value)
Set the ith contour value.
double GetValue(int i)
Get the ith contour value.
abstract superclass for arrays of numeric data
Superclass for algorithms that produce only data object as output.
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
int vtkIdType
Definition vtkType.h:315
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:270