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

vtkTableExtentTranslator.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkTableExtentTranslator.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 =========================================================================*/
00036 #ifndef __vtkTableExtentTranslator_h
00037 #define __vtkTableExtentTranslator_h
00038 
00039 #include "vtkExtentTranslator.h"
00040 
00041 class VTK_COMMON_EXPORT vtkTableExtentTranslator : public vtkExtentTranslator
00042 {
00043 public:
00044   vtkTypeRevisionMacro(vtkTableExtentTranslator,vtkExtentTranslator);
00045   void PrintSelf(ostream& os, vtkIndent indent);
00046   
00047   static vtkTableExtentTranslator* New();
00048   
00049 
00050   // Set the number of pieces into which the whole extent will be
00051   // split.  If this is 1 then the whole extent will be returned.  If
00052   // this is more than the number of pieces in the table then the
00053   // extra pieces will be empty data.  If this is more than one but
00054   // less than the number of pieces in the table then only this many
00055   // pieces will be returned (FIXME).
00056   void SetNumberOfPieces(int pieces);
00057 
00059 
00060   void SetNumberOfPiecesInTable(int pieces);
00061   vtkGetMacro(NumberOfPiecesInTable, int);
00063   
00066   int PieceToExtent();  
00067   
00069   int PieceToExtentByPoints();
00070   
00072 
00073   int PieceToExtentThreadSafe(int piece, int numPieces, 
00074                               int ghostLevel, int *wholeExtent, 
00075                               int *resultExtent, int splitMode, 
00076                               int byPoints);
00078   
00081   virtual void SetExtentForPiece(int piece, int* extent);
00082   
00084 
00087   virtual void GetExtentForPiece(int piece, int* extent);
00088   virtual int* GetExtentForPiece(int piece);
00090   
00092 
00095   vtkSetMacro(MaximumGhostLevel, int);
00096   vtkGetMacro(MaximumGhostLevel, int);
00098   
00100 
00102   virtual void SetPieceAvailable(int piece, int available);
00103   virtual int GetPieceAvailable(int piece);
00105   
00106 protected:
00107   vtkTableExtentTranslator();
00108   ~vtkTableExtentTranslator();
00109   
00110   // Store the extent table in a single array.  Every 6 values form an extent.
00111   int* ExtentTable;
00112   int NumberOfPiecesInTable;
00113   int MaximumGhostLevel;
00114   
00115   // Store a flag for the availability of each piece.
00116   int* PieceAvailable;
00117   
00118 private:
00119   vtkTableExtentTranslator(const vtkTableExtentTranslator&);  // Not implemented.
00120   void operator=(const vtkTableExtentTranslator&);  // Not implemented.
00121 };
00122 
00123 #endif