VTK  9.0.20210225
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 "vtkDataSetAlgorithm.h"
48 #include "vtkFiltersGeneralModule.h" // For export macro
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:
57  vtkTypeMacro(vtkDicer, vtkDataSetAlgorithm);
58  void PrintSelf(ostream& os, vtkIndent indent) override;
59 
61 
68  vtkSetMacro(FieldData, vtkTypeBool);
69  vtkGetMacro(FieldData, vtkTypeBool);
70  vtkBooleanMacro(FieldData, vtkTypeBool);
72 
74 
78  vtkSetClampMacro(DiceMode, int, VTK_DICE_MODE_NUMBER_OF_POINTS, VTK_DICE_MODE_MEMORY_LIMIT);
79  vtkGetMacro(DiceMode, int);
84 
86 
91  vtkGetMacro(NumberOfActualPieces, int);
93 
95 
100  vtkSetClampMacro(NumberOfPointsPerPiece, int, 1000, VTK_INT_MAX);
101  vtkGetMacro(NumberOfPointsPerPiece, int);
103 
105 
113  vtkSetClampMacro(NumberOfPieces, int, 1, VTK_INT_MAX);
114  vtkGetMacro(NumberOfPieces, int);
116 
118 
124  vtkSetClampMacro(MemoryLimit, unsigned long, 100, VTK_INT_MAX);
125  vtkGetMacro(MemoryLimit, unsigned long);
127 
128 protected:
129  vtkDicer();
130  ~vtkDicer() override = default;
131 
132  virtual void UpdatePieceMeasures(vtkDataSet* input);
133 
136  unsigned long MemoryLimit;
139  int DiceMode;
140 
141 private:
142  vtkDicer(const vtkDicer&) = delete;
143  void operator=(const vtkDicer&) = delete;
144 };
145 
146 #endif
vtkDicer::NumberOfActualPieces
int NumberOfActualPieces
Definition: vtkDicer.h:137
VTK_INT_MAX
#define VTK_INT_MAX
Definition: vtkType.h:155
vtkDicer::SetDiceModeToMemoryLimitPerPiece
void SetDiceModeToMemoryLimitPerPiece()
Definition: vtkDicer.h:82
VTK_DICE_MODE_NUMBER_OF_POINTS
#define VTK_DICE_MODE_NUMBER_OF_POINTS
Definition: vtkDicer.h:50
vtkDataSetAlgorithm
Superclass for algorithms that produce output of the same type as input.
Definition: vtkDataSetAlgorithm.h:48
vtkDicer::DiceMode
int DiceMode
Definition: vtkDicer.h:139
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkDicer::MemoryLimit
unsigned long MemoryLimit
Definition: vtkDicer.h:136
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
vtkDicer
abstract superclass to divide dataset into pieces
Definition: vtkDicer.h:54
vtkDicer::NumberOfPointsPerPiece
int NumberOfPointsPerPiece
Definition: vtkDicer.h:134
vtkDicer::SetDiceModeToSpecifiedNumberOfPieces
void SetDiceModeToSpecifiedNumberOfPieces()
Definition: vtkDicer.h:81
vtkDataSetAlgorithm.h
vtkDicer::SetDiceModeToNumberOfPointsPerPiece
void SetDiceModeToNumberOfPointsPerPiece()
Definition: vtkDicer.h:80
vtkDataSetAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
VTK_DICE_MODE_MEMORY_LIMIT
#define VTK_DICE_MODE_MEMORY_LIMIT
Definition: vtkDicer.h:52
VTK_DICE_MODE_SPECIFIED_NUMBER
#define VTK_DICE_MODE_SPECIFIED_NUMBER
Definition: vtkDicer.h:51
vtkDicer::FieldData
vtkTypeBool FieldData
Definition: vtkDicer.h:138
vtkDicer::NumberOfPieces
int NumberOfPieces
Definition: vtkDicer.h:135
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69