VTK  9.1.0
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
34class VTKCOMMONEXECUTIONMODEL_EXPORT vtkExtentTranslator : public vtkObject
35{
36public:
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
111protected:
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
138
139private:
141 void operator=(const vtkExtentTranslator&) = delete;
142};
143
144#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:113
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:82