VTK
dox/Graphics/vtkDicer.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkDicer.h
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 =========================================================================*/
00043 #ifndef __vtkDicer_h
00044 #define __vtkDicer_h
00045 
00046 #include "vtkDataSetAlgorithm.h"
00047 
00048 #define VTK_DICE_MODE_NUMBER_OF_POINTS 0
00049 #define VTK_DICE_MODE_SPECIFIED_NUMBER 1
00050 #define VTK_DICE_MODE_MEMORY_LIMIT 2
00051 
00052 class VTK_GRAPHICS_EXPORT vtkDicer : public vtkDataSetAlgorithm 
00053 {
00054 public:
00055   vtkTypeMacro(vtkDicer,vtkDataSetAlgorithm);
00056   void PrintSelf(ostream& os, vtkIndent indent);
00057 
00059 
00064   vtkSetMacro(FieldData,int);
00065   vtkGetMacro(FieldData,int);
00066   vtkBooleanMacro(FieldData,int);
00068 
00070 
00072   vtkSetClampMacro(DiceMode,int,VTK_DICE_MODE_NUMBER_OF_POINTS,VTK_DICE_MODE_MEMORY_LIMIT);
00073   vtkGetMacro(DiceMode,int);
00074   void SetDiceModeToNumberOfPointsPerPiece()
00075     {this->SetDiceMode(VTK_DICE_MODE_NUMBER_OF_POINTS);};
00076   void SetDiceModeToSpecifiedNumberOfPieces()
00077     {this->SetDiceMode(VTK_DICE_MODE_SPECIFIED_NUMBER);};
00078   void SetDiceModeToMemoryLimitPerPiece()
00079     {this->SetDiceMode(VTK_DICE_MODE_MEMORY_LIMIT);};
00081 
00083 
00085   vtkGetMacro(NumberOfActualPieces,int);
00087 
00089 
00092   vtkSetClampMacro(NumberOfPointsPerPiece,int,1000,VTK_LARGE_INTEGER);
00093   vtkGetMacro(NumberOfPointsPerPiece,int);
00095 
00097 
00102   vtkSetClampMacro(NumberOfPieces,int,1,VTK_LARGE_INTEGER);
00103   vtkGetMacro(NumberOfPieces,int);
00105 
00107 
00110   vtkSetClampMacro(MemoryLimit,unsigned long,100,VTK_LARGE_INTEGER);
00111   vtkGetMacro(MemoryLimit,unsigned long);
00113 
00114 protected:
00115   vtkDicer();
00116   ~vtkDicer() {};
00117 
00118   virtual void UpdatePieceMeasures(vtkDataSet *input);
00119 
00120   int           NumberOfPointsPerPiece;
00121   int           NumberOfPieces;
00122   unsigned long MemoryLimit;
00123   int           NumberOfActualPieces;
00124   int           FieldData;
00125   int           DiceMode;
00126 
00127 private:
00128   vtkDicer(const vtkDicer&);  // Not implemented.
00129   void operator=(const vtkDicer&);  // Not implemented.
00130 };
00131 
00132 #endif
00133 
00134