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 
48 class vtkDataAssembly;
52 class vtkPartitionedDataSet;
53 class vtkPartitionedDataSetCollection;
54 class vtkPlane;
55 
57 {
58 public:
60  void PrintSelf(ostream& os, vtkIndent indent) override;
61  static vtkAxisAlignedCutter* New();
62 
64 
68  void SetCutFunction(vtkImplicitFunction* function);
69  vtkImplicitFunction* GetCutFunction();
71 
77  vtkMTimeType GetMTime() override;
78 
80 
85  void SetOffsetValue(int i, double value);
86  double GetOffsetValue(int i);
88 
90 
94  void SetNumberOfOffsetValues(int number);
95  int GetNumberOfOffsetValues();
97 
99 
105  vtkSetMacro(LevelOfResolution, int);
106  vtkGetMacro(LevelOfResolution, int);
108 
110 
114  void SetController(vtkMultiProcessController* controller);
115  vtkMultiProcessController* GetController();
117 
118 protected:
120  ~vtkAxisAlignedCutter() override = default;
121 
124  int FillInputPortInformation(int, vtkInformation* info) override;
125 
126 private:
128  void operator=(const vtkAxisAlignedCutter&) = delete;
129 
133  bool ProcessHTG(
134  vtkHyperTreeGrid* inputHTG, vtkPlane* plane, vtkPartitionedDataSetCollection* outputSlices);
135 
141  bool ProcessPDS(vtkPartitionedDataSet* inputPDS, vtkPlane* plane,
142  vtkPartitionedDataSetCollection* outputPDC, vtkDataAssembly* outputHierarchy, int nodeId);
143 
147  void CutHTGWithAAPlane(
148  vtkHyperTreeGrid* input, vtkHyperTreeGrid* output, vtkPlane* plane, double offset);
149 
153  void CutAMRWithAAPlane(vtkOverlappingAMR* input, vtkOverlappingAMR* output, vtkPlane* plane);
154 
157  vtkNew<vtkAMRSliceFilter> AMRCutter;
158  int LevelOfResolution = 0;
159  vtkNew<vtkContourValues> OffsetValues;
160 
162 };
163 
164 #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.
virtual vtkMTimeType GetMTime()
virtual int FillInputPortInformation(int port, vtkInformation *info)
#define VTKPVVTKEXTENSIONSFILTERSGENERAL_EXPORT
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
void operator=(const vtkObjectBase &)