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 "vtkDataSetAlgorithm.h"
47 
48 #define VTK_DICE_MODE_NUMBER_OF_POINTS 0
49 #define VTK_DICE_MODE_SPECIFIED_NUMBER 1
50 #define VTK_DICE_MODE_MEMORY_LIMIT 2
51 
53 {
54 public:
56  void PrintSelf(ostream& os, vtkIndent indent);
57 
59 
64  vtkSetMacro(FieldData,int);
65  vtkGetMacro(FieldData,int);
66  vtkBooleanMacro(FieldData,int);
68 
70 
72  vtkSetClampMacro(DiceMode,int,VTK_DICE_MODE_NUMBER_OF_POINTS,VTK_DICE_MODE_MEMORY_LIMIT);
73  vtkGetMacro(DiceMode,int);
74  void SetDiceModeToNumberOfPointsPerPiece()
75  {this->SetDiceMode(VTK_DICE_MODE_NUMBER_OF_POINTS);};
76  void SetDiceModeToSpecifiedNumberOfPieces()
77  {this->SetDiceMode(VTK_DICE_MODE_SPECIFIED_NUMBER);};
78  void SetDiceModeToMemoryLimitPerPiece()
79  {this->SetDiceMode(VTK_DICE_MODE_MEMORY_LIMIT);};
81 
83 
85  vtkGetMacro(NumberOfActualPieces,int);
87 
89 
92  vtkSetClampMacro(NumberOfPointsPerPiece,int,1000,VTK_LARGE_INTEGER);
93  vtkGetMacro(NumberOfPointsPerPiece,int);
95 
97 
102  vtkSetClampMacro(NumberOfPieces,int,1,VTK_LARGE_INTEGER);
103  vtkGetMacro(NumberOfPieces,int);
105 
107 
110  vtkSetClampMacro(MemoryLimit,unsigned long,100,VTK_LARGE_INTEGER);
111  vtkGetMacro(MemoryLimit,unsigned long);
113 
114 protected:
115  vtkDicer();
116  ~vtkDicer() {};
117 
118  virtual void UpdatePieceMeasures(vtkDataSet *input);
119 
122  unsigned long MemoryLimit;
125  int DiceMode;
126 
127 private:
128  vtkDicer(const vtkDicer&); // Not implemented.
129  void operator=(const vtkDicer&); // Not implemented.
130 };
131 
132 #endif
133 
134