vtkExtentTranslator.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00038 #ifndef __vtkExtentTranslator_h
00039 #define __vtkExtentTranslator_h
00040
00041 #include "vtkObject.h"
00042
00043
00044 class VTK_COMMON_EXPORT vtkExtentTranslator : public vtkObject
00045 {
00046 public:
00047 static vtkExtentTranslator *New();
00048
00049 vtkTypeRevisionMacro(vtkExtentTranslator,vtkObject);
00050 void PrintSelf(ostream& os, vtkIndent indent);
00051
00053
00055 vtkSetVector6Macro(WholeExtent, int);
00056 vtkGetVector6Macro(WholeExtent, int);
00057 vtkSetVector6Macro(Extent, int);
00058 vtkGetVector6Macro(Extent, int);
00059 vtkSetMacro(Piece,int);
00060 vtkGetMacro(Piece,int);
00061 vtkSetMacro(NumberOfPieces,int);
00062 vtkGetMacro(NumberOfPieces,int);
00063 vtkSetMacro(GhostLevel, int);
00064 vtkGetMacro(GhostLevel, int);
00066
00068
00073 virtual int PieceToExtent();
00074 virtual int PieceToExtentByPoints();
00075 virtual int PieceToExtentThreadSafe(int piece, int numPieces,
00076 int ghostLevel, int *wholeExtent,
00077 int *resultExtent, int splitMode,
00078 int byPoints);
00080
00081
00082
00084
00088 void SetSplitModeToBlock()
00089 {this->SplitMode = vtkExtentTranslator::BLOCK_MODE;}
00090 void SetSplitModeToXSlab()
00091 {this->SplitMode = vtkExtentTranslator::X_SLAB_MODE;}
00092 void SetSplitModeToYSlab()
00093 {this->SplitMode = vtkExtentTranslator::Y_SLAB_MODE;}
00094 void SetSplitModeToZSlab()
00095 {this->SplitMode = vtkExtentTranslator::Z_SLAB_MODE;}
00096 vtkGetMacro(SplitMode,int);
00098
00099 protected:
00100 vtkExtentTranslator();
00101 ~vtkExtentTranslator();
00102
00104
00106 int SplitExtent(int piece, int numPieces, int *extent, int splitMode);
00107 int SplitExtentByPoints(int piece, int numPieces, int *extent,
00108 int splitMode);
00110
00111 int Piece;
00112 int NumberOfPieces;
00113 int GhostLevel;
00114 int Extent[6];
00115 int WholeExtent[6];
00116 int SplitMode;
00117
00118
00119
00120
00121 enum Modes {
00122 X_SLAB_MODE=0,
00123 Y_SLAB_MODE=1,
00124 Z_SLAB_MODE=2,
00125 BLOCK_MODE= 3
00126 };
00127
00128
00129 private:
00130 vtkExtentTranslator(const vtkExtentTranslator&);
00131 void operator=(const vtkExtentTranslator&);
00132 };
00133
00134 #endif
00135