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 "vtkObject.h"
32 
33 class vtkExtentSplitterInternals;
34 
36 {
37 public:
39  void PrintSelf(ostream& os, vtkIndent indent);
40  static vtkExtentSplitter *New();
41 
43 
46  void AddExtentSource(int id, int priority, int x0, int x1,
47  int y0, int y1, int z0, int z1);
48  void AddExtentSource(int id, int priority, int* extent);
49  void RemoveExtentSource(int id);
50  void RemoveAllExtentSources();
52 
54 
56  void AddExtent(int x0, int x1, int y0, int y1, int z0, int z1);
57  void AddExtent(int* extent);
59 
64  int ComputeSubExtents();
65 
69  int GetNumberOfSubExtents();
70 
72 
75  int* GetSubExtent(int index);
76  void GetSubExtent(int index, int* extent);
78 
82  int GetSubExtentSource(int index);
83 
85 
90  vtkGetMacro(PointMode, int);
91  vtkSetMacro(PointMode, int);
92  vtkBooleanMacro(PointMode, int);
94 
95 protected:
98 
99  // Internal utility methods.
100  void SplitExtent(int* extent, int* subextent);
101  int IntersectExtents(const int* extent1, const int* extent2, int* result);
102  int Min(int a, int b);
103  int Max(int a, int b);
104 
105  // Internal implementation data.
106  vtkExtentSplitterInternals* Internal;
107 
108  // On if reading only all points (but not always all cells) is
109  // necessary. Used for reading volumes of planar slices storing
110  // only point data.
112 
113 private:
114  vtkExtentSplitter(const vtkExtentSplitter&); // Not implemented.
115  void operator=(const vtkExtentSplitter&); // Not implemented.
116 };
117 
118 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:60
Split an extent across other extents.
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:37
#define VTK_COMMON_EXPORT
static vtkObject * New()
vtkExtentSplitterInternals * Internal