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
37class VTKCOMMONEXECUTIONMODEL_EXPORT vtkExtentTranslator : public vtkObject
38{
39public:
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
113
114protected:
117
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
141
142private:
144 void operator=(const vtkExtentTranslator&) = delete;
145};
146
147#endif
Generates a structured extent from unstructured.
int SplitExtentByPoints(int piece, int numPieces, int *extent, int splitMode)
Returns 0 if no data exist for a piece.
static vtkInformationIntegerRequestKey * UPDATE_SPLIT_MODE()
Key used to request a particular split mode.
void SetSplitModeToBlock()
How should the streamer break up extents.
int SplitExtent(int piece, int numPieces, int *extent, int splitMode)
Returns 0 if no data exist for a piece.
virtual int PieceToExtentThreadSafe(int piece, int numPieces, int ghostLevel, int *wholeExtent, int *resultExtent, int splitMode, int byPoints)
These are the main methods that should be called.
static vtkExtentTranslator * New()
virtual int PieceToExtentByPoints()
These are the main methods that should be called.
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.
static vtkInformationIntegerKey * DATA_SPLIT_MODE()
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:63