VTK  9.3.1
vtkExtentSplitter.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
17 #ifndef vtkExtentSplitter_h
18 #define vtkExtentSplitter_h
19 
20 #include "vtkCommonExecutionModelModule.h" // For export macro
21 #include "vtkObject.h"
22 
23 VTK_ABI_NAMESPACE_BEGIN
24 class vtkExtentSplitterInternals;
25 
26 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkExtentSplitter : public vtkObject
27 {
28 public:
29  vtkTypeMacro(vtkExtentSplitter, vtkObject);
30  void PrintSelf(ostream& os, vtkIndent indent) override;
31  static vtkExtentSplitter* New();
32 
34 
39  void AddExtentSource(int id, int priority, int x0, int x1, int y0, int y1, int z0, int z1);
40  void AddExtentSource(int id, int priority, int* extent);
41  void RemoveExtentSource(int id);
42  void RemoveAllExtentSources();
44 
46 
50  void AddExtent(int x0, int x1, int y0, int y1, int z0, int z1);
51  void AddExtent(int* extent);
53 
60  int ComputeSubExtents();
61 
67  int GetNumberOfSubExtents();
68 
70 
76  int* GetSubExtent(int index) VTK_SIZEHINT(6);
77  void GetSubExtent(int index, int* extent);
79 
85  int GetSubExtentSource(int index);
86 
88 
95  vtkGetMacro(PointMode, vtkTypeBool);
96  vtkSetMacro(PointMode, vtkTypeBool);
97  vtkBooleanMacro(PointMode, vtkTypeBool);
99 
100 protected:
102  ~vtkExtentSplitter() override;
103 
104  // Internal utility methods.
105  void SplitExtent(int* extent, int* subextent);
106  int IntersectExtents(const int* extent1, const int* extent2, int* result);
107  int Min(int a, int b);
108  int Max(int a, int b);
109 
110  // Internal implementation data.
111  vtkExtentSplitterInternals* Internal;
112 
113  // On if reading only all points (but not always all cells) is
114  // necessary. Used for reading volumes of planar slices storing
115  // only point data.
117 
118 private:
119  vtkExtentSplitter(const vtkExtentSplitter&) = delete;
120  void operator=(const vtkExtentSplitter&) = delete;
121 };
122 
123 VTK_ABI_NAMESPACE_END
124 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:51
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int vtkTypeBool
Definition: vtkABI.h:64
Split an extent across other extents.
a simple class to control print indentation
Definition: vtkIndent.h:28
#define VTK_SIZEHINT(...)
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
vtkExtentSplitterInternals * Internal