00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00071 #ifndef __vtkDicer_h
00072 #define __vtkDicer_h
00073
00074 #include "vtkDataSetToDataSetFilter.h"
00075
00076 #define VTK_DICE_MODE_NUMBER_OF_POINTS 0
00077 #define VTK_DICE_MODE_SPECIFIED_NUMBER 1
00078 #define VTK_DICE_MODE_MEMORY_LIMIT 2
00079
00080 class VTK_GRAPHICS_EXPORT vtkDicer : public vtkDataSetToDataSetFilter
00081 {
00082 public:
00083 vtkTypeMacro(vtkDicer,vtkDataSetToDataSetFilter);
00084 void PrintSelf(ostream& os, vtkIndent indent);
00085
00087
00092 vtkSetMacro(FieldData,int);
00093 vtkGetMacro(FieldData,int);
00094 vtkBooleanMacro(FieldData,int);
00096
00098
00100 vtkSetClampMacro(DiceMode,int,VTK_DICE_MODE_NUMBER_OF_POINTS,VTK_DICE_MODE_MEMORY_LIMIT);
00101 vtkGetMacro(DiceMode,int);
00102 void SetDiceModeToNumberOfPointsPerPiece()
00103 {this->SetDiceMode(VTK_DICE_MODE_NUMBER_OF_POINTS);};
00104 void SetDiceModeToSpecifiedNumberOfPieces()
00105 {this->SetDiceMode(VTK_DICE_MODE_SPECIFIED_NUMBER);};
00106 void SetDiceModeToMemoryLimitPerPiece()
00107 {this->SetDiceMode(VTK_DICE_MODE_MEMORY_LIMIT);};
00109
00111
00113 vtkGetMacro(NumberOfActualPieces,int);
00115
00117
00120 vtkSetClampMacro(NumberOfPointsPerPiece,int,1000,VTK_LARGE_INTEGER);
00121 vtkGetMacro(NumberOfPointsPerPiece,int);
00123
00125
00130 vtkSetClampMacro(NumberOfPieces,int,1,VTK_LARGE_INTEGER);
00131 vtkGetMacro(NumberOfPieces,int);
00133
00135
00138 vtkSetClampMacro(MemoryLimit,unsigned long,100,VTK_LARGE_INTEGER);
00139 vtkGetMacro(MemoryLimit,unsigned long);
00141
00142 protected:
00143 vtkDicer();
00144 ~vtkDicer() {};
00145
00146 virtual void UpdatePieceMeasures();
00147
00148 int NumberOfPointsPerPiece;
00149 int NumberOfPieces;
00150 unsigned long MemoryLimit;
00151 int NumberOfActualPieces;
00152 int FieldData;
00153 int DiceMode;
00154
00155 private:
00156 vtkDicer(const vtkDicer&);
00157 void operator=(const vtkDicer&);
00158 };
00159
00160 #endif
00161
00162