VTK  9.7.1
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 
22 VTK_ABI_NAMESPACE_BEGIN
24 class vtkCallbackCommand;
25 class vtkCartesianGrid;
26 class vtkCellArray;
27 class vtkCellData;
28 class vtkContourFilter;
29 class vtkDataSet;
30 class vtkMergePoints;
31 class vtkOverlappingAMR;
32 class vtkPointData;
34 class VTKFILTERSAMR_EXPORT vtkAMRContourFilter : public vtkPartitionedDataSetAlgorithm
35 {
36 public:
38  void PrintSelf(ostream& os, vtkIndent indent) override;
39  static vtkAMRContourFilter* New();
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);
50  int GetNumberOfContours();
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 
60  vtkMTimeType GetMTime() override;
61 
63 
67  void SetComputeNormals(bool val);
68  bool GetComputeNormals();
69  vtkBooleanMacro(ComputeNormals, bool);
71 
73 
77  void SetComputeScalars(bool val);
78  bool GetComputeScalars();
79  vtkBooleanMacro(ComputeScalars, vtkTypeBool);
81 
83 
88  void SetGenerateTriangles(bool val);
89  bool GetGenerateTriangles();
90  vtkBooleanMacro(GenerateTriangles, bool);
92 
93 protected:
95  ~vtkAMRContourFilter() override;
96 
100  int FillInputPortInformation(int port, vtkInformation* info) override;
101 
106 
107 private:
108  vtkAMRContourFilter(const vtkAMRContourFilter&) = delete;
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  vtkTimeStamp InterfaceTime;
136  vtkNew<vtkPartitionedDataSet> InterfaceCache;
137 
138  // Progress handling
139  vtkNew<vtkCallbackCommand> InternalProgressObserver;
140  double ProgressFloor = 0.;
141  double ProgressCeiling = 1.;
142 };
143 
144 VTK_ABI_NAMESPACE_END
145 #endif // vtkAMRContourFilter_h
composite dataset to encapsulates a dataset consisting of partitions.
abstract base class for most VTK objects
Definition: vtkObject.h:52
Superclass for algorithms that produce vtkPartitionedDataSetAlgorithm.
represent and manipulate point attribute data
Definition: vtkPointData.h:30
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:318
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
record modification and/or execution time
Definition: vtkTimeStamp.h:24
represent and manipulate cell attribute data
Definition: vtkCellData.h:31
A contour filter for vtkOverlappingAMR data.
int vtkTypeBool
Definition: vtkABI.h:64
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
supports function callbacks
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:53
generate isosurfaces/isolines from scalar values
a simple class to control print indentation
Definition: vtkIndent.h:28
merge exactly coincident points
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Methods for subclasses to override to handle different pipeline requests.
virtual vtkMTimeType GetMTime()
Return this object's modified time.
dynamic, self-adjusting array of unsigned char
object to represent cell connectivity
Definition: vtkCellArray.h:177
A contour filter for vtkOverlappingAMR data.
a multi-resolution dataset based on vtkCartesianGrid allowing overlaps
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
Abstract API for vtkImageData and vtkRectilinearGrid.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.