Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkExtentSplitter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkExtentSplitter.h,v $
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 =========================================================================*/
00038 #ifndef __vtkExtentSplitter_h
00039 #define __vtkExtentSplitter_h
00040 
00041 #include "vtkObject.h"
00042 
00043 class vtkExtentSplitterInternals;
00044 
00045 class VTK_COMMON_EXPORT vtkExtentSplitter : public vtkObject
00046 {
00047 public:
00048   vtkTypeRevisionMacro(vtkExtentSplitter,vtkObject);
00049   void PrintSelf(ostream& os, vtkIndent indent);  
00050   static vtkExtentSplitter *New();
00051   
00053 
00056   void AddExtentSource(int id, int priority, int x0, int x1,
00057                        int y0, int y1, int z0, int z1);
00058   void AddExtentSource(int id, int priority, int* extent);
00059   void RemoveExtentSource(int id);
00060   void RemoveAllExtentSources();
00062   
00064 
00066   void AddExtent(int x0, int x1, int y0, int y1, int z0, int z1);
00067   void AddExtent(int* extent);
00069   
00074   int ComputeSubExtents();
00075   
00079   int GetNumberOfSubExtents();
00080   
00082 
00085   int* GetSubExtent(int index);
00086   void GetSubExtent(int index, int* extent);
00088   
00092   int GetSubExtentSource(int index);  
00093   
00095 
00100   vtkGetMacro(PointMode, int);
00101   vtkSetMacro(PointMode, int);
00102   vtkBooleanMacro(PointMode, int);
00104   
00105 protected:
00106   vtkExtentSplitter();
00107   ~vtkExtentSplitter();
00108   
00109   // Internal utility methods.
00110   void SplitExtent(int* extent, int* subextent);
00111   int IntersectExtents(const int* extent1, const int* extent2, int* result);
00112   int Min(int a, int b);
00113   int Max(int a, int b);
00114   
00115   // Internal implementation data.
00116   vtkExtentSplitterInternals* Internal;
00117   
00118   // On if reading only all points (but not always all cells) is
00119   // necessary.  Used for reading volumes of planar slices storing
00120   // only point data.
00121   int PointMode;
00122   
00123 private:
00124   vtkExtentSplitter(const vtkExtentSplitter&);  // Not implemented.
00125   void operator=(const vtkExtentSplitter&);  // Not implemented.
00126 };
00127 
00128 #endif