VTK  9.6.20260617
vtkAMRContourFilter.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
16#ifndef vtkAMRContourFilter_h
17#define vtkAMRContourFilter_h
18
19#include "vtkFiltersAMRModule.h" // For export macro
21
22VTK_ABI_NAMESPACE_BEGIN
26class vtkCellArray;
27class vtkCellData;
29class vtkDataSet;
30class vtkMergePoints;
32class vtkPointData;
34class VTKFILTERSAMR_EXPORT vtkAMRContourFilter : public vtkPartitionedDataSetAlgorithm
35{
36public:
38 void PrintSelf(ostream& os, vtkIndent indent) override;
40
42
45 void SetValue(int i, double value);
46 double GetValue(int i);
47 double* GetValues();
48 void GetValues(double* contourValues);
49 void SetNumberOfContours(int number);
51 void GenerateValues(int numContours, double range[2]);
52 void GenerateValues(int numContours, double rangeStart, double rangeEnd);
53 void SetContourValues(const std::vector<double>& values);
54 std::vector<double> GetContourValues();
56
61
63
67 void SetComputeNormals(bool val);
69 vtkBooleanMacro(ComputeNormals, bool);
71
73
77 void SetComputeScalars(bool val);
79 vtkBooleanMacro(ComputeScalars, vtkTypeBool);
81
83
88 void SetGenerateTriangles(bool val);
90 vtkBooleanMacro(GenerateTriangles, bool);
92
93protected:
96
100 int FillInputPortInformation(int port, vtkInformation* info) override;
101
106
107private:
109 void operator=(const vtkAMRContourFilter&) = delete;
110
115 static bool ContourDataSet(
116 vtkContourFilter* contour, vtkDataSet* ds, unsigned int idx, vtkPartitionedDataSet* output);
117
121 static void CleanupOutput(vtkPartitionedDataSet* output);
122
124
127 static void InternalProgressCallbackFunction(
128 vtkObject* arg, unsigned long, void* clientdata, void*);
129 void InternalProgressCallback(vtkAlgorithm* algorithm);
131
132 vtkNew<vtkAMRInterfaceFilter> InternalInterface;
133 vtkNew<vtkContourFilter> InternalContour;
134
135 // Progress handling
136 vtkNew<vtkCallbackCommand> InternalProgressObserver;
137 double ProgressFloor = 0.;
138 double ProgressCeiling = 1.;
139};
140
141VTK_ABI_NAMESPACE_END
142#endif // vtkAMRContourFilter_h
~vtkAMRContourFilter() override
void SetComputeNormals(bool val)
Set/Get the computation of normals.
void SetComputeScalars(bool val)
Set/Get the computation of scalars.
std::vector< double > GetContourValues()
Methods to set / get contour values, forwarded to the internal vtkContourFilter.
void GetValues(double *contourValues)
Methods to set / get contour values, forwarded to the internal vtkContourFilter.
void GenerateValues(int numContours, double range[2])
Methods to set / get contour values, forwarded to the internal vtkContourFilter.
int FillInputPortInformation(int port, vtkInformation *info) override
Set input to vtkOverlappingAMR.
bool GetGenerateTriangles()
If this is enabled the output will be triangles otherwise, the output will be the intersection polygo...
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Implement the AMR contouring logic, see class documentation for details.
static vtkAMRContourFilter * New()
double * GetValues()
Methods to set / get contour values, forwarded to the internal vtkContourFilter.
vtkMTimeType GetMTime() override
Modified GetMTime Because we delegate to the internal vtkContourFilter.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetNumberOfContours(int number)
Methods to set / get contour values, forwarded to the internal vtkContourFilter.
double GetValue(int i)
Methods to set / get contour values, forwarded to the internal vtkContourFilter.
void GenerateValues(int numContours, double rangeStart, double rangeEnd)
Methods to set / get contour values, forwarded to the internal vtkContourFilter.
bool GetComputeNormals()
Set/Get the computation of normals.
void SetContourValues(const std::vector< double > &values)
Methods to set / get contour values, forwarded to the internal vtkContourFilter.
void SetValue(int i, double value)
Methods to set / get contour values, forwarded to the internal vtkContourFilter.
void SetGenerateTriangles(bool val)
If this is enabled the output will be triangles otherwise, the output will be the intersection polygo...
bool GetComputeScalars()
Set/Get the computation of scalars.
int GetNumberOfContours()
Methods to set / get contour values, forwarded to the internal vtkContourFilter.
A contour filter for vtkOverlappingAMR data.
supports function callbacks
Abstract API for vtkImageData and vtkRectilinearGrid.
object to represent cell connectivity
represent and manipulate cell attribute data
abstract class to specify dataset behavior
Definition vtkDataSet.h:166
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
merge exactly coincident points
Allocate and hold a VTK object.
Definition vtkNew.h:168
a multi-resolution dataset based on vtkCartesianGrid allowing overlaps
composite dataset to encapsulates a dataset consisting of partitions.
represent and manipulate point attribute data
dynamic, self-adjusting array of unsigned char
int vtkTypeBool
Definition vtkABI.h:64
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:318
#define vtkContourFilter
Definition vtkmContour.h:31