ParaView
vtkTableExtentTranslator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkTableExtentTranslator.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 =========================================================================*/
26 #ifndef vtkTableExtentTranslator_h
27 #define vtkTableExtentTranslator_h
28 
29 #include "vtkExtentTranslator.h"
30 #include "vtkPVClientServerCoreRenderingModule.h" // For export macro
31 
32 class VTKPVCLIENTSERVERCORERENDERING_EXPORT vtkTableExtentTranslator : public vtkExtentTranslator
33 {
34 public:
35  vtkTypeMacro(vtkTableExtentTranslator, vtkExtentTranslator);
36  void PrintSelf(ostream& os, vtkIndent indent);
37 
38  static vtkTableExtentTranslator* New();
39 
40  // Set the number of pieces into which the whole extent will be
41  // split. If this is 1 then the whole extent will be returned. If
42  // this is more than the number of pieces in the table then the
43  // extra pieces will be empty data. If this is more than one but
44  // less than the number of pieces in the table then only this many
45  // pieces will be returned (FIXME).
46  void SetNumberOfPieces(int pieces);
47 
49 
52  void SetNumberOfPiecesInTable(int pieces);
53  vtkGetMacro(NumberOfPiecesInTable, int);
55 
60  int PieceToExtent();
61 
65  int PieceToExtentByPoints();
66 
70  int PieceToExtentThreadSafe(int piece, int numPieces, int ghostLevel, int* wholeExtent,
71  int* resultExtent, int splitMode, int byPoints);
72 
77  virtual void SetExtentForPiece(int piece, int* extent);
78 
80 
85  virtual void GetExtentForPiece(int piece, int* extent);
86  virtual int* GetExtentForPiece(int piece);
88 
90 
95  vtkSetMacro(MaximumGhostLevel, int);
96  vtkGetMacro(MaximumGhostLevel, int);
98 
100 
104  virtual void SetPieceAvailable(int piece, int available);
105  virtual int GetPieceAvailable(int piece);
107 
108 protected:
111 
112  // Store the extent table in a single array. Every 6 values form an extent.
116 
117  // Store a flag for the availability of each piece.
119 
120 private:
121  vtkTableExtentTranslator(const vtkTableExtentTranslator&) VTK_DELETE_FUNCTION;
122  void operator=(const vtkTableExtentTranslator&) VTK_DELETE_FUNCTION;
123 };
124 
125 #endif
Extent translation through lookup table.