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:
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 
110 
111 protected:
114 
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
vtkExtentTranslator::PieceToExtentThreadSafe
virtual int PieceToExtentThreadSafe(int piece, int numPieces, int ghostLevel, int *wholeExtent, int *resultExtent, int splitMode, int byPoints)
vtkExtentTranslator::Piece
int Piece
Definition: vtkExtentTranslator.h:129
vtkExtentTranslator::PieceToExtent
virtual int PieceToExtent()
These are the main methods that should be called.
vtx::types::Piece
std::map< DataSetType, DataSet > Piece
Definition: VTXTypes.h:54
vtkExtentTranslator::New
static vtkExtentTranslator * New()
vtkExtentTranslator::SetSplitModeToZSlab
void SetSplitModeToZSlab()
Definition: vtkExtentTranslator.h:83
vtkExtentTranslator::BLOCK_MODE
@ BLOCK_MODE
Definition: vtkExtentTranslator.h:102
vtkExtentTranslator::~vtkExtentTranslator
~vtkExtentTranslator() override
vtkExtentTranslator::NumberOfPieces
int NumberOfPieces
Definition: vtkExtentTranslator.h:130
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:54
vtkExtentTranslator::PieceToExtentByPoints
virtual int PieceToExtentByPoints()
vtkExtentTranslator::GhostLevel
int GhostLevel
Definition: vtkExtentTranslator.h:131
vtkInformationIntegerRequestKey
key that can used to request integer values from the pipeline vtkInformationIntegerRequestKey is a vt...
Definition: vtkInformationIntegerRequestKey.h:43
vtkExtentTranslator::SplitExtentByPoints
int SplitExtentByPoints(int piece, int numPieces, int *extent, int splitMode)
vtkExtentTranslator::Z_SLAB_MODE
@ Z_SLAB_MODE
Definition: vtkExtentTranslator.h:101
vtkExtentTranslator::SetSplitModeToXSlab
void SetSplitModeToXSlab()
Definition: vtkExtentTranslator.h:81
vtkExtentTranslator::X_SLAB_MODE
@ X_SLAB_MODE
Definition: vtkExtentTranslator.h:99
vtkExtentTranslator
Generates a structured extent from unstructured.
Definition: vtkExtentTranslator.h:35
vtkExtentTranslator::DATA_SPLIT_MODE
static vtkInformationIntegerKey * DATA_SPLIT_MODE()
vtkInformationIntegerKey
Key for integer values in vtkInformation.
Definition: vtkInformationIntegerKey.h:32
vtkExtentTranslator::SetSplitModeToBlock
void SetSplitModeToBlock()
How should the streamer break up extents.
Definition: vtkExtentTranslator.h:80
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:34
vtkExtentTranslator::Modes
Modes
Definition: vtkExtentTranslator.h:98
vtkObject.h
vtkExtentTranslator::vtkExtentTranslator
vtkExtentTranslator()
vtkExtentTranslator::UPDATE_SPLIT_MODE
static vtkInformationIntegerRequestKey * UPDATE_SPLIT_MODE()
Key used to request a particular split mode.
vtkExtentTranslator::SplitPath
int * SplitPath
Definition: vtkExtentTranslator.h:136
vtkExtentTranslator::SplitMode
int SplitMode
Definition: vtkExtentTranslator.h:134
vtkExtentTranslator::Y_SLAB_MODE
@ Y_SLAB_MODE
Definition: vtkExtentTranslator.h:100
vtkX3D::extent
@ extent
Definition: vtkX3D.h:351
vtkExtentTranslator::SetSplitModeToYSlab
void SetSplitModeToYSlab()
Definition: vtkExtentTranslator.h:82
vtkExtentTranslator::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkExtentTranslator::SplitLen
int SplitLen
Definition: vtkExtentTranslator.h:137
vtkExtentTranslator::SplitExtent
int SplitExtent(int piece, int numPieces, int *extent, int splitMode)
Returns 0 if no data exist for a piece.
vtkExtentTranslator::SetSplitPath
void SetSplitPath(int len, int *splitpath)
By default the translator creates N structured subextents by repeatedly splitting the largest current...