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

Graphics/vtkDicer.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkDicer.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 =========================================================================*/
00047 #ifndef __vtkDicer_h
00048 #define __vtkDicer_h
00049 
00050 #include "vtkDataSetToDataSetFilter.h"
00051 
00052 #define VTK_DICE_MODE_NUMBER_OF_POINTS 0
00053 #define VTK_DICE_MODE_SPECIFIED_NUMBER 1
00054 #define VTK_DICE_MODE_MEMORY_LIMIT 2
00055 
00056 class VTK_GRAPHICS_EXPORT vtkDicer : public vtkDataSetToDataSetFilter 
00057 {
00058 public:
00059   vtkTypeRevisionMacro(vtkDicer,vtkDataSetToDataSetFilter);
00060   void PrintSelf(ostream& os, vtkIndent indent);
00061 
00063 
00068   vtkSetMacro(FieldData,int);
00069   vtkGetMacro(FieldData,int);
00070   vtkBooleanMacro(FieldData,int);
00072 
00074 
00076   vtkSetClampMacro(DiceMode,int,VTK_DICE_MODE_NUMBER_OF_POINTS,VTK_DICE_MODE_MEMORY_LIMIT);
00077   vtkGetMacro(DiceMode,int);
00078   void SetDiceModeToNumberOfPointsPerPiece()
00079     {this->SetDiceMode(VTK_DICE_MODE_NUMBER_OF_POINTS);};
00080   void SetDiceModeToSpecifiedNumberOfPieces()
00081     {this->SetDiceMode(VTK_DICE_MODE_SPECIFIED_NUMBER);};
00082   void SetDiceModeToMemoryLimitPerPiece()
00083     {this->SetDiceMode(VTK_DICE_MODE_MEMORY_LIMIT);};
00085 
00087 
00089   vtkGetMacro(NumberOfActualPieces,int);
00091 
00093 
00096   vtkSetClampMacro(NumberOfPointsPerPiece,int,1000,VTK_LARGE_INTEGER);
00097   vtkGetMacro(NumberOfPointsPerPiece,int);
00099 
00101 
00106   vtkSetClampMacro(NumberOfPieces,int,1,VTK_LARGE_INTEGER);
00107   vtkGetMacro(NumberOfPieces,int);
00109 
00111 
00114   vtkSetClampMacro(MemoryLimit,unsigned long,100,VTK_LARGE_INTEGER);
00115   vtkGetMacro(MemoryLimit,unsigned long);
00117 
00118 protected:
00119   vtkDicer();
00120   ~vtkDicer() {};
00121 
00122   virtual void UpdatePieceMeasures();
00123 
00124   int           NumberOfPointsPerPiece;
00125   int           NumberOfPieces;
00126   unsigned long MemoryLimit;
00127   int           NumberOfActualPieces;
00128   int           FieldData;
00129   int           DiceMode;
00130 
00131 private:
00132   vtkDicer(const vtkDicer&);  // Not implemented.
00133   void operator=(const vtkDicer&);  // Not implemented.
00134 };
00135 
00136 #endif
00137 
00138