VTK  9.0.1
vtkExtentSplitter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkExtentSplitter.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
29 #ifndef vtkExtentSplitter_h
30 #define vtkExtentSplitter_h
31 
32 #include "vtkCommonExecutionModelModule.h" // For export macro
33 #include "vtkObject.h"
34 
35 class vtkExtentSplitterInternals;
36 
37 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkExtentSplitter : public vtkObject
38 {
39 public:
40  vtkTypeMacro(vtkExtentSplitter, vtkObject);
41  void PrintSelf(ostream& os, vtkIndent indent) override;
43 
45 
50  void AddExtentSource(int id, int priority, int x0, int x1, int y0, int y1, int z0, int z1);
51  void AddExtentSource(int id, int priority, int* extent);
52  void RemoveExtentSource(int id);
55 
57 
61  void AddExtent(int x0, int x1, int y0, int y1, int z0, int z1);
62  void AddExtent(int* extent);
64 
72 
79 
81 
88  void GetSubExtent(int index, int* extent);
90 
97 
99 
106  vtkGetMacro(PointMode, vtkTypeBool);
107  vtkSetMacro(PointMode, vtkTypeBool);
108  vtkBooleanMacro(PointMode, vtkTypeBool);
110 
111 protected:
113  ~vtkExtentSplitter() override;
114 
115  // Internal utility methods.
116  void SplitExtent(int* extent, int* subextent);
117  int IntersectExtents(const int* extent1, const int* extent2, int* result);
118  int Min(int a, int b);
119  int Max(int a, int b);
120 
121  // Internal implementation data.
122  vtkExtentSplitterInternals* Internal;
123 
124  // On if reading only all points (but not always all cells) is
125  // necessary. Used for reading volumes of planar slices storing
126  // only point data.
128 
129 private:
130  vtkExtentSplitter(const vtkExtentSplitter&) = delete;
131  void operator=(const vtkExtentSplitter&) = delete;
132 };
133 
134 #endif
vtkExtentSplitter::vtkExtentSplitter
vtkExtentSplitter()
vtkExtentSplitter::GetSubExtent
int * GetSubExtent(int index)
Get the sub-extent associated with the given index.
vtkExtentSplitter::GetNumberOfSubExtents
int GetNumberOfSubExtents()
Get the number of sub-extents into which the original set of extents have been split across the avail...
vtkExtentSplitter::GetSubExtentSource
int GetSubExtentSource(int index)
Get the id of the source from which the sub-extent associated with the given index should be read.
vtkExtentSplitter::SplitExtent
void SplitExtent(int *extent, int *subextent)
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:54
vtkExtentSplitter::AddExtentSource
void AddExtentSource(int id, int priority, int *extent)
vtkExtentSplitter::AddExtentSource
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.
vtkExtentSplitter::AddExtent
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.
vtkExtentSplitter::RemoveExtentSource
void RemoveExtentSource(int id)
VTK_SIZEHINT
#define VTK_SIZEHINT(...)
Definition: vtkWrappingHints.h:45
vtkExtentSplitter::New
static vtkExtentSplitter * New()
vtkExtentSplitter::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkExtentSplitter::RemoveAllExtentSources
void RemoveAllExtentSources()
vtkExtentSplitter::PointMode
vtkTypeBool PointMode
Definition: vtkExtentSplitter.h:127
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:34
vtkExtentSplitter::GetSubExtent
void GetSubExtent(int index, int *extent)
vtkExtentSplitter::ComputeSubExtents
int ComputeSubExtents()
Split the extents currently in the queue among the available sources.
vtkObject.h
vtkExtentSplitter::Min
int Min(int a, int b)
vtkExtentSplitter
Split an extent across other extents.
Definition: vtkExtentSplitter.h:38
vtkExtentSplitter::Internal
vtkExtentSplitterInternals * Internal
Definition: vtkExtentSplitter.h:122
vtkX3D::extent
@ extent
Definition: vtkX3D.h:351
vtkExtentSplitter::Max
int Max(int a, int b)
vtkX3D::index
@ index
Definition: vtkX3D.h:252
vtkExtentSplitter::AddExtent
void AddExtent(int *extent)
vtkExtentSplitter::IntersectExtents
int IntersectExtents(const int *extent1, const int *extent2, int *result)
vtkX3D::priority
@ priority
Definition: vtkX3D.h:456
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkExtentSplitter::~vtkExtentSplitter
~vtkExtentSplitter() override