VTK
vtkPieceScalars.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPieceScalars.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 =========================================================================*/
28 #ifndef vtkPieceScalars_h
29 #define vtkPieceScalars_h
30 
31 #include "vtkFiltersParallelModule.h" // For export macro
32 #include "vtkDataSetAlgorithm.h"
33 
34 class vtkFloatArray;
35 class vtkIntArray;
36 
37 class VTKFILTERSPARALLEL_EXPORT vtkPieceScalars : public vtkDataSetAlgorithm
38 {
39 public:
40  static vtkPieceScalars *New();
41 
43  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
44 
48  void SetScalarModeToCellData() {this->SetCellScalarsFlag(1);}
49  void SetScalarModeToPointData() {this->SetCellScalarsFlag(0);}
50  int GetScalarMode() {return this->CellScalarsFlag;}
51 
52  // Dscription:
53  // This option uses a random mapping between pieces and scalar values.
54  // The scalar values are chosen between 0 and 1. By default, random mode is off.
55  vtkSetMacro(RandomMode, int);
56  vtkGetMacro(RandomMode, int);
57  vtkBooleanMacro(RandomMode, int);
58 
59 protected:
61  ~vtkPieceScalars() VTK_OVERRIDE;
62 
63  // Append the pieces.
64  int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
65 
66  vtkIntArray *MakePieceScalars(int piece, vtkIdType numScalars);
67  vtkFloatArray *MakeRandomScalars(int piece, vtkIdType numScalars);
68 
69  vtkSetMacro(CellScalarsFlag,int);
70  int CellScalarsFlag;
71  int RandomMode;
72 private:
73  vtkPieceScalars(const vtkPieceScalars&) VTK_DELETE_FUNCTION;
74  void operator=(const vtkPieceScalars&) VTK_DELETE_FUNCTION;
75 };
76 
77 #endif
void SetScalarModeToCellData()
Option to centerate cell scalars of points scalars.
Store vtkAlgorithm input/output information.
dynamic, self-adjusting array of float
Definition: vtkFloatArray.h:35
int vtkIdType
Definition: vtkType.h:345
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:39
a simple class to control print indentation
Definition: vtkIndent.h:33
Sets all cell scalars from the update piece.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
void SetScalarModeToPointData()
Store zero or more vtkInformation instances.
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.
static vtkDataSetAlgorithm * New()