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 =========================================================================*/
25 #ifndef vtkExtentTranslator_h
26 #define vtkExtentTranslator_h
27 
28 #include "vtkCommonExecutionModelModule.h" // For export macro
29 #include "vtkObject.h"
30 
33 
34 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkExtentTranslator : public vtkObject
35 {
36 public:
37  static vtkExtentTranslator *New();
38 
40  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
41 
43 
47  vtkSetVector6Macro(WholeExtent, int);
48  vtkGetVector6Macro(WholeExtent, int);
49  vtkSetVector6Macro(Extent, int);
50  vtkGetVector6Macro(Extent, int);
51  vtkSetMacro(Piece,int);
52  vtkGetMacro(Piece,int);
53  vtkSetMacro(NumberOfPieces,int);
54  vtkGetMacro(NumberOfPieces,int);
55  vtkSetMacro(GhostLevel, int);
56  vtkGetMacro(GhostLevel, int);
58 
60 
67  virtual int PieceToExtent();
68  virtual int PieceToExtentByPoints();
69  virtual int PieceToExtentThreadSafe(int piece, int numPieces,
70  int ghostLevel, int *wholeExtent,
71  int *resultExtent, int splitMode,
72  int byPoints);
74 
75 
76 
85  {this->SplitMode = vtkExtentTranslator::BLOCK_MODE;}
87  {this->SplitMode = vtkExtentTranslator::X_SLAB_MODE;}
89  {this->SplitMode = vtkExtentTranslator::Y_SLAB_MODE;}
91  {this->SplitMode = vtkExtentTranslator::Z_SLAB_MODE;}
92  vtkGetMacro(SplitMode,int);
93 
101  void SetSplitPath(int len, int *splitpath);
102 
103  // Don't change the numbers here - they are used in the code
104  // to indicate array indices.
105  enum Modes
106  {
107  X_SLAB_MODE=0,
108  Y_SLAB_MODE=1,
109  Z_SLAB_MODE=2,
110  BLOCK_MODE= 3
111  };
112 
117  static vtkInformationIntegerRequestKey* UPDATE_SPLIT_MODE();
118 
119 protected:
121  ~vtkExtentTranslator() VTK_OVERRIDE;
122 
123  static vtkInformationIntegerKey* DATA_SPLIT_MODE();
124 
125  friend class vtkInformationSplitModeRequestKey;
126 
128 
133  int SplitExtent(int piece, int numPieces, int *extent, int splitMode);
134  int SplitExtentByPoints(int piece, int numPieces, int *extent,
135  int splitMode);
137 
138  int Piece;
139  int NumberOfPieces;
140  int GhostLevel;
141  int Extent[6];
142  int WholeExtent[6];
143  int SplitMode;
144 
145  int* SplitPath;
146  int SplitLen;
147 
148 private:
149  vtkExtentTranslator(const vtkExtentTranslator&) VTK_DELETE_FUNCTION;
150  void operator=(const vtkExtentTranslator&) VTK_DELETE_FUNCTION;
151 };
152 
153 #endif
void SetSplitModeToBlock()
How should the streamer break up extents.
abstract base class for most VTK objects
Definition: vtkObject.h:53
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:33
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...