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) 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);
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() override {}
134 
135  virtual void UpdatePieceMeasures(vtkDataSet *input);
136 
139  unsigned long MemoryLimit;
142  int DiceMode;
143 
144 private:
145  vtkDicer(const vtkDicer&) = delete;
146  void operator=(const vtkDicer&) = delete;
147 };
148 
149 #endif
150 
151 
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
#define VTK_INT_MAX
Definition: vtkType.h:159
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
int vtkTypeBool
Definition: vtkABI.h:69
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
vtkTypeBool FieldData
Definition: vtkDicer.h:141
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
#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.
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