VTK
vtkDicer.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkDicer.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
43 #ifndef __vtkDicer_h
44 #define __vtkDicer_h
45 
46 #include "vtkFiltersGeneralModule.h" // For export macro
47 #include "vtkDataSetAlgorithm.h"
48 
49 #define VTK_DICE_MODE_NUMBER_OF_POINTS 0
50 #define VTK_DICE_MODE_SPECIFIED_NUMBER 1
51 #define VTK_DICE_MODE_MEMORY_LIMIT 2
52 
53 class VTKFILTERSGENERAL_EXPORT vtkDicer : public vtkDataSetAlgorithm
54 {
55 public:
57  void PrintSelf(ostream& os, vtkIndent indent);
58 
60 
65  vtkSetMacro(FieldData,int);
66  vtkGetMacro(FieldData,int);
67  vtkBooleanMacro(FieldData,int);
69 
71 
73  vtkSetClampMacro(DiceMode,int,VTK_DICE_MODE_NUMBER_OF_POINTS,VTK_DICE_MODE_MEMORY_LIMIT);
74  vtkGetMacro(DiceMode,int);
75  void SetDiceModeToNumberOfPointsPerPiece()
76  {this->SetDiceMode(VTK_DICE_MODE_NUMBER_OF_POINTS);};
77  void SetDiceModeToSpecifiedNumberOfPieces()
78  {this->SetDiceMode(VTK_DICE_MODE_SPECIFIED_NUMBER);};
79  void SetDiceModeToMemoryLimitPerPiece()
80  {this->SetDiceMode(VTK_DICE_MODE_MEMORY_LIMIT);};
82 
84 
86  vtkGetMacro(NumberOfActualPieces,int);
88 
90 
93  vtkSetClampMacro(NumberOfPointsPerPiece,int,1000,VTK_LARGE_INTEGER);
94  vtkGetMacro(NumberOfPointsPerPiece,int);
96 
98 
103  vtkSetClampMacro(NumberOfPieces,int,1,VTK_LARGE_INTEGER);
104  vtkGetMacro(NumberOfPieces,int);
106 
108 
111  vtkSetClampMacro(MemoryLimit,unsigned long,100,VTK_LARGE_INTEGER);
112  vtkGetMacro(MemoryLimit,unsigned long);
114 
115 protected:
116  vtkDicer();
117  ~vtkDicer() {};
118 
119  virtual void UpdatePieceMeasures(vtkDataSet *input);
120 
123  unsigned long MemoryLimit;
126  int DiceMode;
127 
128 private:
129  vtkDicer(const vtkDicer&); // Not implemented.
130  void operator=(const vtkDicer&); // Not implemented.
131 };
132 
133 #endif
134 
135