VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkExtentSplitter.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00028 #ifndef vtkExtentSplitter_h 00029 #define vtkExtentSplitter_h 00030 00031 #include "vtkCommonExecutionModelModule.h" // For export macro 00032 #include "vtkObject.h" 00033 00034 class vtkExtentSplitterInternals; 00035 00036 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkExtentSplitter : public vtkObject 00037 { 00038 public: 00039 vtkTypeMacro(vtkExtentSplitter,vtkObject); 00040 void PrintSelf(ostream& os, vtkIndent indent); 00041 static vtkExtentSplitter *New(); 00042 00044 00047 void AddExtentSource(int id, int priority, int x0, int x1, 00048 int y0, int y1, int z0, int z1); 00049 void AddExtentSource(int id, int priority, int* extent); 00050 void RemoveExtentSource(int id); 00051 void RemoveAllExtentSources(); 00053 00055 00057 void AddExtent(int x0, int x1, int y0, int y1, int z0, int z1); 00058 void AddExtent(int* extent); 00060 00065 int ComputeSubExtents(); 00066 00070 int GetNumberOfSubExtents(); 00071 00073 00076 int* GetSubExtent(int index); 00077 void GetSubExtent(int index, int* extent); 00079 00083 int GetSubExtentSource(int index); 00084 00086 00091 vtkGetMacro(PointMode, int); 00092 vtkSetMacro(PointMode, int); 00093 vtkBooleanMacro(PointMode, int); 00095 00096 protected: 00097 vtkExtentSplitter(); 00098 ~vtkExtentSplitter(); 00099 00100 // Internal utility methods. 00101 void SplitExtent(int* extent, int* subextent); 00102 int IntersectExtents(const int* extent1, const int* extent2, int* result); 00103 int Min(int a, int b); 00104 int Max(int a, int b); 00105 00106 // Internal implementation data. 00107 vtkExtentSplitterInternals* Internal; 00108 00109 // On if reading only all points (but not always all cells) is 00110 // necessary. Used for reading volumes of planar slices storing 00111 // only point data. 00112 int PointMode; 00113 00114 private: 00115 vtkExtentSplitter(const vtkExtentSplitter&); // Not implemented. 00116 void operator=(const vtkExtentSplitter&); // Not implemented. 00117 }; 00118 00119 #endif