Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

vtkExtentTranslator.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkExtentTranslator.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00027 #ifndef __vtkExtentTranslator_h
00028 #define __vtkExtentTranslator_h
00029 
00030 #include "vtkObject.h"
00031 
00032 
00033 class VTK_COMMON_EXPORT vtkExtentTranslator : public vtkObject
00034 {
00035 public:
00036   static vtkExtentTranslator *New();
00037 
00038   vtkTypeRevisionMacro(vtkExtentTranslator,vtkObject);
00039   void PrintSelf(ostream& os, vtkIndent indent);
00040 
00042 
00044   vtkSetVector6Macro(WholeExtent, int);
00045   vtkGetVector6Macro(WholeExtent, int);
00046   vtkSetVector6Macro(Extent, int);
00047   vtkGetVector6Macro(Extent, int);
00048   vtkSetMacro(Piece,int);
00049   vtkGetMacro(Piece,int);
00050   vtkSetMacro(NumberOfPieces,int);
00051   vtkGetMacro(NumberOfPieces,int);
00052   vtkSetMacro(GhostLevel, int);
00053   vtkGetMacro(GhostLevel, int);
00055 
00057 
00062   virtual int PieceToExtent();
00063   virtual int PieceToExtentByPoints();
00064   virtual int PieceToExtentThreadSafe(int piece, int numPieces, 
00065                                       int ghostLevel, int *wholeExtent, 
00066                                       int *resultExtent, int splitMode, 
00067                                       int byPoints);
00069   
00070   
00071   
00073 
00077   void SetSplitModeToBlock()
00078     {this->SplitMode = vtkExtentTranslator::BLOCK_MODE;}
00079   void SetSplitModeToXSlab()
00080     {this->SplitMode = vtkExtentTranslator::X_SLAB_MODE;}
00081  void SetSplitModeToYSlab()
00082     {this->SplitMode = vtkExtentTranslator::Y_SLAB_MODE;}
00083  void SetSplitModeToZSlab()
00084     {this->SplitMode = vtkExtentTranslator::Z_SLAB_MODE;}
00085   vtkGetMacro(SplitMode,int);
00087   
00088 protected:
00089   vtkExtentTranslator();
00090   ~vtkExtentTranslator();
00091 
00093 
00095   int SplitExtent(int piece, int numPieces, int *extent, int splitMode);  
00096   int SplitExtentByPoints(int piece, int numPieces, int *extent, 
00097                           int splitMode);  
00099 
00100   int Piece;
00101   int NumberOfPieces;
00102   int GhostLevel;
00103   int Extent[6];
00104   int WholeExtent[6];
00105   int SplitMode;
00106 
00107 //BTX
00108   // Don't change the numbers here - they are used in the code
00109   // to indicate array indices.
00110   enum Modes {
00111     X_SLAB_MODE=0,
00112     Y_SLAB_MODE=1,
00113     Z_SLAB_MODE=2,
00114     BLOCK_MODE= 3
00115   };
00116 //ETX
00117 
00118 private:
00119   vtkExtentTranslator(const vtkExtentTranslator&);  // Not implemented.
00120   void operator=(const vtkExtentTranslator&);  // Not implemented.
00121 };
00122 
00123 #endif
00124 

Generated on Mon Jan 21 23:07:16 2008 for VTK by  doxygen 1.4.3-20050530