VTK  9.0.1
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) 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, int ghostLevel, int* wholeExtent,
70  int* resultExtent, int splitMode, int byPoints);
72 
84  vtkGetMacro(SplitMode, int);
85 
93  void SetSplitPath(int len, int* splitpath);
94 
95  // Don't change the numbers here - they are used in the code
96  // to indicate array indices.
97  enum Modes
98  {
99  X_SLAB_MODE = 0,
100  Y_SLAB_MODE = 1,
101  Z_SLAB_MODE = 2,
102  BLOCK_MODE = 3
103  };
104 
109  static vtkInformationIntegerRequestKey* UPDATE_SPLIT_MODE();
110 
111 protected:
113  ~vtkExtentTranslator() override;
114 
115  static vtkInformationIntegerKey* DATA_SPLIT_MODE();
116 
117  friend class vtkInformationSplitModeRequestKey;
118 
120 
125  int SplitExtent(int piece, int numPieces, int* extent, int splitMode);
126  int SplitExtentByPoints(int piece, int numPieces, int* extent, int splitMode);
128 
129  int Piece;
132  int Extent[6];
133  int WholeExtent[6];
135 
136  int* SplitPath;
137  int SplitLen;
138 
139 private:
140  vtkExtentTranslator(const vtkExtentTranslator&) = delete;
141  void operator=(const vtkExtentTranslator&) = delete;
142 };
143 
144 #endif
void SetSplitModeToBlock()
How should the streamer break up extents.
abstract base class for most VTK objects
Definition: vtkObject.h:62
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.
std::map< DataSetType, DataSet > Piece
Definition: VTXTypes.h:54
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...