VTK
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 =========================================================================*/
28 #ifndef vtkExtentSplitter_h
29 #define vtkExtentSplitter_h
30 
31 #include "vtkCommonExecutionModelModule.h" // For export macro
32 #include "vtkObject.h"
33 
34 class vtkExtentSplitterInternals;
35 
37 {
38 public:
40  void PrintSelf(ostream& os, vtkIndent indent);
41  static vtkExtentSplitter *New();
42 
44 
47  void AddExtentSource(int id, int priority, int x0, int x1,
48  int y0, int y1, int z0, int z1);
49  void AddExtentSource(int id, int priority, int* extent);
50  void RemoveExtentSource(int id);
51  void RemoveAllExtentSources();
53 
55 
57  void AddExtent(int x0, int x1, int y0, int y1, int z0, int z1);
58  void AddExtent(int* extent);
60 
65  int ComputeSubExtents();
66 
70  int GetNumberOfSubExtents();
71 
73 
76  int* GetSubExtent(int index);
77  void GetSubExtent(int index, int* extent);
79 
83  int GetSubExtentSource(int index);
84 
86 
91  vtkGetMacro(PointMode, int);
92  vtkSetMacro(PointMode, int);
93  vtkBooleanMacro(PointMode, int);
95 
96 protected:
99 
100  // Internal utility methods.
101  void SplitExtent(int* extent, int* subextent);
102  int IntersectExtents(const int* extent1, const int* extent2, int* result);
103  int Min(int a, int b);
104  int Max(int a, int b);
105 
106  // Internal implementation data.
107  vtkExtentSplitterInternals* Internal;
108 
109  // On if reading only all points (but not always all cells) is
110  // necessary. Used for reading volumes of planar slices storing
111  // only point data.
113 
114 private:
115  vtkExtentSplitter(const vtkExtentSplitter&); // Not implemented.
116  void operator=(const vtkExtentSplitter&); // Not implemented.
117 };
118 
119 #endif
#define VTKCOMMONEXECUTIONMODEL_EXPORT
abstract base class for most VTK objects
Definition: vtkObject.h:61
Split an extent across other extents.
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:38
static vtkObject * New()
vtkExtentSplitterInternals * Internal