VTK  9.3.1
vtkDicer.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
32 #ifndef vtkDicer_h
33 #define vtkDicer_h
34 
35 #include "vtkDataSetAlgorithm.h"
36 #include "vtkFiltersGeneralModule.h" // For export macro
37 
38 #define VTK_DICE_MODE_NUMBER_OF_POINTS 0
39 #define VTK_DICE_MODE_SPECIFIED_NUMBER 1
40 #define VTK_DICE_MODE_MEMORY_LIMIT 2
41 
42 VTK_ABI_NAMESPACE_BEGIN
43 class VTKFILTERSGENERAL_EXPORT vtkDicer : public vtkDataSetAlgorithm
44 {
45 public:
46  vtkTypeMacro(vtkDicer, vtkDataSetAlgorithm);
47  void PrintSelf(ostream& os, vtkIndent indent) override;
48 
50 
57  vtkSetMacro(FieldData, vtkTypeBool);
58  vtkGetMacro(FieldData, vtkTypeBool);
59  vtkBooleanMacro(FieldData, vtkTypeBool);
61 
63 
67  vtkSetClampMacro(DiceMode, int, VTK_DICE_MODE_NUMBER_OF_POINTS, VTK_DICE_MODE_MEMORY_LIMIT);
68  vtkGetMacro(DiceMode, int);
73 
75 
80  vtkGetMacro(NumberOfActualPieces, int);
82 
84 
89  vtkSetClampMacro(NumberOfPointsPerPiece, int, 1000, VTK_INT_MAX);
90  vtkGetMacro(NumberOfPointsPerPiece, int);
92 
94 
102  vtkSetClampMacro(NumberOfPieces, int, 1, VTK_INT_MAX);
103  vtkGetMacro(NumberOfPieces, int);
105 
107 
113  vtkSetClampMacro(MemoryLimit, unsigned long, 100, VTK_INT_MAX);
114  vtkGetMacro(MemoryLimit, unsigned long);
116 
117 protected:
118  vtkDicer();
119  ~vtkDicer() override = default;
120 
121  virtual void UpdatePieceMeasures(vtkDataSet* input);
122 
125  unsigned long MemoryLimit;
128  int DiceMode;
129 
130 private:
131  vtkDicer(const vtkDicer&) = delete;
132  void operator=(const vtkDicer&) = delete;
133 };
134 
135 VTK_ABI_NAMESPACE_END
136 #endif
abstract class to specify dataset behavior
Definition: vtkDataSet.h:52
#define VTK_INT_MAX
Definition: vtkType.h:144
void SetDiceModeToSpecifiedNumberOfPieces()
Specify the method to determine how many pieces the data should be broken into.
Definition: vtkDicer.h:70
abstract superclass to divide dataset into pieces
Definition: vtkDicer.h:43
int DiceMode
Definition: vtkDicer.h:128
unsigned long MemoryLimit
Definition: vtkDicer.h:125
int vtkTypeBool
Definition: vtkABI.h:64
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTypeBool FieldData
Definition: vtkDicer.h:127
int NumberOfPieces
Definition: vtkDicer.h:124
a simple class to control print indentation
Definition: vtkIndent.h:28
void SetDiceModeToNumberOfPointsPerPiece()
Specify the method to determine how many pieces the data should be broken into.
Definition: vtkDicer.h:69
#define VTK_DICE_MODE_NUMBER_OF_POINTS
Definition: vtkDicer.h:38
int NumberOfPointsPerPiece
Definition: vtkDicer.h:123
#define VTK_DICE_MODE_SPECIFIED_NUMBER
Definition: vtkDicer.h:39
#define VTK_DICE_MODE_MEMORY_LIMIT
Definition: vtkDicer.h:40
Superclass for algorithms that produce output of the same type as input.
int NumberOfActualPieces
Definition: vtkDicer.h:126
void SetDiceModeToMemoryLimitPerPiece()
Specify the method to determine how many pieces the data should be broken into.
Definition: vtkDicer.h:71