VTK
vtkExtentTranslator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkExtentTranslator.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 vtkExtentTranslator_h
29 #define vtkExtentTranslator_h
30 
31 #include "vtkCommonExecutionModelModule.h" // For export macro
32 #include "vtkObject.h"
33 
36 
37 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkExtentTranslator : public vtkObject
38 {
39 public:
40  static vtkExtentTranslator *New();
41 
43  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
44 
46 
50  vtkSetVector6Macro(WholeExtent, int);
51  vtkGetVector6Macro(WholeExtent, int);
52  vtkSetVector6Macro(Extent, int);
53  vtkGetVector6Macro(Extent, int);
54  vtkSetMacro(Piece,int);
55  vtkGetMacro(Piece,int);
56  vtkSetMacro(NumberOfPieces,int);
57  vtkGetMacro(NumberOfPieces,int);
58  vtkSetMacro(GhostLevel, int);
59  vtkGetMacro(GhostLevel, int);
61 
63 
70  virtual int PieceToExtent();
71  virtual int PieceToExtentByPoints();
72  virtual int PieceToExtentThreadSafe(int piece, int numPieces,
73  int ghostLevel, int *wholeExtent,
74  int *resultExtent, int splitMode,
75  int byPoints);
77 
78 
79 
88  {this->SplitMode = vtkExtentTranslator::BLOCK_MODE;}
90  {this->SplitMode = vtkExtentTranslator::X_SLAB_MODE;}
92  {this->SplitMode = vtkExtentTranslator::Y_SLAB_MODE;}
94  {this->SplitMode = vtkExtentTranslator::Z_SLAB_MODE;}
95  vtkGetMacro(SplitMode,int);
96 
104  void SetSplitPath(int len, int *splitpath);
105 
106  // Don't change the numbers here - they are used in the code
107  // to indicate array indices.
108  enum Modes
109  {
110  X_SLAB_MODE=0,
111  Y_SLAB_MODE=1,
112  Z_SLAB_MODE=2,
113  BLOCK_MODE= 3
114  };
115 
120  static vtkInformationIntegerRequestKey* UPDATE_SPLIT_MODE();
121 
122 protected:
124  ~vtkExtentTranslator() VTK_OVERRIDE;
125 
126  static vtkInformationIntegerKey* DATA_SPLIT_MODE();
127 
128  friend class vtkInformationSplitModeRequestKey;
129 
131 
136  int SplitExtent(int piece, int numPieces, int *extent, int splitMode);
137  int SplitExtentByPoints(int piece, int numPieces, int *extent,
138  int splitMode);
140 
141  int Piece;
142  int NumberOfPieces;
143  int GhostLevel;
144  int Extent[6];
145  int WholeExtent[6];
146  int SplitMode;
147 
148  int* SplitPath;
149  int SplitLen;
150 
151 private:
152  vtkExtentTranslator(const vtkExtentTranslator&) VTK_DELETE_FUNCTION;
153  void operator=(const vtkExtentTranslator&) VTK_DELETE_FUNCTION;
154 };
155 
156 #endif
void SetSplitModeToBlock()
How should the streamer break up extents.
abstract base class for most VTK objects
Definition: vtkObject.h:59
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Generates a structured extent from unstructured.
a simple class to control print indentation
Definition: vtkIndent.h:39
Key for integer values in vtkInformation.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
key that can used to request integer values from the pipeline vtkInformationIntegerRequestKey is a vt...