VTK  9.3.20240328
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;
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);
44 
46 
50  void AddExtent(int x0, int x1, int y0, int y1, int z0, int z1);
51  void AddExtent(int* extent);
53 
61 
68 
70 
77  void GetSubExtent(int index, int* extent);
79 
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
Split an extent across other extents.
~vtkExtentSplitter() override
vtkExtentSplitterInternals * Internal
int Min(int a, int b)
void RemoveExtentSource(int id)
Add/Remove a source providing the given extent.
static vtkExtentSplitter * New()
void SplitExtent(int *extent, int *subextent)
void AddExtent(int *extent)
Add an extent to the queue of extents to be split among the available sources.
int ComputeSubExtents()
Split the extents currently in the queue among the available sources.
int * GetSubExtent(int index)
Get the sub-extent associated with the given index.
int Max(int a, int b)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void AddExtent(int x0, int x1, int y0, int y1, int z0, int z1)
Add an extent to the queue of extents to be split among the available sources.
void AddExtentSource(int id, int priority, int x0, int x1, int y0, int y1, int z0, int z1)
Add/Remove a source providing the given extent.
void AddExtentSource(int id, int priority, int *extent)
Add/Remove a source providing the given extent.
int GetSubExtentSource(int index)
Get the id of the source from which the sub-extent associated with the given index should be read.
int IntersectExtents(const int *extent1, const int *extent2, int *result)
void GetSubExtent(int index, int *extent)
Get the sub-extent associated with the given index.
int GetNumberOfSubExtents()
Get the number of sub-extents into which the original set of extents have been split across the avail...
void RemoveAllExtentSources()
Add/Remove a source providing the given extent.
a simple class to control print indentation
Definition: vtkIndent.h:108
abstract base class for most VTK objects
Definition: vtkObject.h:161
@ priority
Definition: vtkX3D.h:450
@ extent
Definition: vtkX3D.h:345
@ index
Definition: vtkX3D.h:246
int vtkTypeBool
Definition: vtkABI.h:64
#define VTK_SIZEHINT(...)