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
37class VTKCOMMONEXECUTIONMODEL_EXPORT vtkExtentTranslator : public vtkObject
38{
39public:
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
121
122protected:
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
151private:
152 vtkExtentTranslator(const vtkExtentTranslator&) VTK_DELETE_FUNCTION;
153 void operator=(const vtkExtentTranslator&) VTK_DELETE_FUNCTION;
154};
155
156#endif
Generates a structured extent from unstructured.
static vtkInformationIntegerRequestKey * UPDATE_SPLIT_MODE()
Key used to request a particular split mode.
void SetSplitModeToBlock()
How should the streamer break up extents.
virtual int PieceToExtentThreadSafe(int piece, int numPieces, int ghostLevel, int *wholeExtent, int *resultExtent, int splitMode, int byPoints)
static vtkExtentTranslator * New()
virtual int PieceToExtentByPoints()
void SetSplitPath(int len, int *splitpath)
By default the translator creates N structured subextents by repeatedly splitting the largest current...
virtual int PieceToExtent()
These are the main methods that should be called.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkExtentTranslator() override
a simple class to control print indentation
Definition: vtkIndent.h:40
Key for integer values in vtkInformation.
key that can used to request integer values from the pipeline vtkInformationIntegerRequestKey is a vt...
abstract base class for most VTK objects
Definition: vtkObject.h:60
@ extent
Definition: vtkX3D.h:345
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.