Common/vtkExtentTranslator.h Source File

Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# Common/vtkExtentTranslator.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program:   Visualization Toolkit
    00004   Module:    $RCSfile: vtkExtentTranslator.h,v $
    00005   Language:  C++
    00006
    00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
    00008   All rights reserved.
    00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
    00010
    00011      This software is distributed WITHOUT ANY WARRANTY; without even
    00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
    00013      PURPOSE.  See the above copyright notice for more information.
    00014
    00015 =========================================================================*/
    00042 #ifndef __vtkExtentTranslator_h
    00043 #define __vtkExtentTranslator_h
    00044
    00045 #include "vtkObject.h"
    00046
    00047
    00048 class VTK_COMMON_EXPORT vtkExtentTranslator : public vtkObject
    00049 {
    00050 public:
    00051   static vtkExtentTranslator *New();
    00052
    00053   vtkTypeRevisionMacro(vtkExtentTranslator,vtkObject);
    00054   void PrintSelf(ostream& os, vtkIndent indent);
    00055
    00057
    00059   vtkSetVector6Macro(WholeExtent, int);
    00060   vtkGetVector6Macro(WholeExtent, int);
    00061   vtkSetVector6Macro(Extent, int);
    00062   vtkGetVector6Macro(Extent, int);
    00063   vtkSetMacro(Piece,int);
    00064   vtkGetMacro(Piece,int);
    00065   vtkSetMacro(NumberOfPieces,int);
    00066   vtkGetMacro(NumberOfPieces,int);
    00067   vtkSetMacro(GhostLevel, int);
    00068   vtkGetMacro(GhostLevel, int);
    00070
    00072
    00077   virtual int PieceToExtent();
    00078   virtual int PieceToExtentByPoints();
    00079   virtual int PieceToExtentThreadSafe(int piece, int numPieces,
    00080                                       int ghostLevel, int *wholeExtent,
    00081                                       int *resultExtent, int splitMode,
    00082                                       int byPoints);
    00084
    00085
    00086
    00088
    00092   void SetSplitModeToBlock()
    00093     {this->SplitMode = vtkExtentTranslator::BLOCK_MODE;}
    00094   void SetSplitModeToXSlab()
    00095     {this->SplitMode = vtkExtentTranslator::X_SLAB_MODE;}
    00096  void SetSplitModeToYSlab()
    00097     {this->SplitMode = vtkExtentTranslator::Y_SLAB_MODE;}
    00098  void SetSplitModeToZSlab()
    00099     {this->SplitMode = vtkExtentTranslator::Z_SLAB_MODE;}
    00100   vtkGetMacro(SplitMode,int);
    00102
    00103 protected:
    00104   vtkExtentTranslator();
    00105   ~vtkExtentTranslator();
    00106
    00108
    00110   int SplitExtent(int piece, int numPieces, int *extent, int splitMode);
    00111   int SplitExtentByPoints(int piece, int numPieces, int *extent,
    00112                           int splitMode);
    00114
    00115   int Piece;
    00116   int NumberOfPieces;
    00117   int GhostLevel;
    00118   int Extent[6];
    00119   int WholeExtent[6];
    00120   int SplitMode;
    00121
    00122 //BTX
    00123   // Don't change the numbers here - they are used in the code
    00124   // to indicate array indices.
    00125   enum Modes {
    00126     X_SLAB_MODE=0,
    00127     Y_SLAB_MODE=1,
    00128     Z_SLAB_MODE=2,
    00129     BLOCK_MODE= 3
    00130   };
    00131 //ETX
    00132
    00133 private:
    00134   vtkExtentTranslator(const vtkExtentTranslator&);  // Not implemented.
    00135   void operator=(const vtkExtentTranslator&);  // Not implemented.
    00136 };
    00137
    00138 #endif
    00139