VTK  9.2.6
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) 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, int ghostLevel, int* wholeExtent,
73  int* resultExtent, int splitMode, int byPoints);
75 
87  vtkGetMacro(SplitMode, int);
88 
96  void SetSplitPath(int len, int* splitpath);
97 
98  // Don't change the numbers here - they are used in the code
99  // to indicate array indices.
100  enum Modes
101  {
102  X_SLAB_MODE = 0,
103  Y_SLAB_MODE = 1,
104  Z_SLAB_MODE = 2,
105  BLOCK_MODE = 3
106  };
107 
112  static vtkInformationIntegerRequestKey* UPDATE_SPLIT_MODE();
113 
114 protected:
116  ~vtkExtentTranslator() override;
117 
118  static vtkInformationIntegerKey* DATA_SPLIT_MODE();
119 
120  friend class vtkInformationSplitModeRequestKey;
121 
123 
128  int SplitExtent(int piece, int numPieces, int* extent, int splitMode);
129  int SplitExtentByPoints(int piece, int numPieces, int* extent, int splitMode);
131 
132  int Piece;
135  int Extent[6];
136  int WholeExtent[6];
138 
139  int* SplitPath;
140  int SplitLen;
141 
142 private:
143  vtkExtentTranslator(const vtkExtentTranslator&) = delete;
144  void operator=(const vtkExtentTranslator&) = delete;
145 };
146 
147 #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:39
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...