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 =========================================================================*/
44 #ifndef vtkDicer_h
45 #define vtkDicer_h
46 
47 #include "vtkFiltersGeneralModule.h" // For export macro
48 #include "vtkDataSetAlgorithm.h"
49 
50 #define VTK_DICE_MODE_NUMBER_OF_POINTS 0
51 #define VTK_DICE_MODE_SPECIFIED_NUMBER 1
52 #define VTK_DICE_MODE_MEMORY_LIMIT 2
53 
54 class VTKFILTERSGENERAL_EXPORT vtkDicer : public vtkDataSetAlgorithm
55 {
56 public:
58  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
59 
61 
68  vtkSetMacro(FieldData,int);
69  vtkGetMacro(FieldData,int);
70  vtkBooleanMacro(FieldData,int);
72 
74 
78  vtkSetClampMacro(DiceMode,int,VTK_DICE_MODE_NUMBER_OF_POINTS,VTK_DICE_MODE_MEMORY_LIMIT);
79  vtkGetMacro(DiceMode,int);
81  {this->SetDiceMode(VTK_DICE_MODE_NUMBER_OF_POINTS);};
83  {this->SetDiceMode(VTK_DICE_MODE_SPECIFIED_NUMBER);};
85  {this->SetDiceMode(VTK_DICE_MODE_MEMORY_LIMIT);};
87 
89 
94  vtkGetMacro(NumberOfActualPieces,int);
96 
98 
103  vtkSetClampMacro(NumberOfPointsPerPiece,int,1000,VTK_INT_MAX);
104  vtkGetMacro(NumberOfPointsPerPiece,int);
106 
108 
116  vtkSetClampMacro(NumberOfPieces,int,1,VTK_INT_MAX);
117  vtkGetMacro(NumberOfPieces,int);
119 
121 
127  vtkSetClampMacro(MemoryLimit,unsigned long,100,VTK_INT_MAX);
128  vtkGetMacro(MemoryLimit,unsigned long);
130 
131 protected:
132  vtkDicer();
133  ~vtkDicer() VTK_OVERRIDE {}
134 
135  virtual void UpdatePieceMeasures(vtkDataSet *input);
136 
139  unsigned long MemoryLimit;
142  int DiceMode;
143 
144 private:
145  vtkDicer(const vtkDicer&) VTK_DELETE_FUNCTION;
146  void operator=(const vtkDicer&) VTK_DELETE_FUNCTION;
147 };
148 
149 #endif
150 
151 
int FieldData
Definition: vtkDicer.h:141
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
#define VTK_INT_MAX
Definition: vtkType.h:153
void SetDiceModeToSpecifiedNumberOfPieces()
Specify the method to determine how many pieces the data should be broken into.
Definition: vtkDicer.h:82
abstract superclass to divide dataset into pieces
Definition: vtkDicer.h:54
int DiceMode
Definition: vtkDicer.h:142
unsigned long MemoryLimit
Definition: vtkDicer.h:139
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkDicer() override
Definition: vtkDicer.h:133
int NumberOfPieces
Definition: vtkDicer.h:138
a simple class to control print indentation
Definition: vtkIndent.h:39
void SetDiceModeToNumberOfPointsPerPiece()
Specify the method to determine how many pieces the data should be broken into.
Definition: vtkDicer.h:80
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
#define VTK_DICE_MODE_NUMBER_OF_POINTS
Definition: vtkDicer.h:50
int NumberOfPointsPerPiece
Definition: vtkDicer.h:137
#define VTK_DICE_MODE_SPECIFIED_NUMBER
Definition: vtkDicer.h:51
#define VTK_DICE_MODE_MEMORY_LIMIT
Definition: vtkDicer.h:52
Superclass for algorithms that produce output of the same type as input.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
int NumberOfActualPieces
Definition: vtkDicer.h:140
void SetDiceModeToMemoryLimitPerPiece()
Specify the method to determine how many pieces the data should be broken into.
Definition: vtkDicer.h:84