00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
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&);
00129 void operator=(const vtkDicer&);
00130 };
00131
00132 #endif
00133
00134