vtkAxisAlignedCutter.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
38 #ifndef vtkAxisAlignedPlaneCutter_h
39 #define vtkAxisAlignedPlaneCutter_h
40 
41 #include "vtkAMRSliceFilter.h" // for vtkAMRSliceFilter
42 #include "vtkContourValues.h" // for vtkContourValues
43 #include "vtkDataObjectAlgorithm.h"
44 #include "vtkHyperTreeGridAxisCut.h" // for vtkHyperTreeGridAxisCut
45 #include "vtkPVVTKExtensionsFiltersGeneralModule.h" // for export macro
46 #include "vtkSmartPointer.h" // for vtkSmartPointer
47 
49 class vtkDataAssembly;
53 class vtkPartitionedDataSet;
54 class vtkPartitionedDataSetCollection;
55 class vtkPlane;
56 
58 {
59 public:
61  void PrintSelf(ostream& os, vtkIndent indent) override;
62  static vtkAxisAlignedCutter* New();
63 
65 
69  void SetCutFunction(vtkImplicitFunction* function);
70  vtkImplicitFunction* GetCutFunction();
72 
78  vtkMTimeType GetMTime() override;
79 
81 
86  void SetOffsetValue(int i, double value);
87  double GetOffsetValue(int i);
89 
91 
95  void SetNumberOfOffsetValues(int number);
96  int GetNumberOfOffsetValues();
98 
100 
106  vtkSetMacro(LevelOfResolution, int);
107  vtkGetMacro(LevelOfResolution, int);
109 
111 
115  void SetController(vtkMultiProcessController* controller);
116  vtkMultiProcessController* GetController();
118 
119 protected:
121  ~vtkAxisAlignedCutter() override = default;
122 
125  int FillInputPortInformation(int, vtkInformation* info) override;
126 
127 private:
129  void operator=(const vtkAxisAlignedCutter&) = delete;
130 
134  bool ProcessHTG(
135  vtkHyperTreeGrid* inputHTG, vtkPlane* plane, vtkPartitionedDataSetCollection* outputSlices);
136 
142  bool ProcessPDS(vtkPartitionedDataSet* inputPDS, vtkPlane* plane,
143  vtkPartitionedDataSetCollection* outputPDC, vtkDataAssembly* outputHierarchy, int nodeId);
144 
148  void CutHTGWithAAPlane(
149  vtkHyperTreeGrid* input, vtkHyperTreeGrid* output, vtkPlane* plane, double offset);
150 
154  void CutAMRWithAAPlane(vtkOverlappingAMR* input, vtkOverlappingAMR* output, vtkPlane* plane);
155 
158  vtkNew<vtkAMRSliceFilter> AMRCutter;
159  int LevelOfResolution = 0;
160  vtkNew<vtkContourValues> OffsetValues;
161 
163 };
164 
166 
167 #endif
virtual int RequestDataObject(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
static vtkDataObjectAlgorithm * New()
vtkTypeUInt64 vtkMTimeType
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
Cut data with an Axis-Aligned cut function.
#define VTK_ABI_NAMESPACE_BEGIN
virtual vtkMTimeType GetMTime()
virtual int FillInputPortInformation(int port, vtkInformation *info)
#define VTKPVVTKEXTENSIONSFILTERSGENERAL_EXPORT
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
void operator=(const vtkObjectBase &)